Re: Hardware Asset Information

Kaushal Shriyan <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAD7Ssm9k2yy+2Y7FFAb093ovL2RRNccN6WzBXEJ8tynS+eV2AA@mail.gmail.com>
On Tue, Oct 4, 2011 at 8:36 PM, Dave Shield <[email protected]> wrote:
> On 4 October 2011 15:20, Kaushal Shriyan <[email protected]> wrote:
>>> Have you tried just ssh-ing in to the hosts and running dmidecode to find
>>> the RAM information, and hdparm -i to find the drive's serial number?
>>
>> Thanks for the reply,I have got that information using dmidecode and
>> various other tools, but is there a way to use snmp protocol to find
>> out this specific information.
>
> It's not built into the Net-SNMP agent,
> but you could always configure an "extend" directive to report this information.
>
> Something like
>
>    extend   dmi   /usr/bin/dmidecode
>
> and then query the tables nsExtendOutput1Table and/or nsExtendOutput2Table
>
> There looks to be a lot of useful information there,
> so it's probably something we could sensibly make use of!
>
> Dave
>

Hi Dave,

root@host0129:/etc/snmp# snmpwalk -v 2c -c local localhost
NET-SNMP-EXTEND-MIB::nsExtendOutput1Table
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."dmi" = STRING: /dev/mem:
Permission denied
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."dmi" = STRING: /dev/mem:
Permission denied
# dmidecode 2.9
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."dmi" = INTEGER: 2
NET-SNMP-EXTEND-MIB::nsExtendResult."dmi" = INTEGER: 1
root@host0129:/etc/snmp# snmpwalk -v 2c -c local localhost
NET-SNMP-EXTEND-MIB::nsExtendOutput2Table
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dmi".1 = STRING: /dev/mem:
Permission denied
NET-SNMP-EXTEND-MIB::nsExtendOutLine."dmi".2 = STRING: # dmidecode 2.9

root@host0129:/etc/snmp# cat snmpd.conf
## RESTRICTED ACCESS,NO CHANGES ALLOWED ##
com2sec readonly 127.0.0.1 local
group webaroo v1 readonly
group webaroo v2c readonly
view all        included        .1      80
view system included  .iso.org.dod.internet.mgmt.mib-2.system
access webaroo "" any noauth exact all none none

## Custom script begins,changes permitted below;be cautious ##
#exec raidcheck '/usr/bin/sudo /opt/snmp/raid.sh'
#exec slavecheck '/usr/bin/sudo /opt/snmp/slave.sh'
#exec slavelagcheck '/usr/bin/sudo /opt/snmp/slavelag.sh  -u replicant
-p SMSreplicant -w 1400 -c 3600'
extend   dmi   /usr/sbin/dmidecode
root@host0129:/etc/snmp# ps aux|grep snmpd
snmp      6785  0.0  0.0  42024  5168 ?        S    15:29   0:00
/usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p
/var/run/snmpd.pid -c /etc/snmp/snmpd.conf
root      8276  0.0  0.0   7628   996 pts/0    S+   15:36   0:00 grep
--color=auto snmpd
root@host0129:/etc/snmp#

Please suggest further

Regards

Kaushal

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.