On 18/02/2008, Joey Officer <[EMAIL PROTECTED]> wrote:
>  If I were to
> take this script a step further (intentionally) I want to chart specific
> arguments... so for example:
>
>  agetty tty1
>  agetty tty2
>
>  I'd adjust my output so that 'showstat.1' returned tty1 and .2 returned cpu
> value for tty1 .3 returned mem value for .1 and .4 returned total mem of
> host .  Taking this further, .5 would return tty2 and .6 returned cpu value
> for tty2 .7 returned mem value for .5 and .8 returned total mem of host ...
> and so on

If you were going to take this further, then I'd suggest you look at defining
a proper MIB that describes the structure of the data you are trying to report.
Something like:

    agettyTable
        agettyEntry
           agettyIndex
           agettyTTY      ("tty1", "tty2", ....)
           agettyPID      (7182, 7184, ...)
           agettyCPU     (0.0, ....)
           agettyMem     (0.0, ....)

> ..... .8 returned total mem of host ...

This doesn't actually need to be repeated for each "agetty" entry,
since it's a constant value.   EIther define this as a separate
scalar object within your MIB or (better) use the existing standard
MIB object  HOST-RESOURCES-MIB::hrMemorySize



>  I can walk this today and get the values I'm looking for, but is there a
> way (and how) to index them accordingly?  Or would it be possible that
> showstat.1 is tty1 and showstat.2 is tty2 etc?

You could either use the table structure shown above (indexed by
an arbitrary integer value).   Or you could use the "agettyTTY"
column to index the table (and omit the "agettyIndex" column completely)

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to