Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
Managing Guardian Processes From the OSS Shell
The OSS ps utility displays information on OSS processes. Additionally, you can use the ps utility
to display information on Guardian processes by using the -W parameter.
The following shows different ways of using the ps utility for Guardian processes:
ps -W all displays status of all Guardian processes.
ps -W name=/G/SVR1 displays status of Guardian process $SVR1.
ps -W cpu=5 displays status of all processes running in processor 5.
The OSS kill utility can be used to terminate Guardian and OSS processes. The kill utility
uses a signal named GUARDIAN for terminating Guardian processes.
The syntax to specify a Guardian process in a kill utility is /G/processname or /G/cpu,pin.
The following examples show each syntax. The first example terminates the Guardian process
named $SVR1; the second example terminates the Guardian process 5,48:
kill -s GUARDIAN /G/SVR1
The equivalent Guardian command for this example is STOP $SVR1.
kill -s GUARDIAN /G/5,48
The equivalent Guardian command for this example is STOP 5,48.
Manipulating Guardian Files From the OSS Shell
This subsection provides information on accessing Guardian files and performing other file
operations such as moving, copying, listing, and changing attributes.
The OSS file system is responsible for enabling the transparent read access of EDIT files for all
programs executing in the OSS environment. Thus, all the standard OSS utilities—such as cat,
more, and grep, and programs that you write—are able to access EDIT files (type 101) and
odd-unstructured files (types 0, 100, and 180). EDIT files can be read and, by using OSSTTY, they
can also be written; odd-unstructured files can be read and written.
The following example command displays the file $SYSTEM.ZTCPIP.HOSTS:
more /G/system/ztcpip/hosts
The following example command searches for the string ftp in the file $SYSTEM.ZTCPIP.SERVICES:
grep ftp /G/system/ztcpip/services
The chgrp and chown Utilities
Use the chgrp utility to change the group ownership of a file or directory; use the chown utility
to change the owner of a file or directory.
The Guardian security rules and restrictions apply when an attempt is made to change the group
or user ownership of a file in the /G directory or in a Guardian file system portion of the /E
directory. Group or user ownership of a file can normally be given to a group or user only by a
user with the 65535 super ID. Refer to the Guardian User’s Guide for more information on the
Guardian file security features.
The chmod Utility
Use the chmod utility to change permission codes on only OSS files. Access permissions on a
Guardian file cannot be set using chmod. After a file is created in the /G file system, you cannot
change its permissions with chmod.
68 Interoperating Between User Environments