Open System Services Management and Operations Guide (G06.30+, H06.08+, J06.03+)
3. Change the PATH environment variable in /etc/profile to something similar to the
following:
export PATH=/usr/local/script:/bin:/bin/unsupported:
/usr/ucb:/usr/bin
4. Post a broadcast message to users, using the technique described in “Manually Stopping the
OSS File System and the OSS Environment” (page 47).
This procedure can be used to alter the scheduling priority of any process, including those released
by HP as part of the OSS environment. For example, the following steps decrease the scheduling
priority for the c89 compiler by 15:
1. Put the following lines into a file named /usr/local/script/c89:
#! /bin/sh
nice -n 15 c89 -c *.c
2. Secure the file for only read and execute access by entering:
chmod a=rx /usr/local/script/c89
3. Change the PATH environment variable in /etc/profile to something similar to the
following:
export PATH=/usr/local/script:/bin:/bin/unsupported:/usr/ucb:
/usr/bin
4. Post a broadcast message to users.
Using an OSS Shell Alias
To use a shell alias that changes the default priority of a program, follow these steps:
• Add an alias in /etc/profile. This alias should have the form:
alias program=nice -n nn object_file_path
program
is the program name usually entered by the user as an OSS shell command.
nn
is the priority adjustment for the process.
object_file_path
is the OSS pathname for the program object file to be executed as the process.
When users without their own .profile file attempt to run the program, your alias will be found
instead of the program file.
• Notify those users that have their own .profile file about what you are doing so that they
can make comparable changes to their file.
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 node.
NOTE: Using shell scripts increases system overhead. Be sure that the performance tradeoff is
worthwhile before you use this technique.
To change the default processor for a specific process:
• 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 "$@"
Managing OSS Processes 71