Previous | Table of Contents | Next |
You can use the nice command to raise or lower the priority of a command or a process. When you use the nice command without an argument, the default is to increase the nice number by four units, thus lowering the priority of the process.
NOTE: You must be superuser to change the priority of a process by using the nice command.
Use the following command to lower the priority of a command by four units (the default):
/usr/bin/nice command-name
Use the following command to lower the priority of a command by increasing the nice number by ten units:
/usr/bin/nice +10 command-name
NOTE: The plus sign (+) is optional for positive numbers. The minus sign (-) is required for negative numbers.
Use the following command to raise the priority of a command by lowering the nice number by 10 units:
/usr/bin/nice -10 command-name
Use the following command to raise the priority of a command by lowering the nice number by 10 units. The first minus sign is the option sign, and the second minus sign indicates a negative number:
/usr/bin/nice - -10 command-name
The following list provides some tips for troubleshooting problems with processes:
The SunOS 5.x system software provides you with three kinds of administration tools:
The following sections briefly introduce basic SunOS 5.x commands that you are likely to use regularly as part of routine system administration; they are grouped by tasks. See "Basic OS Commands" in Chapter 2 for more frequently used commands. See Appendix A for a list of SunOS 4.x commands and their SunOS 5.x equivalents.
SunOS 5.x system software has a hierarchical file system. When administering systems, you need to know where you are in the file hierarchy and how to change to a different directory.
Finding Where You Are in the File System To find out where you are in the file system hierarchy, type pwd and press Return. The print working directory command displays the current directory.
oak& pwd /etc oak%
Changing Directories To change directories, type cd pathname and press Return. The change directory command puts you in the directory name you type:
oak% cd /usr oak% pwd /usr oak%
If you type cd and press Return without typing a path name, you are returned to the login home directory.
Using the ls command, you can list the contents of a directory and display permissions, links, ownership, group, size (in bytes), modification date and time, and file name for files. Many user problems related to accessing files can be traced to problems with incorrect permissions or ownership. See Chapter 10, "Recognizing File Access Problems," for more information.
To display information about an individual file, type ls -l filename and press Return. Permissions, links, owner, group, file size in bytes, modification date and time, and the file name are displayed:
oak% ls -l /etc/passwd -r--r--r-- 1 root sys 659 Feb 24 17:28 /etc/passwd oak%
To see a complete list for all the files in the directory, type ls -l and press Return. See the ls manual page for a complete list of options.
Previous | Table of Contents | Next |