ZONES-11
[PROCESS
MONITORING-BOOT OPTIONS]
Zone Daemons,
“zoneadmd” & “zsched”
Zoneadmd
·
Runs in GZ and it is primary process for setting
up the zones virtual platform,
·
It manages the booting / shutting down of zones
·
It manages the connection to the zone from zlogin
·
It allocates the zone ID & starts the zsched
process
·
One zoneadmd process for every active (ready,
running, shutting down) zone on the system.
Zsched
·
It runs within the NGZ
·
Kernel threads for the zones are owned by zsched
process
These processes are managed by system and should not kill/run
manually.
ZONE STATE,
root@sol-test-1:>/# zoneadm list -cv
ID NAME STATUS PATH BRAND
IP
0 global running / native shared
13 clonedZone running /export/zones/clonedZone native
shared
19 tzone3 running /export/zones/tzone3 native excl
20 tzone4 running /export/zones/tzone4 native excl
22 newzone running /export/zones/newzone native shared
If the zone is booted, then with help of “zlogin” cmd we can directly
run any command within the NGZ
To run any command in NGZ from
GZ,
root@sol-test-1:>/# zlogin newzone ifconfig -a
lo0:1:
flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232
index 1
inet 127.0.0.1 netmask
ff000000
e1000g0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
inet 192.168.234.209
netmask ffffff00 broadcast 192.168.234.255
e1000g0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4>
mtu 1500 index 2
inet 192.168.234.211
netmask ffffff00 broadcast 192.168.234.255
root@sol-test-1:>/# zlogin newzone svcs -xv
svc:/application/print/server:default (LP print server)
State: disabled since Wed Dec
24 13:28:44 2014
Reason: Disabled by an administrator.
See:
http://sun.com/msg/SMF-8000-05
See: man -M /usr/share/man
-s 1M lpsched
Impact: 2 dependent services are not running:
svc:/application/print/rfc1179:default
svc:/application/print/ipp-listener:default
To find the processes within
the NGZ from GZ,
root@sol-test-1:>/# ps -elfz newzone |more
F S UID
PID PPID C PRI NI
ADDR SZ WCHAN
STIME TTY TIME CMD
1 T root
0 0 0 0
SY ? 0
18:11:44 ? 0:29 sched
0 S root
1 0 0 40
20 ? 636
? 18:11:46 ? 0:02
/sbin/init
1 S root
2 0 0 0
SY ? 0
? 18:11:46 ? 1:26
pageout
1 S root
3 0 0 0
SY ? 0
? 18:11:46 ? 1:51
fsflush
1 S root
4 0 0 0
SD ? 0
? 18:11:46 ? 0:01
vmtasks
0 S root
316 1 0 70
20 ? 713
? 18:12:16 ? 0:00
/usr/sbin/cron
0 S root
8 1 0 70
20 ? 3185
? 18:11:49 ? 0:08 /lib/svc/bin/svc.
startd
0 S root
10 1 0 70
20 ? 2848
? 18:11:49 ? 0:11
/lib/svc/bin/svc.
configd
0 S smmsp
1608 1 0 42
20 ? 2252
? 13:17:23 ? 0:00
/usr/lib/sendmail
-Ac -q15m
[………………………………………………]
To grep the processes within
the NGZ from GZ,
root@sol-test-1:>/# pgrep cron -z newzone
2443
root@sol-test-1:>/# pgrep sendmail -z newzone
2915
2914
To kill the processes within
the NGZ from GZ,
root@sol-test-1:>/# pkill 2915 -z newzone
To know the process statistics
of all NGZ from GZ,
root@sol-test-1:>/# prstat –Z
[…………………………………………..]
ZONEID NPROC
SWAP RSS MEMORY TIME
CPU ZONE
0 55 272M
115M 11% 0:09:59 0.5% global
22 32 249M
217M 21%
0:00:29 0.1% newzone
13 32 209M
77M 7.5% 0:02:02 0.0% clonedZone
19 32 198M
134M 13% 0:00:42 0.0% tzone3
20 32 204M
140M 14% 0:00:55 0.0% tzone4
To know the disk utilization of
all NGZ from GZ,
root@sol-test-1:>/#
df
–Zh
[………………………………………………]
/dev/dsk/c1t1d0s0
16G 4.9G 11G
32% /export/zones
/vol/dev/dsk/c0t0d0/sol_10_811_x86
2.1G 2.1G 0K
100% /cdrom/sol_10_811_x86
/hgfs
16G 4.0M 16G
1% /hgfs
/tmp/VMwareDnD
0K 0K 0K
0% /var/run/vmblock
/cdrom
7.2G 4.9G 2.2G
69% /export/zones/clonedZone/root/cdrom
/export/zones/clonedZone/dev
16G
4.9G 11G 32%
/export/zones/clonedZone/root/dev
/lib
7.2G 4.9G 2.2G
69% /export/zones/clonedZone/root/lib
/platform
7.2G 4.9G 2.2G
69% /export/zones/clonedZone/root/platform
/sbin 7.2G 4.9G
2.2G 69% /export/zones/clonedZone/root/sbin
/usr
7.2G 4.9G 2.2G
69% /export/zones/clonedZone/root/usr
proc
0K 0K 0K
0% /export/zones/clonedZone/root/proc
ctfs 0K 0K
0K 0% /export/zones/clonedZone/root/system/contract
mnttab
0K 0K 0K
0% /export/zones/clonedZone/root/etc/mnttab
objfs
0K 0K 0K
0% /export/zones/clonedZone/root/system/object
swap
422M 332K 422M
1% /export/zones/clonedZone/root/etc/svc/volatile
/export/zones/clonedZone/root/usr/lib/libc/libc_hwcap1.so.1
7.2G 4.9G 2.2G
69% /export/zones/clonedZone/root/lib/libc.so.1
fd
0K 0K 0K
0% /export/zones/clonedZone/root/dev/fd
swap
422M 36K 422M
1% /export/zones/clonedZone/root/tmp
swap
422M 20K 422M
1% /export/zones/clonedZone/root/var/run
/cdrom
7.2G 4.9G 2.2G
69% /export/zones/tzone3/root/cdrom
/export/zones/tzone3/dev
16G 4.9G 11G
32% /export/zones/tzone3/root/dev
/lib
7.2G 4.9G 2.2G
69%
/export/zones/tzone3/root/lib
/platform
7.2G 4.9G 2.2G
69% /export/zones/tzone3/root/platform
/sbin
7.2G 4.9G 2.2G
69% /export/zones/tzone3/root/sbin
/dev/dsk/c1t2d0s1
3.0G 3.0M 2.9G
1%
/export/zones/tzone3/root/testdir
[…………………………………………………….]
To know the inter process
communication statistics of NGZ from GZ,
root@sol-test-1:>/# ipcs -z newzone [particular zone]
IPC status from <running system> as of Wed Dec 24 14:48:45 IST
2014
T ID KEY
MODE OWNER GROUP
Message Queues:
Shared Memory:
Semaphores:
root@sol-test-1:>/# ipcs –Z [all
zones]
IPC status from <running system> as of Wed Dec 24 14:48:57 IST
2014
T ID KEY
MODE OWNER
GROUP ZONE
Message Queues:
Shared Memory:
Semaphores:
To know the memory cap settings
of all NGZ from GZ (if set on any),
root@sol-test-1:>/# rcapstat -z
id zone nproc vm
rss cap at avgat
pg avgpg
22 newzone -
249M 217M 400M
0K 0K 0K
0K
To know current resource
control setting of particular NGZ from GZ,
root@sol-test-1:>/# prctl -i zone newzone
zone: 22: newzone
NAME PRIVILEGE VALUE
FLAG ACTION RECIPIENT
zone.max-swap
privileged 256MB -
deny
-
system 16.0EB max
deny
-
zone.max-locked-memory
privileged 150MB -
deny
-
system 16.0EB max
deny
-
zone.max-shm-memory
system 16.0EB max
deny
-
zone.max-shm-ids
system 16.8M
max deny -
zone.max-sem-ids
system 16.8M max
deny
-
zone.max-msg-ids
system 16.8M max
deny
-
zone.max-lwps
system 2.15G max
deny
-
zone.cpu-cap
system 4.29G inf
deny
-
zone.cpu-shares
privileged 10 -
none
-
system 65.5K max
none
-
BOOT OPTIONS
BOOT/REBOOT IN VERBOSE MODE
Login to the NGZ on which you have to test these,
root@sol-test-1:>/# zlogin -C newzone
[Connected to zone 'newzone' console]
newzone console login: root
Password:
From other terminal halt the NGZ,
root@sol-test-1:>/# zoneadm -z newzone halt
root@sol-test-1:>/# zoneadm -z newzone boot -- -m
verbose
go to the terminal where u logged in to NGZ
newzone console login:
[NOTICE: Zone halted]
[NOTICE: Zone booting up]
SunOS Release 5.10 Version Generic_147441-01 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights
reserved.
[ system/filesystem/root:default starting (root file system mount) ]
[ network/loopback:default starting (loopback network interface) ]
[ system/boot-archive:default starting (check boot archive content) ]
[ network/pfil:default starting (packet filter) ]
[ system/installupdates:default starting (system update installer) ]
[ network/physical:default starting (physical network interfaces) ]
[ system/filesystem/usr:default starting (read/write root file
systems mounts) ]
[ milestone/name-services:default starting (name services milestone)
]
[ system/identity:node starting (system identity (nodename)) ]
[ system/device/local:default starting (Standard Solaris device
configuration.) ]
[ system/keymap:default starting (keyboard defaults) ]
Hostname: newzone
[ milestone/devices:default starting (device configuration milestone)
]
[ system/filesystem/minimal:default starting (minimal file system
mounts) ]
[ system/identity:domain starting (system identity (domainname)) ]
[ system/cryptosvc:default starting (cryptographic services) ]
[ system/rmtmpfiles:default starting (remove temporary files) ]
We can also reboot the NGZ in verbose mode,
root@sol-test-1:>/# zoneadm -z newzone reboot -- -m
verbose
At other terminal,
newzone console login: [ network/shares/group:default starting (Share
Group) ]
[ system/boot-archive-update:default starting (update boot archive if
necessary) ]
[ system/coreadm:default starting (system-wide core file
configuration) ]
[ system/pkgserv:default starting (Flush package command database to
disk (see pkgadm(1m)).) ]
[ system/sac:default starting (SAF service access controller) ]
TO BOOT THE NGZ IN SINGLE USER
MODE,
root@sol-test-1:>/# zoneadm -z newzone halt
root@sol-test-1:>/# zoneadm -z newzone boot -- -s
On other terminal,
newzone console login:
[NOTICE: Zone halted]
[NOTICE: Zone booting up]
SunOS Release 5.10 Version Generic_147441-01 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights
reserved.
Booting to milestone "milestone/single-user:default".
Hostname: newzone
Requesting System Maintenance Mode
SINGLE USER MODE
Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode
Dec 24 15:10:15 su: 'su root' succeeded for root on /dev/console
Oracle Corporation SunOS
5.10 Generic Patch January 2005
# who -r
. run-level S Dec 24 15:10 S
0 0
#
No comments:
Post a Comment