Open System Services Management and Operations Guide (G06.29+, H06.07+)
Operating the OSS Environment
Open System Services Management and Operations Guide—527191-005
2-33
Managing OSS Process Processor Use
Managing OSS Process Processor Use
You can also use OSS shell scripts or aliases to force specific processes to execute in
specific processors to distribute the work load within your NonStop S-series or
NonStop NS-series node.
To change the default processor for a specific process:
1. Create a script file that has the same name as the program for which you want to
change the default processor. Put the following information in the script file:
#! /bin/sh
run -cpu=nn object_file_path "$@"
nn
is the processor number of the processor you want the process to run in.
object_file_path
is the OSS pathname for the program object file to be executed as the process.
"$@"
causes any parameters entered for the process to be sent to the process.
2. Place the script file in a special directory you control, secured so that it can be
executed by everyone but not altered by anyone.
3. Add your special directory to the PATH environment variable used to find program
files. You need to do this only the first time you create such a script, provided you
always use the same OSS directory.
Most users use the PATH definition in /etc/profile, so change that file such
that your special directory is searched first.
4. Notify those users that have their own .profile file or otherwise alter the PATH
variable about what you are doing so that they can make comparable changes to
their definitions of PATH.
For example, the following steps change the system to run all C language program
compilations in processor 4:
1. Put the following lines into a file called /usr/local/script/c89:
#! /bin/sh
run -cpu=4 /usr/bin/c89 "$@"
2. Secure the file for only read and execute access by entering:
chmod a=rx /usr/local/script/c89
Note. Using shell scripts increases system overhead. Be sure that the performance tradeoff is
worthwhile before you use this technique.