Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I am trying to reload the SNMP - Interface Statistics for several cisco devices in my cacti (0.8.6g) install in order to get new interface descriptions from the devices. When I click the little circle I get the following error in my apache error_log file:
Unknown output option passed to -O: U.
USAGE: snmpwalk [OPTIONS] AGENT [OID]
Version: 5.0.6
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1|2c|3 specifies SNMP version to use
-V, --version display package version number
SNMP Version 1 or 2c specific
-c COMMUNITY set the community string
SNMP Version 3 specific
-a PROTOCOL set authentication protocol (MD5|SHA)
-A PASSPHRASE set authentication protocol pass phrase
-e ENGINE-ID set security engine ID (e.g. 800000020109840301)
-E ENGINE-ID set context engine ID (e.g. 800000020109840301)
-l LEVEL set security level (noAuthNoPriv|authNoPriv|authPriv)
-n CONTEXT set context name (e.g. bridge1)
-u USER-NAME set security name (e.g. bert)
-x PROTOCOL set privacy protocol (DES|AES)
-X PASSPHRASE set privacy protocol pass phrase
-Z BOOTS,TIME set destination engine boots/time
General communication options
-r RETRIES set the number of retries
-t TIMEOUT set the request timeout (in seconds)
Debugging
-d dump input/output packets in hexadecimal
-D TOKEN[,...] turn on debugging output for the specified TOKENs
(ALL gives extremely verbose debugging output)
General options
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
-P MIBOPTS Toggle various defaults controlling MIB parsing:
u: allow the use of underlines in MIB symbols
c: disallow the use of "--" to terminate comments
d: save the DESCRIPTIONs of the MIB objects
e: disable errors when MIB symbols conflict
w: enable warnings when MIB symbols conflict
W: enable detailed warnings when MIB symbols conflict
R: replace MIB symbols from latest module
-O OUTOPTS Toggle various defaults controlling output display:
b: do not break OID indexes down
e: print enums numerically
E: escape quotes in string indices
f: print full OIDs on output
n: print OIDs numerically
q: quick print for easier parsing
Q: quick print with equal-signs
s: print only last symbolic element of OID
S: print MIB module-id plus last element
t: print timeticks unparsed as numeric integers
T: print human-readable text along with hex strings
u: print OIDs using UCD-style prefix suppression
v: print values only (not OID = value)
X: extended index format
-I INOPTS Toggle various defaults controlling input parsing:
b: do best/regex matching to find a MIB node
r: do not check values for range/type legality
R: do random access to OID labels
u: top-level OIDs must have '.' prefix (UCD-style)
-C APPOPTS Set various application specific behaviours:
p: print the number of variables found
i: include given OID in the search range
c: do not check returned OIDs are increasing
Ok here's some more info and I think I fixed it....
This is on a RedHat 9.0 box with net-snmp 5.0.6-17. In this version the U parameter is not implemented in this version. (In SuSE 10 net-snmp version 5.2.1-10.2). This option is there.
What I've done is changed the line (around) 234 in lib/snmp.php from:
Basically this removes the "U" parameter from the -O option to snmpwalk. What affects will this have and when was this changed? I do not remember this being an issue in 0.8.6c.
You are using the binary version of net-snmp. The way to fix it is to upgrade net-snmp to 5.2.1 or above or use the php_snmp extension. Of course, what you did works as well...
TheWitness
True understanding begins only when we realize how little we truly understand...
Yes, it does "fix" it, I'm curious if it is the best fix though.
What would upgrading net-snmp gain me (besides the obvious of having the U parameter working as expected. I'm worried about what other issues will I encounter.
What is the difference between the binary version of net-snmp and php_snmp? Is there a performance difference? Is it available in my version of PHP (RH9)?
Since this worked previouslly, why was the U added?
Well in Windows anyway, it provides quicker UI responses for things like data queries and the like. Also, if you are using cmd.php, it will speed polling. Cactid uses the net-snmp API. So, if you use it, you will not see any polling speed changes.
Another benefit, if you are using PHP 5.1.x, php_snmp utilizes bulk walk operations that will again speed the UI from a data query perspective. It's a marginal gain, but good for managing large internet routers.
I am not sure what you can get for RH 9 though. Give me a few months and I will definately know more.
TheWitness
True understanding begins only when we realize how little we truly understand...
Goto the Cacti Web Site and click on the cacti. After doing so, you will see a page with my name on it. At the bottom of the page, you will see if Cacti recognizes the PHP_SNMP extension for your web site.
Let me know what it says.
TheWitness
True understanding begins only when we realize how little we truly understand...
It would appear that even if it has php-snmp support, cacti will still call the net-snmp net-snmp binaries from snmp.php. Is this the expected behavior? From your posts above, it sounds like this is not the expected behavior.
This would only be the expected behavior if your host is snmpv2 and the PHP installation is so old that it does not include the v2 native function calls.
To test you could create a php file with the following "<?php print function_exists("snmp2_walk"); ?>". If the result is 0, the function does not exist. If it's 1, then I don't know.
TheWitness
True understanding begins only when we realize how little we truly understand...
Can you give some good reasons why to upgrade to a newer 4.x series PHP? I am in need of concrete reasons to justify the upgrade (which will impact other services on the machine); more than just "better/faster/newer".