Re: command line options vs. snmp.conf
On Tue, 2005-11-29 at 10:22 -0800, Wes Hardaker wrote: Sadly, it's not a bug. It's a feature!!! It's a long standing issue. precedence for net-snmp, which is quite unique to our package, is in order (1 being trumped by 2): 1) short command line arguments 2) config files 3) long command line arguments Hmmm... No - sorry, Wes. I've given that due consideration, and am of the same opinion. This behaviour is a bug - whether or not it's documented as a feature. After all, if I set defaultCommunity public in my .snmp/snmp.conf file, and then run snmpget -c private localhost sysContact.0 then the request will use the community string private not public - exactly as I'd expect. According to your description above, the config file setting (public) should take precedence over the short command line argument -c private. But it doesn't, and it's right not to. Having (visible) command-line arguments ignored because of (invisible) config settings is Just Plain Wrong. At the very least, this should issue a warning. But it would be better to fix things so that the command line arguments take precedence, just as everyone naturally expects. Dave --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ 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
Re: command line options vs. snmp.conf
On Wed, 30 Nov 2005 10:39:10 +, Dave Shield [EMAIL PROTECTED] said: Dave According to your description above, the config file Dave setting (public) should take precedence over the Dave short command line argument -c private. Dave But it doesn't, and it's right not to. That's unfortunately one of the exceptions because there is specific logic there being used. The issue stems from how things work: - we parse command line options *before* reading configuration, since configuration could be affected. - -- based command line options are saved till (*) - config files are parsed - options saved from (*) are replayed as configuration file tokens Sometimes the precedence works like you'd expect (-c) and sometimes it doesn't (oid output formatting). The sad thing is that this all stems from a backwards-compatibility decision that I no longer even remember from back in the 4-5 transition phase. Part of it is that the default store stuff is used in a lot of places, and it has no knowledge of what should trump what because from it's perspective something is telling it to change the value. This is what will need a lot of reworking to make it behave properly. It's definitely 5.4 material, if someone has the energy. Dave But it would be better to fix things so that the command Dave line arguments take precedence, just as everyone naturally Dave expects. Agreed. It's the details that make it tricky. If you want someone to blame, feel free to blame me ;-) -- Wes Hardaker Sparta, Inc. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ 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
Re: command line options vs. snmp.conf
On Thu, 10 Nov 2005 09:17:05 +, Dave Shield [EMAIL PROTECTED] said: The output formatting options that I specify on the command line do not appear to override the options found in my ~/.snmp/snmp.conf file. if I remove oidOutputFormat from my snmp.conf file and specify both -Of and -Os on the command-line, the last option always takes precedence. Shouldn't this also apply to options read from the snmp.conf file? Dave That certainly sounds like a bug to me. Sadly, it's not a bug. It's a feature!!! It's a long standing issue. precedence for net-snmp, which is quite unique to our package, is in order (1 being trumped by 2): 1) short command line arguments 2) config files 3) long command line arguments (which are config file tokens prefixed by --). IE, add --oidOutputFormat=WHATEVER to your command line and you'll find it overrides the config file. -- Wes Hardaker Sparta, Inc. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ 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
Re: command line options vs. snmp.conf
On Fri, 2005-11-04 at 15:25 -0500, Bradford Ritchie wrote: The output formatting options that I specify on the command line do not appear to override the options found in my ~/.snmp/snmp.conf file. if I remove oidOutputFormat from my snmp.conf file and specify both -Of and -Os on the command-line, the last option always takes precedence. Shouldn't this also apply to options read from the snmp.conf file? That certainly sounds like a bug to me. I haven't had a chance to investigate properly yet - mostly because we're concentrating on getting the next releases out of the door. Can I suggest that you log this problem in the bug database (so it doesn't get lost completely), and one of us will try to take a look at it when things get a little less chaotic. Dave --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ 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
Re: command line options vs. snmp.conf
Sure thing. I suppose I should take the time to figure out which options are affected and which (such as -c -v) are not. Thanks. -- BradOn 11/10/05, Dave Shield [EMAIL PROTECTED] wrote: On Fri, 2005-11-04 at 15:25 -0500, Bradford Ritchie wrote: The output formatting options that I specify on the command line do not appear to override the options found in my ~/.snmp/snmp.conf file. if I remove oidOutputFormat from my snmp.conf file and specify both -Of and -Os on the command-line, the last option always takes precedence.Shouldn't this also apply to options read from the snmp.conf file?That certainly sounds like a bug to me. I haven't had a chance to investigate properly yet - mostly becausewe're concentrating on getting the next releases out of the door.Can I suggest that you log this problem in the bug database(so it doesn't get lost completely), and one of us will try to take a look at it when things get a little less chaotic.Dave
Re: command line options vs. snmp.conf
This is getting pretty frustrating actually the more I use the various commands. The config files should allow me to set my own defaults but shouldn't lock me into those choices. Now I can't get more verbose output unless I comment out or rename my snmp.conf file first. If I were to come up with a change that didn't change the way any of the options functioned, just the order in which they are applied, would there be a chance of it getting put into the next version? At this point I'm just talking tough... I imagine this would probably be quite difficult and take someone like myself a very long time to do. -- BradOn 11/7/05, Marc Wiatrowski [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Bradford Ritchie I can override the version and community string on the command line using -v and -c.But the oidOutputFormat is always used even if I specify -Of on the command line.In contrast, if I remove oidOutputFormat from my snmp.conf file and specify both -Of and -Os on the command-line, the last option always takes precedence.Shouldn't this also apply to options read from the snmp.conf file?I have wondered about this annoying feature as well.Doesanyone know?marc
Re: command line options vs. snmp.conf
Bradford Ritchie wrote: This is getting pretty frustrating actually the more I use the various commands. The config files should allow me to set my own defaults but shouldn't lock me into those choices. Now I can't get more verbose output unless I comment out or rename my snmp.conf file first. Will the --oidOutputFormat=3 command-line option keep you with us as a happy user? :-) +Thomas --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ 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
RE: command line options vs. snmp.conf
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bradford Ritchie I can override the version and community string on the command line using -v and -c. But the oidOutputFormat is always used even if I specify -Of on the command line. In contrast, if I remove oidOutputFormat from my snmp.conf file and specify both -Of and -Os on the command-line, the last option always takes precedence. Shouldn't this also apply to options read from the snmp.conf file? I have wondered about this annoying feature as well. Does anyone know? marc --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ 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