Find the answer to your Linux question:
Results 1 to 6 of 6

Thread: SNMP restart

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    SNMP restart


    Hi all
    I need to restart snmp under Solaris 5.8
    Does anyone know the comand?
    I´ve tried svcadm restart svc:/application/management/sma:default, but it doesn´t seem to work under this distribution

    Thanks a lot

  2. #2
    You should be able to start, stop and restart SNMP via init scripts. Try the following commands:

    Code:
    # Start SNMP
    /etc/init.d/init.snmpdx stop 
    
    # Stop SNMP
    /etc/init.d/init.snmpdx start
    
    # Restart SNMP
    /etc/init.d/init.snmpdx restart
    Let us know if that doesn't work.
    “Things derive their being and nature by mutual dependence and are nothing in themselves.”

  3. #3
    Thank you so much
    But unfortunatelly it didn´t work
    It says the only available options are start or stop, which doesn´t work for me, I really need to restart snmpd.
    Any other ideas? lol, thanks again

  4. $spacer_open
    $spacer_close
  5. #4
    Quote Originally Posted by susanoba View Post
    It says the only available options are start or stop, which doesn´t work for me, I really need to restart snmpd.
    As far as I remember, restarting a daemon is often implemented as stopping it and starting it again. Sometimes something is also done in the middle, between stopping and starting; I don't know how often that occurs, however.

    What happens if you explicitly stop the daemon and start it again?

  6. #5
    Hmm, do you need it to do anything special while it's restarting? If not, you can write a very simple script that simply stops and starts the daemon:

    Code:
    #!/bin/bash
    
    /etc/init.d/init.snmpdx stop 
    /etc/init.d/init.snmpdx start
    Or you can actually manually edit the init script and add the restart function. In most daemons I know all this does is simply call the 'start' and 'stop' functions from within the script. Some init scripts might do something special though, I'm not 100% sure with SNMP.
    “Things derive their being and nature by mutual dependence and are nothing in themselves.”

  7. #6
    Thank you all for your input, and sorry for just replying now, been kinda busy!
    I already solved the issue
    The problem was that I wasn´t restarting the correct deamon of snmp, the correct one was located in the following path /etc/rc2.d/S99ucdsnmp and then I just needed to add the command restart.
    I also needed this, because I added a new script to snmpd.conf, so that a new service to monitor a server would work on nagios, and the only way for the script to be recognized was to restart the snmp deamon.

    Well problem solved, and thank you all so much for your help and for your input

    Have a wonderfull day

Posting Permissions

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