Zones command crib
----------------------------------
List available zones
zoneadm list –v
-----------------------------------
List status of zones
zoneadm list -cp
-----------------------------------
Login to zone
zlogin –C zonename
-----------------------------------
Logout of a local zone while in a console session / logout of a local zone when logged in from the global zone
~~~.
Logout of a global zone
~.
-----------------------------------
Determine what zone you are in
zonename
-----------------------------------
Command to discover if zone is sparse or whole
# pkgcond is_whole_root_nonglobal_zone
# echo $?
1
# pkgcond is_sparse_root_nonglobal_zone
# echo $?
0
so here the zone is sparse
-----------------------------------
How to get data from a zone without logging into it
(from the global zone)
zlogin zonename cmd
eg
zlogin zonename1 iostat –En
-----------------------------------
From the global zone, show disk stats in human readable form with zone areas included
df –hZ
From the global zone, show processes that are running including zone procs
ps –ef Z
-----------------------------------
Determine disk usage of zones within the partition they reside
du –sk /xx/xx/zonenames*
eg
du –sk /zone/zp*
-----------------------------------------
Determine CPU utilization from the global zone
prstat –Z
-----------------------------------------
Booting a zone
(from the global zone)
zoneadm –z zonename boot
-----------------------------------------
Rebooting a zone
(from the global zone)
zoneadm –z zonename reboot
-----------------------------------------
Halting a zone
(from the global zone – this is used to remove both the application environment and virtual platform for a zone – Zone status is then brought to the ‘installed’ state. All processes are killed, devices unconfigured, network interfaces unplumbed, file systems are unmounted and kernel data structures destroyed)
zoneadm –z zonename halt
-----------------------------------------
Deleting a Zone
(from the global zone, the assumption is that the zone has been halted prior to these actions)
zoneadm –z zonename uninstall
zonecfg –z zonename delete
You can confirm the status of the zone at any time with
zoneadm list –cp
Wednesday, 27 February 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment