Hi,
I am running the net-snmp 5.1.1 release in Linux enviornment and facing some problem
with the hrMemorySize scalar. It is returning the value as -4 such as follows:
snmpwalk -c public -v1 10.50.127.100:161 hrMemorySize
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: -4 KBytes
Also, I tried to debug the problem and found that the sysconf is returning -1. Refer
file hr_storage.c and the lines are:
#ifdef _SC_PHYS_PAGES
physmem = sysconf(_SC_PHYS_PAGES);
snmp_log(LOG_INFO, "inside _SC_PHYS_PAGES macro %ld\n", physmem);
#else
#ifdef dynix
physmem = sysconf(_SC_PHYSMEM);
#else
auto_nlist(PHYSMEM_SYMBOL, (char *) &physmem, sizeof(physmem));
#endif
#endif
In the above, sysconf call will return "long" value. But in net-snmp code, we declare
the datatype for the variable "physmem" as "static int". This is wrong. In my code, I
changed the declaration to "static long" for "physmem" and tried. I still getting the
same value -1.
Do we need to do anything apart from that or is this a bug? Also, I downloaded the
latest code from the repository and the problem is reproduceable. Anyone faced the
same problem?
Thanks,
Karthik. N
--
______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
Check out our value-added Premium features, such as an extra 20MB for mail storage,
POP3, e-mail forwarding, and ads-free mailboxes!
Powered by Outblaze
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders