|
|||
1. Managing Terminals and Modems (Overview) 2. Setting Up Terminals and Modems (Tasks) 3. Managing Serial Ports With the Service Access Facility (Tasks) 4. Managing System Resources (Overview) 5. Displaying and Changing System Information (Tasks) 8. Scheduling System Tasks (Tasks) 9. Managing System Accounting (Tasks) 10. System Accounting (Reference) 11. Managing System Performance (Overview) 12. Managing System Processes (Tasks) Managing System Processes (Task Map) Commands for Managing System Processes How to Display Information About Processes How to Terminate a Process (pkill) How to Terminate a Process (kill) Managing Process Class Information (Task Map) Managing Process Class Information How to Display Basic Information About Process Classes (priocntl) How to Display the Global Priority of a Process How to Designate a Process Priority (priocntl) How to Change Scheduling Parameters of a Timesharing Process (priocntl) Troubleshooting Problems With System Processes 13. Monitoring System Performance (Tasks) 14. Troubleshooting Software Problems (Overview) 16. Managing Core Files (Tasks) 17. Managing System Crash Information (Tasks) 18. Troubleshooting Miscellaneous Software Problems (Tasks) 19. Troubleshooting File Access Problems (Tasks) 20. Resolving UFS File System Inconsistencies (Tasks) |
Managing Process Class InformationThe following list identifies the process scheduling classes that can be configured on your system. Also included is the user priority range for the timesharing class. The possible process scheduling classes are as follows:
Changing the Scheduling Priority of Processes (priocntl)The scheduling priority of a process is the priority assigned by the process scheduler, according to scheduling policies. The dispadmin command lists the default scheduling policies. For more information, see the dispadmin(1M) man page. You can use the priocntl command to assign processes to a priority class and to manage process priorities. For instructions on using the priocntl command to manage processes, see How to Designate a Process Priority (priocntl). How to Display Basic Information About Process Classes (priocntl)Example 12-5 Displaying Basic Information About Process Classes (priocntl)The following example shows output from the priocntl -l command. # priocntl -l CONFIGURED CLASSES ================== SYS (System Class) TS (Time Sharing) Configured TS User Priority Range: -60 through 60 FX (Fixed priority) Configured FX User Priority Range: 0 through 60 IA (Interactive) Configured IA User Priority Range: -60 through 60 How to Display the Global Priority of a Process
The following example shows ps -ecl command output. The values in the PRI column show that the pageout process has the highest priority, while the sh process has the lowest priority. $ ps -ecl F S UID PID PPID CLS PRI ADDR SZ WCHAN TTY TIME COMD 19 T 0 0 0 SYS 96 f00d05a8 0 ? 0:03 sched 8 S 0 1 0 TS 50 ff0f4678 185 ff0f4848 ? 36:51 init 19 S 0 2 0 SYS 98 ff0f4018 0 f00c645c ? 0:01 pageout 19 S 0 3 0 SYS 60 ff0f5998 0 f00d0c68 ? 241:01 fsflush 8 S 0 269 1 TS 58 ff0f5338 303 ff49837e ? 0:07 sac 8 S 0 204 1 TS 43 ff2f6008 50 ff2f606e console 0:02 sh How to Designate a Process Priority (priocntl)
The following example shows how to start the find command with the highest possible user-supplied priority. # priocntl -e -c TS -m 60 -p 60 find . -name core -print # ps -ecl | grep find How to Change Scheduling Parameters of a Timesharing Process (priocntl)
The following example shows how to execute a command with a 500-millisecond time slice, a priority of 20 in the RT class, and a global priority of 120. # priocntl -e -c RT -m 500 -p 20 myprog # ps -ecl | grep myprog How to Change the Class of a Process (priocntl)
The following example shows how to change all the processes that belong to user 15249 to real-time processes. # priocntl -s -c RT -i uid 15249 # ps -ecl | grep 15249 Changing the Priority of a Timesharing Process (nice)The nice command is only supported for backward compatibility to previous Solaris releases. The priocntl command provides more flexibility in managing processes. The priority of a process is determined by the policies of its scheduling class and by its nice number. Each timesharing process has a global priority. The global priority is calculated by adding the user-supplied priority, which can be influenced by the nice or priocntl commands, and the system-calculated priority. The execution priority number of a process is assigned by the operating system. The priority number is determined by several factors, including the process's scheduling class, how much CPU time it has used, and in the case of a timesharing process, its nice number. Each timesharing process starts with a default nice number, which it inherits from its parent process. The nice number is shown in the NI column of the ps report. A user can lower the priority of a process by increasing its user-supplied priority. However, only superuser can lower a nice number to increase the priority of a process. This restriction prevents users from increasing the priorities of their own processes, thereby monopolizing a greater share of the CPU. The nice numbers range from 0 to +39, with 0 representing the highest priority. The default nice value for each timesharing process is 20. Two versions of the command are available: the standard version, /usr/bin/nice, and the C shell built-in command. How to Change the Priority of a Process (nice)Using this procedure, a user can lower the priority of a process. However, superuser can raise or lower the priority of a process. Note - This section describes the syntax of the /usr/bin/nice command and not the C-shell built-in nicecommand. For information about the C-shell nice command, see the csh(1) man page.
See AlsoFor more information, see the nice(1) man page. |
||
|