Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I wanted my Net-SNMP app to not truncate my log file when restarted. I don't know how to use the option -A for snmptrapd in order for it to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2014
    Posts
    2

    Net-SNMP truncates log file when restarted


    Hi,

    I wanted my Net-SNMP app to not truncate my log file when restarted. I don't know how to use the option -A for snmptrapd in order for it to not truncate its log file whenever the application is restarted.

    Help will be very much appreciated. Thank you!

  2. #2
    Linux Guru
    Join Date
    Dec 2013
    Posts
    1,562
    How it is started will vary with your platform so you should post some platform info but in the mean time, if it is being started from an rc script you can run the command below and see if snmpd shows up. If it does edit the files it is in to add the -A to the command line. The command will show all the scripts being run by init.
    Code:
    for each in {1..6}; do echo /etc/rc${each}.d;  ls /etc/rc${each}.d; done

  3. #3
    Just Joined!
    Join Date
    Mar 2014
    Posts
    2
    We restart it using this command:

    Code:
    /etc/init.d/snmptrapd restart
    I'm sorry but I am not familiar with rc script.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Dec 2013
    Posts
    1,562
    Open /etc/init.d/snmptrapd in an editor as root or sudo and add the -A to the OPTIONS variable.

  6. #5
    Just Joined!
    Join Date
    Feb 2014
    Posts
    6
    Quote Originally Posted by gregm View Post
    Open /etc/init.d/snmptrapd in an editor as root or sudo and add the -A to the OPTIONS variable.
    Have been stuck! Thanks for the valuable share

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •