On 19 March 2010 10:50, Alexander King <chenyapu1...@qq.com> wrote: > 1. How to use the command 'snmptranslate' get all the OIDs defined in my > private MIB?
See the FAQ entry about adding MIBs to the client tools. > diskTable is a table included many scalars about each disk properties > such as diskStatus,diskSpareCapacity and so on. Just a point of clarification - these MIB objects are actually column objects, rather than scalars. MIB scalar objects are precisely those that are *not* part of a table. It doesn't really matter, but misuse of the terminology can become confusing, so you might as well get used to calling things by the right terms :-) > My problem is,the diskTable is not decided,so how does the snmptrapd routine > know which diskStatus of the disk int the diskTable was changed? The "monitor" line is typically given an expression of the form diskSpareCapacity < 100 It will effectively do an internal walk of the diskSpareCapacity column object, and check each instance against the specified test. For any instance that matches, it will use the same instance subidentifier(s) for any other MIB object that is due to be added to the payload of the trap. Suppose your monitor line looks like monitor -o diskName -o diskSize "disk filling" diskSpareCapacity < 100 and disk #4 is getting full. Then when the monitor check kicks in, it will walk the diskSpareCapacity, column spot that diskSpareCapacity.4 is less than 100, and generate a trap containing diskName.4 and diskSize.4 Note that if the monitor line looked like monitor -o diskName -i diskSize.99 "disk filling" diskSpareCapacity < 100 then the trap would contain diskName.4 (added as an object, as before) and diskSize.99 (explicitly added as an *instance*, so doesn't use the diskSpareCapacity instance value) OK? Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ 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