In the last episode (Nov 23), paul beard said:
> For some reason, my locally installed snmp daemons decided to
> renumber the elements in the hrStorageTable, meaning all the attached
> disks were being either misreported or just plain dropped from my
> graphs (paulbeard.no-ip.org/mrtg/blue/index.html). Not that the new
> numbering doesn't make sense but I didn't know this was going to
> happen.
> 
> How to discover and fix it? snmptable is my friend. As shown here,
> the memory used by the kernel is listed first, followed by the disks.
> The disks were numbered starting at 1 before . . . . .

I don't think snmp tables have any defined order.  I don't even know if
the index for a particular resource is guaranteed to be stable across
filesystem dismount/remounts.  Something like this should work:

snmptable -Cf : blue hrStorageTable | grep :/var: | awk -F : '{print $4 * $5}' 

I use something similar in a script to graph disk usage in mrtg.  It
sould be really nice if snmptable had a built-in flag to print a
particular cell from a table, though.

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to