poga
October 9, 2012, 11:53am
1
Hi,
I am a newbee in the solaris administration. My question is how to
Check the total CPU and memory of a global zone.
Check the allocated CPU and memory for each of the residing non-global zones.
I have already tried prtconf which gives the following output
/usr/sbin/prtconf
System Configuration: Sun Microsystems sun4v
Memory size: 32544 Megabytes
.....truncated
but i am unable to find out the processors and memory allocated for each non-global zone.
The zonestat utility is not present in the system.
Kindly help
Thanks,
Poga
CPU and memory is shared between all zones. They can be capped and to know it, the simplest way is to look at each zone configuration:
zonecfg -z zonename info
poga
October 9, 2012, 12:03pm
3
Thanks jlliagre.
But how to interpret the following info in terms of the CPU and memory allocations in layman terms.
/usr/sbin/zonecfg -z MyZone info
zonename: MyZone
zonepath: /zones/MyZone/MyZone
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:
[max-lwps: 8192]
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
fs:
dir: /usr/lib/rsc
special: /zones/MyZone/rscd
raw not specified
type: lofs
options: []
fs:
dir: /usr/nsh
special: /zones/MyZone/nsh
raw not specified
type: lofs
options: []
fs:
dir: /usr/local
special: /zones/MyZone/local
raw not specified
type: lofs
options: []
fs:
dir: /usr/openv
special: /zones/MyZone/openv
raw not specified
type: lofs
options: []
fs:
dir: /usr/bea
special: /zones/MyZone/bea
raw not specified
type: lofs
options: []
fs:
dir: /usr/bea81
special: /zones/MyZone/bea81
raw not specified
type: lofs
options: []
fs:
dir: /zen_files
special: /zen_files
raw not specified
type: lofs
options: []
net:
address: 172.17.25.12
physical: nxge0
defrouter not specified
capped-cpu:
[ncpus: 2.00]
rctl:
name: zone.cpu-cap
value: (priv=privileged,limit=200,action=deny)
rctl:
name: zone.max-lwps
value: (priv=privileged,limit=8192,action=deny)
There is no memory capping.
The zone can use at most 2 CPUs.
1 Like
beta17
October 11, 2012, 9:07am
5
see the command prstat and the -Z option.
example with prstat -Z 1:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
24593 bpsadmin 4480K 3824K cpu6 50 0 0:00:04 1.0% prstat/1
27340 stelink 311M 289M sleep 59 0 1:00:56 0.4% java/38
3833 stelink 311M 289M sleep 59 0 0:49:23 0.3% java/31
1181 stelink 91M 80M sleep 59 0 0:03:28 0.1% srvxps.exe/1
27416 stelink 487M 453M sleep 59 0 0:13:36 0.0% java/68
3919 stelink 401M 233M sleep 59 0 0:06:09 0.0% java/47
1377 stelink 143M 89M sleep 59 0 0:02:35 0.0% srvrmi.exe.wrap/47
1238 stelink 91M 80M sleep 59 0 0:02:30 0.0% srvxps.exe/1
1436 110 2717M 1814M sleep 59 0 0:00:40 0.0% oracle/11
1265 stelink 19M 8168K sleep 59 0 0:01:22 0.0% clisnl.exe/1
1439 110 2716M 1814M sleep 59 0 0:00:48 0.0% oracle/11
1091 stelink 53M 39M sleep 59 0 0:01:22 0.0% TMS_ORA/1
1376 stelink 23M 12M sleep 59 0 0:00:48 0.0% srvgwy.exe/6
5507 stelink 87M 75M sleep 59 0 0:02:52 0.0% srvxps.exe/1
7066 stelink 14M 6856K sleep 59 0 0:00:40 0.0% ISH/1
24524 bpsadmin 9864K 5664K sleep 59 0 0:00:00 0.0% sshd/1
837 stelink 22M 16M sleep 59 0 0:01:16 0.0% BBL/1
1093 110 2712M 1810M sleep 59 0 0:01:04 0.0% oracle/1
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
4 300 6732M 6058M 37% 3:01:41 0.9% test1
0 59 267M 255M 1.6% 0:11:03 0.9% global
8 219 5916M 5268M 32% 1:57:13 0.5% test2
12 47 236M 232M 1.4% 0:11:01 0.0% test880ps
Total: 625 processes, 2682 lwps, load averages: 0.38, 0.36, 0.34