[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]
Commands Reference, Volume 5
stopsrc Command
Purpose
Stops a subsystem, a group of subsystems, or a subserver.
Syntax
stopsrc [-h Host] [-f | -c] {-a | -g Group | -p SubsystemPID | -s Subsystem }
stopsrc [-h Host] [-f] -t Type [-p SubsystemPID] [-P SubserverPID | -o Object]
Description
The stopsrc command sends a request to the System Resource Controller (SRC) to stop a subsystem, a group of subsystems, or all subsystems.
The stopsrc command sends the System Resource Controller a subsystem request packet that is forwarded to the subsystem for a stop subserver request.
In the absence of the -f (stop force) flag, a normal stop action is assumed. A normal stop requests that a subsystem or subserver complete all current processing, release resources when all application activity has been completed, and then end. No new requests for work should be accepted by the subsystem.
A forced stop requests that a subsystem or subserver end quickly, releasing all resources, but not wait for application activity to complete.
A cancel action stops the subsystem after the subsystem's resources are released and after a grace period.
This grace period is specified in the subsystem object class. The cancel stop is used only for subsystem stops and is always sent to the subsystem as the SIGTERM signal. The subsystem should catch this signal, perform subsystem clean up operations, and end. If the subsystem does not end within the wait time period, specified in the subsystem object class, the subsystem is sent a SIGKILL signal to ensure that the subsystem stops.
If the subsystem uses sockets or message queues for communication, a packet is constructed and sent to the subsystem. If the subsystem uses signals for communication, the subsystem is sent the appropriate signal from the subsystem object class.
Flags
-a |
Specifies that all subsystems are to be stopped. |
-c |
Specifies that the stop request is a canceled stop request. For a cancel stop request, a SIGTERM signal is sent to the subsystem. After the wait time contained in the subsystem object class has passed, if the subsystem has not yet ended, the subsystem is sent a SIGKILL signal. |
-f |
Specifies a forced stop request. |
-g Group |
Specifies that a group of subservers is to be stopped. The command is unsuccessful if the Group name is not contained in the subsystem object class. |
-h Host |
Specifies the foreign Host machine on which this stop action is requested. The local user must be running as "root". The remote system must be configured to accept remote System Resource Controller requests. That is, the srcmstr daemon (see /etc/inittab) must be started with the -r flag and the /etc/hosts.equiv or .rhosts file must be configured to allow remote requests. |
-o Object |
Specifies that a subserver Object value is to be passed to the subsystem as a character string. |
-p SubsystemPID |
Specifies a particular instance of the subsystem to stop, or a particular instance of the subsystem to which the stop subserver request is to be passed. |
-P SubserverPID |
Specifies that a subserver PID is to be passed to the subsystem as a character string. |
-s Subsystem |
Specifies a subsystem to be stopped.
The Subsystem parameter can be the actual subsystem name or the synonym name for the subsystem. The stopsrc command stops all currently active instances of the subsystem. The command is unsuccessful if the Subsystem name is not contained in the subsystem object class. |
-t Type |
Specifies that a subserver is to be stopped.
The stopsrc command is unsuccessful if the Type specified is not contained in the subserver object class. |
Examples
- To stop force a subsystem on a foreign host, enter:
stopsrc -h zork -s srctest -f
This forces a stop on all the instances of the srctest subsystem on the zork machine.
- To stop cancel a subsystem group, enter:
stopsrc -g tcpip -c
This activates a stop cancel on all the subsystems in the tcpip group.
- To stop a subserver, enter:
stopsrc -t tester -p 1234
This stops the tester subserver that belongs to the srctest subsystem with a subsystem PID of 1234.
- To stop all subsystems, enter:
stopsrc -a
This stops all the active subsystems on the local machine.
Files
/etc/objrepos/SRCsubsys |
Specifies the SRC Subsystem Configuration Object Class. |
/etc/objrepos/SRCsubsvr |
Specifies the SRC Subserver Configuration Object Class. |
/etc/services |
Defines the sockets and protocols used for Internet services. |
/dev/SRC |
Specifies the AF_UNIX socket file. |
/dev/.SRC-unix |
Specifies the location for temporary socket files. |
Related Information
The startsrc command.
The System Resource Controller Overview in AIX Version 4.3 System Management Concepts: Operating System and Devices gives an explanation of subsystems, subservers, and the System Resource Controller.
[ Next Article |
Previous Article |
Book Contents |
Library Home |
Legal |
Search ]