[rrd-users] Re: Processing HEX values
Marcel Schulte
schulte.marcel at googlemail.com
Tue Dec 19 09:14:57 MET 2006
Many thanks to John Baker and Dan Cech for their suggestions.
Unfortunately the data is fetched by an application in our management
solution and I'm unable to insert my own script between fetching and
rrd-feeding.
I'll ask the people there if they've any suggestions and will inform you if
any of theses guide to the right direction.
Thanks again,
Marcel
2006/12/18, Baker, John <JBaker at harmanbecker.com>:
>
> Marcel, if you're familiar with scripting in Perl, there is a function
> "hex" that happily do what you need.
>
> # perldoc -f hex
>
> hex EXPR
> hex Interprets EXPR as a hex string and returns the corresponding
> value. (To convert strings that might start with either 0,
> "0x", or "0b", see "oct".) If EXPR is omitted, uses $_.
>
> print hex '0xAf'; # prints '175'
> print hex 'aF'; # same
>
> Hex strings may only represent integers. Strings that would
> cause integer overflow trigger a warning. Leading whitespace
> is not stripped, unlike oct(). To present something as hex,
> look into "printf", "sprintf", or "unpack".
>
> John
>
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list