On Wed, 2004-01-21 at 13:40, Joseph Mack wrote:
> "Salvatore D. Tepedino" wrote:
> >
> > In case anyone's interested, I posted the new version of my script to:
> >
> > http://tepedino.org/lvs-rrd/
>
> well I'll be damned. It worked! without even knowing what I was doing!
> All I did was follow Salvatore's "Setup" instructions.
>
> I didn't even have to read the RRDtool docs -
> I just installed them with ./configure && make install.
Good to hear! I tried to write it so there was minimal setup required.
> Salvatore:
>
> In your "Requirements" for rrdtool, can you add.
>
> "Just do the standard ./configure && make && make install"
Not a bad idea...
> For the database file names: Can you do the names in regular dotted quad:port
> notation? It will make it easier for me to read, or is there some good
> reason to do it this way?
The RRD files, you mean? Well, it uses the same notation that the
/proc/net/ip_vs file uses. It's just easier to parse that way. You
shouldn't have to worry about the rrd files at all as the update script
will handle them. Besides, I don't like to use characters that need to
be escaped in file names if I don't have to (as a : would need to be).
Here's a quick script to translate a hex IP to a standard dotted quad:
IP=$(echo $(echo $1 | tr a-z A-Z | sed 's/\(..\)/;\1/g;s/^/ibase=16/' | bc) |
sed 's/ /./g')
echo $IP
where $1 is the hex ip (it's $1 so you can easily make it a shell script
and pass the HIP via the command line)
and from IP to hex IP:
for i in `echo $1 | sed 's/\./ /g'`;do echo $i |awk '{printf "%02X",
$1}';done;echo
(Same rules apply w/ $1)
Again, you shouldn't have to worry about the rrd files at all. The
graphing script spits out the dotted quad IP onto the graph, so it
should be very readable. If for some reason you would like dotted quad
IP named rrd files, I can have the update script create a hard linked
dotted quad names when it creates the hex ip files.
>
> Thanks Joe
--
Salvatore D. Tepedino <sal@xxxxxxxxxxxx>
|