This article outlines the commands used to control the up.time agent on Solaris 10 and Solaris 11.
/etc/inet/servicesin a text editor.
Find the following entry in the file:
uptimeagent 9998/tcp # up.time agent
9998/tcpto the port on which you want the agent to listen.
To change agent user permissions, enter the following command at the command line:
inetadm -m svc:/network/uptimeagent/tcp:default user="username"
username is the name of the new agent user.
To start the agent service, enter the following command at the command line:
svcadm enable network/uptimeagent/tcp
To stop the agent service, enter the following command at the command line:
svcadm disable network/uptimeagent/tcp
svcs -l network/uptimeagent/tcp
Enter the following command at the command line to verify that the inetd-dependent services are running:
svcs -l network/inetd
Confirm the status of any security restrictions on the agent service with the following commands:
# inetadm -l network/uptimeagent/tcp | grep wrappers # svcprop -p defaults inetd | grep wrappers # cat /etc/hosts.allow # cat /etc/hosts.deny
To manually add an agent, enter the following commands:
# cp uptimeagent-tcp.xml /var/svc/manifest/network # svccfg import /var/svc/manifest/network/uptimeagent-tcp.xml
uptimeagent-tcp.xml is the file that contains the settings for the uptimeagent service.
The first command stops the agent service and the subsequent commands remove the agent service.
# svcadm disable network/uptimeagent/tcp # svccfg delete network/uptimeagent/tcp # rm ?f /var/svc/manifest/network/uptimeagent-tcp.xml
Use the following command to refresh the agent settings:
svcadm refresh network/uptimeagent/tcp
To set the agent service to start with the operating system, enter the following command:
svcadm enable <FMRI>
<FMRI> is the Fault Management Resource Identifier, which is the formal name for a resource on which Solaris 10 can perform automated fault management.