Home > Articles > Operating Systems, Server > Solaris

  • Print
  • + Share This
This chapter is from the book

6.4 Process Manager

Both Solaris desktop environments-CDE and JDS-provide a GUI based Process Manager utility that can be used for monitoring and controlling systems processes. The advantage of using this GUI based Processor Manager is that you can monitor and control system processes without any need to remember the complex commands and their syntax as discussed in this chapter so far. For example, instead of using the ps command with different options, you can invoke this Process Manager and it opens up showing all the system processes. You can sort the process list alphabetically, numerically, or based on any other field. You can use the filter text box to show only the processes that match the text typed in the filter box. You can search for a desired process by typing the relevant text in the find text box. You can terminate a process by highlighting it using the mouse pointer and then clicking kill.

In order to use the Process Manager utility, you need to log into the Desktop Environment of Solaris, either the Common Desktop Environment (CDE) or Java Desktop Environment (JDS). In CDE you can start the Processor manager by executing the sdtprocess command on the shell terminal, as shown below:

# sdtprocess &

or

# /usr/dt/bin/sdtprocess &

Alternatively, you can click Find Process on the Tools subpanel, as shown in Figure 6.2.

Figure 6.2

Figure 6.2 Tools Subpanel of CDE

In JDS you can start the Process Manager either by executing the sdtprocess command or pressing Ctrl+Alt+Delete on the keyboard. The Process Manager window opens, as shown in Figure 6.3.

Figure 6.3

Figure 6.3 Process Manager Window

The Process Manager displays and provides access to processes that are running on a system. Table 6.9 describes the different fields displayed in the Process Manager window.

Table 6.9. Fields in Process Manager Window

Column Heading

Description

ID

Process ID

Name

Name of the process

Owner

Login ID of the owner of the process

CPU%

Percentage of CPU time consumed

RAM

Physical memory or amount of RAM currently occupied by this process

Size

Total swap size in virtual memory

Started

Date when the process was started (or current time, if process was started today)

Parent

Parent process ID

Command

Actual Unix command (truncated) being executed

With the Process Manager, you can sort the processes on the system on the basis of any of the items in the given list. For example, if you click the CPU% column heading, the process list will be sorted and displayed on the basis of the CPU usage, as shown in Figure 6.4. The list updates every 30 seconds, but you can choose a value in the Sampling field of the Process manager to update the list as frequently as you like.

Figure 6.4

Figure 6.4 Process Manager Window Sorted by CPU%

You can filter the processes that match the specified text. Type some text in the Filter text box in the Process Manager and press the Enter key. This displays the process entries that match the typed text. Figure 6.5 shows the processes containing /usr/sbin in their process entries.

Figure 6.5

Figure 6.5 Process Manager Window after Specifying in the Filter Text Box

Empty the Filter text box and press Enter to redisplay all the processes on the system.

Using the Find box, processes containing the requested text string will be displayed in the Process Manager window. Type some text in the Find text box and press the Enter key. The processes containing the specified text will be displayed with the first occurrence of the specified text highlighted. This is shown in Figure 6.6.

Figure 6.6

Figure 6.6 Process Manager Window after Specifying in the Find Text Box

Empty the Find text box and press Enter to redisplay all the processes on the system.

To kill a process, select or highlight the process from the listing and click the Kill option in the Process menu, shown at top of the window. This is shown in Figure 6.7. You also can use the Ctrl+C keyboard combination to kill the selected process or select the Kill option from the options that are available when you press the right mouse button. This will send SIGINT signal to the selected process.

Figure 6.7

Figure 6.7 Process Manager Window with Selected

You can also send signals of your choice to a process, similar to the signals sent from the command line using the kill command. For example, to send signal 9 (sure kill) for killing a process, select or highlight the process from the listing. Click the Process menu from the toolbar at the top of the Process Manager window and then click the Signal option. This will display a Signal window where you can specify 9 in the Signal text box and press Enter to kill the process.

Another interesting feature of the Process Manager utility is the capability to display the ancestry of a process. When a Unix process initiates one or more processes, they are called child processes or children. Child and parent processes have the same user ID. To view a process along with all its child processes, highlight the process in the Process manager window. Click the Process menu from the toolbar at the top of the Process Manager window and then click the Show Ancestry option, as shown in Figure 6.8. The Process Manager will display another window containing the process tree for the specified process, as shown in Figure 6.9. Child processes are indented from the respective parent processes.

Figure 6.8

Figure 6.8 Process Manager Window with Show Ancestry Selected

Figure 6.9

Figure 6.9 Show Ancestry Window

The command line equivalent to the Show Ancestry selection in the Process Manager is the ptree command, as described earlier in this chapter.

  • + Share This
  • 🔖 Save To Your Account