2009/2/23 B V Narasimhulu <[email protected]>:
> I want to direct the messages of snmp_log () with priority 0 to 6, to logfile 
> /var/lod/snmpd.log,
> and the messages with priority LOGDEBUg to a file /var/log/snmp_debug.log 
> file.
> For this, i'm seeting the arguments as below. Is it correct ?

Close, but not quite:

> ./snmpagent -Lf 0-6 /var/log/snmpd.log -Lf 7 /var/log/snmp_debug.log.

   $ man snmpcmd

   LOGGING OPTIONS
       -Lf FILE
              Log messages to the specified file.

       There  are  also  "upper case" versions of each of these options, which
       allow the corresponding logging mechanism to be restricted  to  certain
       priorities of message...

       -LF pri FILE
              will log messages of priority 'pri' and above to the
specified file.

       -LF p1-p2 FILE
              will log messages with priority between 'p1'  and  'p2'  (inclu-
              sive) to the specified file.

Dave

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to