For anyone working with AIX, the System Resource Controller (SRC) is an essential tool. Think of it as a facilitator that helps system admins and users to manage and oversee different processes and programs more efficiently. Let’s break this down:
What’s a Subsystem? Imagine a software module that can operate on its own or as part of a larger system. That’s a subsystem. Its primary role? To perform a specific function. Think of it as a unit of a program that does a particular job.
Features of SRC:
- It oversees related programs that come together to do a specific task.
- These programs can further be broken down into ‘subservers’, commonly known as daemons.
- The SRC manages these subsystems and their daemons, organizing them into groups for better control.
- With SRC, you can start, stop, monitor, and update these subsystems and daemons easily.
- And here’s a fun fact: When you boot up your system, SRC starts automatically. This is thanks to an entry for
/usr/bin/srcmstrdaemon in the
Understanding SRC’s Components:
- Subserver: These are individual programs or processes that belong to a subsystem. Examples include
- Subsystem: This is like a container that holds multiple subservers. Its job is to start, stop, and monitor them. Some examples are
- Subsystem Group: When you group multiple subsystems under one umbrella, you get a subsystem group. This makes it easy to control them all at once. For instance, groups like TCP/IP, Network Information System (NIS), and Network File Systems (NFS) are such examples.
To visualize, imagine a group called “tcp/ip”. Under it, there’s a subsystem named “inetd”. Within this subsystem, there’s a subserver or daemon known as “ftp”.
SRC Commands at a Glance:
- Operational Commands:
srcmstr: Initiates the SRC.
startsrc: Fires up a subsystem, group, or subserver.
stopsrc: Halts the aforementioned elements.
refresh: Updates a subsystem.
tracesoff: Turns tracking for a subsystem or subserver on or off.
lssrc: Checks a subsystem’s status.
- Examples of Command Usage:
lssrc -a: View the status of all subsystems.
startsrc -s inetd: Get
stopsrc -g tcpip: Stop the
kill [PID of process]: End a process not initiated by srcmstr.
- Configuration Commands:
mkssy: Sets up a new subsystem.
chssys: Modify parameters of an existing subsystem.
rmssys: Deletes a subsystem.
# mkssys -p /usr/sbin/sshd \ /* Absolute path to the subsystem executable program. */ -s sshd_adm \ /* Name that uniquely identifies the subsys. */ -u 0 \ /* User id for the subsystem. */ -a "-D -f /etc/ssh/sshd_config_adm" \ /* Arguments that must be passed to the command. */ -e /dev/console \ /* Where the subsystem standard error data is placed. */ -i /dev/console \ /* Where the subsys. standard input is routed. */ -o /dev/console \ /* Where the subsys. standard output is placed. */ -R \ /* Subsystem is restarted if the subsystem stops abnormally. */ -Q \ /* Multiple instances of the subsystem are not allowed to run at the same time. */ -S \ /* Subsystem uses the signals communication method. */ -f 9 \ /* Signal sent to the subsystem when a forced stop of the subsystem is requested. */ -n 15 \ /* Signal sent to the subsystem when a normal stop of the subsystem is requested. */ -E 20 \ /* Execution priority of the subsystem. */ -G ssh \ /* Subsystem belongs to the group specified. */ -d \ /* Inactive subsystems are displayed when the lssrc -a command request is made. */ -w 20 /* Time, in seconds, allowed to elapse between a stop cancel (SIGTERM) signal and a subsequent SIGKILL signal. */ Check the service's configuration: # lssrc -S -s sshd_adm #subsysname:synonym:cmdargs:path:uid:auditid:standin:standout:standerr:action:multi:contact:svrkey:svrmtype:\ priority:signorm:sigforce:display:waittime:grpname: sshd_adm::-D -f /etc/ssh/sshd_config_adm:/usr/sbin/sshd:0:0:/dev/console:/dev/console:/dev/console:-R:-Q:-S:0:0:\ 30:25:9:-d:20:ssh: # odmget -q subsysname=sshd_adm SRCsubsys SRCsubsys: subsysname = "sshd_adm" synonym = "" cmdargs = "-D -f /etc/ssh/sshd_config_adm" path = "/usr/sbin/sshd" uid = 0 auditid = 0 standin = "/dev/console" standout = "/dev/console" standerr = "/dev/console" action = 1 multi = 0 contact = 2 svrkey = 0 svrmtype = 0 priority = 20 signorm = 15 sigforce = 9 display = 1 waittime = 20 grpname = "ssh"