Site icon UnixArena

Solaris 10 – Local zone wise utilization Report using zonestat

cpu memory usage on solaris

I am sure many of the Solaris administrators will break their head in an order to find Solaris local zones wise resource utilization details on oracle Solaris 10. Because there is no simple inbuilt tool to find these details in Solaris 10 (Apart from prstat -Z). I just come across  Jeff Victor’s Blog and found this script which will be very useful in Unix administration. This script will help you to find resource consumption of each Solaris local zone from the global zone level. Just give a try.
This script will give the following information:
Here I will demonstrate how to use this script and explanation about each field in zonestat script output. 

Download the zonestat.pl script and make it executable. 

Here is the sample output of the script. 

bash-3.00# ./zonestat.pl
        |--Pool--|Pset|-------Memory-----|
Zonename| IT|Size|Used| RAM| Shm| Lkd| VM|
------------------------------------------
  global  0D    2  0.0 103M 256K 258K 431M
    sol1  0D    2  0.0  82M  0.0  0.0 169M
==TOTAL= ---    2  0.1 185M 256K 258K 1.2G

bash-3.00# ./zonestat.pl -l
        |----Pool-----|---CPU-----|----------------Memory----------------|
        |---|--Size---|Pset-------|---RAM---|---Shm---|---Lkd---|---VM---|
Zonename| IT| Max| Cur|Used|Shr|S%| Cap|Used| Cap|Used| Cap|Used| Cap|Used
--------------------------------------------------------------------------
  global  0D    2    2  0.1   1 50       91M  18E 256K  18E 258K  18E 423M
    sol1  0D    2    2  0.0   1 50       77M  18E  0.0  18E  0.0  18E 169M
==TOTAL= --- ----    2  0.1 --- -- 789M 168M 789M 256K 755M 258K 1.3G 1.2G


bash-3.00# ./zonestat.pl interval 4
        |--Pool--|Pset|-------Memory-----|
Zonename| IT|Size|Used| RAM| Shm| Lkd| VM|
------------------------------------------
  global  0D    2  0.0  92M 256K 258K 423M
    sol1  0D    2  0.0  76M  0.0  0.0 169M
==TOTAL= ---    2  0.0 168M 256K 258K 1.2G
--------
  global  0D    2  0.0  91M 256K 258K 423M
    sol1  0D    2  0.0  75M  0.0  0.0 169M
==TOTAL= ---    2  0.0 166M 256K 258K 1.2G
--------
  global  0D    2  0.0  91M 256K 258K 423M
    sol1  0D    2  0.0  75M  0.0  0.0 169M
==TOTAL= ---    2  0.0 166M 256K 258K 1.2G
--------
  global  0D    2  0.0  91M 256K 258K 423M
    sol1  0D    2  0.0  75M  0.0  0.0 169M
==TOTAL= ---    2  0.0 166M 256K 258K 1.2G

You have the help option to know each field in zonestat command output.

bash-3.00# ./zonestat.pl -help

 Usage: zonestat [-h] | [-l] [interval [count]]
        -h: usage information
        -l: display columns showing the configured limits

Output with -l option:
        |----Pool-----|------CPU-------|----------------Memory----------------|
        |---|--Size---|-----Pset-------|---RAM---|---Shm---|---Lkd---|---VM---|
Zonename| IT| Max| Cur| Cap|Used|Shr|S%| Cap|Used| Cap|Used| Cap|Used| Cap|Used

Pool: information about the Solaris Resource Pool to which the zone is assigned.
   I: Pool identification number for this zone's pool
   T: Type of pool: D=Default, P=Private (temporary), S=Shared
 Max: Maximum number of CPUs configured for this zone's pool
 Cur: Current number of CPUs configured for this zone's pool

CPU: information about CPU controls and usage
  Cap: CPU-cap for the zone
 Used: Amount of CPU power consumed by the zone recently
  Shr: Number of FSS shares assigned to this zone
   S%: Percentage of this pool's CPU cycles for this zone ('HH' = 100%)

Memory: information about memory controls and usage
 RAM: Physical memory information
   Cap: Maximum amount of RAM this zone can use
  Used: Amount of RAM this zone is using
 Shm: Shared memory information
   Cap: Maximum amount of shared memory this zone can use
  Used: Amount of shared memory this zone is using
 Lkd: Locked memory information
   Cap: Maximum amount of locked memory this zone can use
  Used: Amount of locked memory this zone is using
 VM: Virtual memory information
   Cap: Maximum amount of virtual memory this zone can use
  Used: Amount of virtual memory this zone is using

Hope this article is informative to you.

Exit mobile version