Sun Java System Web Server 7.0 Update 3 Administrator's Guide

Configuring SNMP Using CLI

ProcedureTo Activate SNMP on Solaris

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Deploy the Configuration.


    wadm> deploy-config --user=admin --password-file=admin.pwd 
    --host=serverhost --port=8989 config1
  3. Start the Server Instance.


    $ ./https-test/bin/startserv
  4. Run Master Agent (magt) as root.


    Note –

    To run magt, native snmpd must be stopped.



    $ cd /etc/init.d/
    		   $ init.dmi stop; init.snmpdx stop; init.sma stop

    Remove the file https-admserv/config/logs/pid.masteragt (If present).


    $ rm ./https-admserv/config/logs/pid.masteragt
        	   wadm>  start-snmp-master-agent --snmp-port 161 hostname
  5. Start the Sub Agent.

    Remove the file https-admserv/config/logs/pid.httpagt( If present).


    $ rm ./https-admserv/config/logs/pid.httpagt

    Kill the httpagt if it is already running


    wadm> start-snmp-subagent hostname

ProcedureTo Activate SNMP on Linux

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Deploy the Configuration.


    wadm deploy-config --user=admin --password-file=admin.pwd 
    --host=serverhost --port=8989 config1
  3. Start the Server Instance.


    $ ./https-test/bin/startserv
  4. Run Native Master Agent (snmpd) as root.

    To allow direct communication with snmpd , add the following line in /etc/snmp/snmpd.conf and restart snmpd.

    smuxpeer 1.3.6.1.4.1.42.2.190.1

    view systemview included .1.3.6.1.4.1.42.2.190.1


    # cd /etc/init.d/
          # ./snmpd stop
          # ./snmpd start
  5. Start the Sub Agent.

    Remove the file https-admserv/config/logs/pid.httpagt( If present).


    $ rm ./https-admserv/config/logs/pid.httpagt

    Kill the httpagt if it is already running


    wadm> start-snmp-subagent hostname

ProcedureTo Activate SNMP on Windows

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Add the install-root/ lib directory to the System Path environment variable.

  3. Restart the machine.

  4. Start the Web Server instance using Windows Services option.

  5. Start SNMP Service.


    Note –

    You cannot start the SNMP master agent through the administration interfaces when the Administration Server is installed as a non-root user. To allow a non-root Administration Server user to start master agent through administration interfaces, the non-root user must be given the privileges to bind to the privileged ports using RBAC, which the SNMP master agent runs on. The default SMUX port is 199 and default SNMP port is 161.

    Another workaround is to manually start the master agent as root using the following command:magt CONFIG INIT The magt command is located under server-root/lib/snmp/magt/.


ProcedureTo Configure Peer Based Master Agent (magt)

You can configure peer based master agent to integrate with OS Native Master Agent on Solaris 10 and Linux by following these steps.


Note –

Solaris 10 OS Native Master Agent is snmpd. By default it runs on SNMP default UDP port 161. This is configurable using /etc/sma/snmp/snmpd.conf file. It provides proxy directive for forwarding the request/response to other Master Agents or Subagent. For more information refer to the snmpd.conf man page.

For Solaris 8 and 9, there is no clean integration with OS Native Master Agent snmpd. For linux, httpagt can directly integrate with snmpd. In that case no need to run magt. For Windows, Sun Java System Web Server snmp library directly communicates with windows SNMP service.


  1. Start the master agent specifying the SNMP port (11161) as mentioned in the note above.

  2. Add the following in /etc/sma/snmp/snmpd.conf for Solaris 10 .


    proxy -v 1 -c public myserver:11161 .1.3.6.1.4.1.42.2.190.1
  3. Restart the snmpd.


    # cd /etc/init.d
    # init.dmi stop; init.snmpdx stop; init.sma stop
    # init.dmi start; init.snmpdx start; init.sma start
  4. To get the SNMP data use the snmpwalk on port:


    $ snmpwalk -c public -v 1 <host-name>:<port> 1.3.6.1.4.1.42.2.190.1