• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

Solaris 10 – Local zone wise utilization Report using zonestat

May 5, 2013 By Cloud_Devops 7 Comments

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:
  • CPU Pool size
  • Capped Physical Memory  (aka RAM)
  • Used Physical Memory
  • Capped Swap space (Virtual Memory aka VM)
  • Used shared memory 
  • Locked Memory 
  • Used Swap space (aka virtual memory)
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.

Filed Under: Solaris 10, Unix admin scripts, Unix Monitoring tools, Zones Tagged With: solaris 10, Zones

Reader Interactions

Comments

  1. kishore says

    August 2, 2019 at 12:32 pm

    Unable to download the script , please provide the approval to download it

    Reply
    • Lingeswaran R says

      August 6, 2019 at 7:03 pm

      Please check it now.

      Reply
  2. Bhaskar says

    December 16, 2016 at 3:01 pm

    Hi Lingeswaran,

    I am happy to subscribe hear, because your articles are very useful for every one, even senior engineers also,

    i need your suggestion

    i am a unix and linux administration on last 8 years

    Planing to improve my technologies to AWS

    Please suggest the correct technology to improve my self .

    Reply
  3. Surendran says

    October 31, 2014 at 12:00 pm

    Hi…

    Thanks for sharing the alternative method to execute zonestat command in Solaris 10.

    I am unable to download the perl script, getting “Server Not Found” error. Can u share the file via mail..

    Reply
    • Lingeswaran R says

      October 31, 2014 at 3:21 pm

      Sent via email. Please try to download using the google account.

      Regards
      Lingeswaran

      Reply
  4. Paul says

    September 18, 2014 at 12:59 am

    Hello,
    thank you for writing this script first off.
    my question is, I would love to run this script you have written, but I am finding it hard finding the zonestat pkg to install…. Can you point me in the right direction to find zonestat and install that first?

    thank you

    Paul….

    Reply
    • Lingeswaran R says

      September 18, 2014 at 3:10 pm

      As per my knowledge,zonestat package available from Solaris 11. For Solaris 10 , you need to use the script what i have attached

      Regards
      Lingeswaran

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version