Open System Services Management and Operations Guide (G06.25+, H06.03+)
Managing With the Shell
Open System Services Management and Operations Guide—527191-002
9-8
Slow Performance
Slow Performance
Slow performance might be the result of many processes left running that are no
longer being used. One way to check is to enter an OSS command such as:
ps | sort -nr +2
This command lists the output of the ps command in reverse order by the TIME field.
The processes that have run for the longest time are at the top of the list. You can then
decide whether to remind the users to stop their processes, let things be, or terminate
the offending processes with the OSS shell kill command.
Overuse of Resources
Large files that haven’t been accessed in a long time might waste resources and
prevent users from being able to create files. You might want to find users who have
such files in their directories and discuss the situation with them.
You can list the owners of large files using an OSS shell command such as the
following, which lists detailed information (including the owners) about files in /usr
that are larger than 1000 kilobytes:
find /usr -size +1000K | xargs ls -l
Open System Services also provides the disk usage utilities du and df.
Controlling the Growth of Directories
The vi text editor and other programs produce temporary files that you might later
want to remove. You might also want to remove large files that have not been
accessed in a long time. This subsection describes how to remove such files.
The find command searches for files that match criteria you set; for example, it can
find all the files in a directory that have not been accessed in a specified number of
days. It can then perform an action you specify, such as deleting the files it finds. For
detailed information about the find command, see the find(1) reference page
either online or in the Open System Services Shell and Utilities Reference Manual.
You can create shell scripts that use the find command to delete files and then invoke
the scripts periodically with either the OSS shell cron command or the optional
Guardian NetBatch product, as described in Scheduling Periodic Tasks on page 2-34.
You would invoke the OSS environment with the TACL OSH command. You can run a
single OSS shell command such as find from within a NetBatch job by using a job file
that contains the following OSH command line:
OSH <- >outlog 2>errlog -c "command"
Note. OSS file opens do not work on Guardian processes such as the NetBatch process
$ZBAT. To work around this, redirect stdin, stdout, and stderr to files that can be opened
by the OSS environment, or close these files if they are not being used.