On 12 April 2010 10:32, Evgeny Nagaev <enag...@gmail.com> wrote: > OK, but can you provide me with info about how to extend your sources to > support my own development of hrDeviceStatus support in net-snmp?
In the routine init_hr_disk(), look for the line device_descr[HRDEV_DISK] = describe_disk; and add another device_status[HRDEV_DISK] = disk_status; Then define the routine int disk_status( int idx ) { if ( /* disk 'idx' is running OK */ ) { return 2; /* running */ } if ( /* disk 'idx' is down */ ) { return 5; /* down */ } } (for whichever status values you wish to return). You can probably assume that all the information set up in 'Save_HR_Disk_Specific' and 'Save_HR_Disk_General' will be available and refer to the disk in question. You can also do something similar for hrDeviceErrors by registering device_errors[HRDEV_DISK] = disk_errors; and defining 'disk_errors' appropriately. (It follows the same framework, but returns the number of errors for that particular disk) See 'host/hr_network' for an example. 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