Sorry for the delay.  I was on vacation for the past few days.

Hmm...  Here's what my walk looks like:

$ snmpwalk -c public targetsystem hrProcessorTable
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.768 = OID: .ccitt.zeroDotZero
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.769 = OID: .ccitt.zeroDotZero
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.770 = OID: .ccitt.zeroDotZero
host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.771 = OID: .ccitt.zeroDotZero


This is a walk of the hrProcessorTable on a system that has two
processors running with hyperthreading to make them look like
four. The system is running the Net-SNMP agent, version 5.1
on Linux with a 2.4.26 kernel.

Here's a walk of hrDeviceType on that same system.

$ snmpwalk -c public targetsystem hrDeviceType
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.768 = OID: host.hrDevice.hrDeviceTypes.hrDeviceProcessor
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.769 = OID: host.hrDevice.hrDeviceTypes.hrDeviceProcessor
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.770 = OID: host.hrDevice.hrDeviceTypes.hrDeviceProcessor
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.771 = OID: host.hrDevice.hrDeviceTypes.hrDeviceProcessor
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1025 = OID: host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1026 = OID: host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1027 = OID: host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1028 = OID: host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1029 = OID: host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1538 = OID: host.hrDevice.hrDeviceTypes.hrDeviceDiskStorage
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.3072 = OID: host.hrDevice.hrDeviceTypes.hrDeviceCoprocessor


I don't know why your agent isn't showing all processors.  Sorry.




Murali Bestha wrote:

Hi All,

Thank you very much for the information.

Hi John,

Can you please tell me how can we count the entries of Host Resources
hrProcessorTable?
I did the following :

snmpwalk -c public localhost hrDeviceType

which returned the following data:

host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.769 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceProcessor
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1025 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1026 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1027 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceNetwork
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1538 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceDiskStorage
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1552 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceDiskStorage
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.1553 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceDiskStorage
host.hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceType.3072 = OID:
host.hrDevice.hrDeviceTypes.hrDeviceCoprocessor


I guess, from the above data, the hrDeviceProcessor entry must represent the CPU processor. But to my surprise, this result is same on a machine where there were 2 processors.

I also did snmpwalk -c public 172.17.12.76 hrProcessorTable which just
resulted in

host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.769 =
OID: .ccitt.zeroDotZero

Can you please let me know how can we count the entries?

Thanks and Regards
Murali

On Tue, 19 Oct 2004 09:18:42 -0700, John Hardin
<[EMAIL PROTECTED]> wrote:


How about counting the number of entryies in the Host Resources
hrProcessorTable.  That works on Linux.



Bruce Shaw wrote:



I don't think that particular bit of code has been implemented on linux.
I'm not sure about HP/UX.  It does work on Solaris.

Patches welcomed.





Can anybody please let me know how can I get the Number of CPU




processors of the system on Linux as well as HP-UX.?








------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ 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

Reply via email to