Information Technology Reference
In-Depth Information
GZ# zlogin myzone ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1335 1331 0 15:22:51 ? 0:00 ps -fz myzone
root 1076 1076 0 18:15:15 ? 0:00 zsched
root 1089 1076 0 18:15:16 ? 0:00 /sbin/init
root 1091 1076 0 18:15:16 ? 0:06 /lib/svc/bin/svc.startd
root 1093 1076 0 18:15:16 ? 0:08 /lib/svc/bin/svc.configd
...
In the previous output, note that from within the Container, we are not allowed
to know anything about the outside world. Even the PID number of the global
zone's init process remains hidden from us. The kernel replaces that forbid-
den information with safe information—in this case, the PID of the Container's
zsched process. Any process that would normally be inherited by init is, seem-
ingly, inherited by zsched . Note also that the parent PID of zsched is hidden—by
displaying a PPID equal to its PID!
The -Z option adds the ZONE column to ps output. This column is very helpful
when you are trying to understand the relationship between processes and the
Container with which they are associated.
GZ# ps -efZ
ZONE UID PID PPID C STIME TTY TIME CMD
global root 0 0 0 15:24:18 ? 0:25 sched
global root 1 0 0 15:24:20 ? 0:00 /sbin/init
myzone root 1076 1 0 18:15:15 ? 0:00 zsched
global root 1075 1 0 18:15:15 ? 0:00 zoneadmd -z myzone
global root 1500 1042 0 21:46:19 pts/3 0:00 ps -efZ
Another very useful command for examining processes and Containers is prstat .
At the first sign of trouble, or when you are examining the system out of curiosity,
prstat will help you determine which Containers are busy and which are not. It
can provide both a holistic view and a detailed view, even doing both at the same
time. For the first release of Solaris 10, a pair of new options were added just for
Containers:
-Z : Splits the terminal window into an upper section and a lower section.
The upper section lists processes as if no options were used. The lower sec-
tion shows the same information, but for entire Containers—the aggregate
of all of the processes in each Container. As with the default output, the up-
per and lower sections are each sorted; the sort order is by CPU utilization
rate by default, but you can choose another sort key with -s .
 
Search WWH ::




Custom Search