[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

chssys Command

Purpose

Changes a subsystem definition in the subsystem object class.

Syntax

chssys -s OldSubsystem [ -a Arguments ] [ -e StandardError ] [ -i StandardInput ] [ StandardOutput ] [ -p Path ] [ -s NewSubsystem ] [ -t Synonym ] [ -u UserID ] [ -O -R ] [ -d | -D ] [ -q | -Q ] [ -K | [-I MessageQueue -m MessageMtype -f StopForce -n StopNormal -S]  [ -E Nice ] [ -G Group ] [ -w Wait ]

Description

The chssys command modifies an existing subsystem definition in the subsystem object class. If a new subsystem name is entered, the Subserver Type object class and the Notify object class are modified to reflect the new subsystem name.

Note: Any auditing performed by the System Resource Controller (SRC) when actions are taken for the subsystem is logged against the login ID of the user who created the subsystem by using the mkssys command. For example, if you are logged in with root user authority, the subsystem is added with root user authority as the audit account.

Flags

-a Arguments Specifies any arguments that must be passed to the program executed as the subsystem. These command Arguments are passed by the SRC to the subsystem according to the same rules used by the shell. Quoted strings are passed as a single argument, and blanks outside a quoted string delimit arguments. Single and double quotes can be used.
-d Specifies that an inactive subsystem is displayed when the lssrc -a command request (status all) or the lssrc -g command request (status group) is made.
-D Specifies that an inactive subsystem is not displayed when status all or status group requests are made.
-e StandardError Specifies where the subsystem standard error data is placed.
-E Nice Specifies the Nice value. The Nice parameter changes the execution priority of the subsystem. The valid values are 0 through 39 (ordinary Nice values mapped to all positive numbers). If the -E flag is not present, the subsystem priority defaults to 20. Values between 0 and 19 are reserved for users with root authority.
-f StopForce Specifies the signal sent to the subsystem when a forced stop of the subsystem is requested. Use only when the subsystem uses signals for communication. The chssys command is unsuccessful if the StopForce parameter specifies an invalid signal. The -n and -S flags must follow this flag.
-G Group Specifies that the subsystem belongs to the group specified by the Group parameter and responds to all group actions on the group.
-i StandardInput Specifies where the subsystem StandardInput is routed. This field is ignored when the subsystem uses sockets for communication.
-K Specifies that the subsystem uses sockets as its communication method.
-I MessageQueue Specifies that the subsystem uses message queues as its communication method. The MessageQueue parameter specifies the message queue key for creating the message queue for the subsystem. Use the ftok subroutine with the subsystem path name as input to generate a unique key. The -m flag must follow this flag.
-m MessageMtype Specifies the MessageMtype key that the subsystem expects on packets sent to the subsystem by the SRC. Use only when the subsystem uses message queues for communication. The MessageMtype must be greater than 0. This flag must be preceded by the -l flag.
-n StopNormal Specifies the signal sent to the subsystem when a normal stop of the subsystem is requested. Use only when the subsystem uses signals for communication. The chssys command is unsuccessful if the StopNormal parameter specifies an invalid signal. This flag must be preceded by the -f flag and followed by the -S flag.
-o StandardOutput Specifies where the subsystem StandardOutput is placed.
-O Specifies that the subsystem is not restarted if it stops abnormally.
-p Path Specifies the absolute Path to the subsystem program.
-q Specifies that the subsystem can have multiple instances running at the same time.
-Q Specifies that multiple instances of the subsystem are not allowed to run at the same time.
-R Specifies that the subsystem is restarted if it stops abnormally.
-s NewSubsystem Specifies the new name that uniquely identifies the subsystem. Any subservers or notify methods defined for the old subsystem's name are redefined for the NewSubsystem name. The chssys command is unsuccessful if the NewSubsystem name is already known in the subsystem object class.
-s OldSubsystem Specifies the current name that uniquely identifies the subsystem. The chssys command is unsuccessful if the OldSubsystem name is not known in the subsystem object class.
-S Specifies that the subsystem uses signals as its communication method. You cannot define subservers for the subsystem name when your communication method is signals. If a subserver is defined for the subsystem, the subserver definitions are deleted from the subserver object class. This flag must be preceded by the -f and -n flags.
-t Synonym Specifies an alternate name for the subsystem. The chssys command is unsuccessful if the Synonym name is already known in the subsystem object class.
-u UserID Specifies the user ID for the subsystem. The UserID that creates the subsystem is used for security auditing of that subsystem.
-w Wait Specifies the time, in seconds, allowed to elapse between a stop cancel (SIGTERM) signal and a subsequent SIGKILL signal. Also used as the time limit for restart actions. If the subsystem stops abnormally more than twice in the time limit specified by the Wait value, it is not automatically restarted.

Security

Auditing Events: If the auditing subsystem has been properly configured and is enabled, the chssys command will generate the following audit record (event) every time the command is executed:

Event Information
SRC_Chssys Lists in an audit log the name of the subsystem and the fields that have been changed.

See "Setting up Auditing" in AIX Version 4.3 System Management Guide: Operating System and Devices for details about properly selecting and grouping audit events, and configuring audit event data collection.

Examples

  1. To change the subsystem name, enter:
    chssys -s srctest -s inetd
    This changes the subsystem name from srctest to inetd.
  2. To change the communication type to sockets, enter:
    chssys -s srctest -K
    This changes the communication type for the subsystem to sockets.
  3. To change the communication type to message queues, enter:
    chssys -s srctest -l 123456 -m 789
    This changes the communication type for the subsystem to message queues, with a message queue key of 123456 and a subsystem message type of 789.
  4. To change the communication type to signals, enter:
    chssys -s srctest -S -n 30 -f 31
    This changes the communication type for the subsystem to signals, with a normal stop signal of 30 and a force stop signal of 31.
  5. To change the command arguments, enter:
    chssys -s srctest -a "-a 123 -b \"4 5 6\" -c '7 8 9'"
    This places -a as the first argument, 123 as the second, -b as the third, 4 5 6 as the fourth, -c as the fifth, and 7 8 9 as the sixth argument to the srctest subsystem.

Files

/etc/objrepos/SRCsubsys Specifies the SRC Subsystem Configuration object class.
/etc/objrepos/SRCsubsvr Specifies the SRC Subserver Configuration object class.
/etc/objrepos/SRCnotify Specifies the SRC Notify Method object class.
/dev/SRC Specifies the AF_UNIX socket file.
/dev/.SRC-unix Specifies the location for temporary socket files.

Related Information

The auditpr command, lssrc command, mkssys command, rmssys command.

Auditing Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.

System Resource Controller Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.

Defining Your Subsystem to the SRC in AIX General Programming Concepts: Writing and Debugging Programs.

System Resource Controller (SRC) Overview for Programmers in AIX General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]