Zonestat 1.4 Now Available

I have posted Zonestat v1.4 at: the Zone Statistics project page (click on "Files" in the left navbar).

Zonestat is a 'dashboard' for Solaris Containers. It shows resource consumption of each Container (aka Zone) and a comparison of consumption against limits you have set.

Changes from v1.3:

  • BugFix: various failures if the pools service was not online. V1.4 checks for the existence of the pools packages, and behaves correctly whether they are installed and enabled, or not.
  • BugFix: various symptoms if the rcapd service was not online. V1.4 checks for the existence of the rcap packages, and behaves correctly whether they are installed and enabled, or not.
  • BugFix: mis-reported shared memory usage
  • BugFix: -lP produced human-readable, not machine-parseable output
  • Bug/RFE: detect and fail if zone != global or user != root
  • RFE: Prepare for S10 update numbers past U6
  • RFE: Add option to print entire name of zones with long names
  • RFE: Add timestamp to machine-consumable output
  • RFE: improve performance and correctness by collecting CPU% with DTrace instead of prstat

Note that the addition of a timestamp to -P output changes the output format for "machine-readable" output.

For most people, the most important change will be the use of DTrace to collect CPU% data. This has two effects. The first effect is improved correctness. The prstat command - used in V1.3 and earlier, can horribly underestimate CPU cycles consumed because it can miss many short-lived processes. The mpstat has its own problems with mis-counting CPU usage. So I expanded on a solution Jim Fiori offered, which uses DTrace to answer the question "which zone is using a CPU right now?"

The other benefit to DTrace is the improvement in performance of Zonestat.

The less popular, but still interesting additions include:

  • -N expands the width of the zonename field to the length of the longest zone name. This preserves the entire zone name, for all zones, and also leaves the columns lined up. However, the length of the output lines will exceed 80 characters.
  • The new timestamp field in -P output makes it easier for tools like the "System Data Recorder" (SDR) to consume zonestat output. However, this was a change to the output format. If you have written a script which used -P and assumed a specific format for zonestat output, you must change your script to understand the new format.

Please send questions and requests to .


Great tool, Jeff.

I am sure that you already know and this is for future releases, but I got:
Illegal division by zero at line 580
when booting newly installed zone.

Posted by Roman on April 09, 2009 at 02:43 AM EDT #

Thanks for reporting that, Roman.

A fix has been developed. It has also been tested, by myself and by Roman. Version 1.4.1 will be out in a few days.

Posted by Jeff Victor on April 28, 2009 at 03:19 PM EDT #

Thank you for this v. useful tool.

I have a feature request, if it's not already underway. Can zonestat monitor the current number of LWP's, versus the max-lwps cap?

I currently use "rcapstat -z" for this, but it doesn't always show me the number of processes, and it doesn't show the cap limits.

Thanks again.

Posted by Craig Bell on May 28, 2009 at 07:27 AM EDT #

Craig: the number of processes, and/or LWPs, could be added to zonestat easily. The most challenging part is the lack of screen width in the -l format. But process-related info would be useful along with the planned "-p" option.
However, I am a bit confused by your statement about rcapstat. That tool does not display the number of LWPs in use. It only displays the number of processes in use. If the goal is to compare the current value against the max-lwps limit, the value you should be checking is LWPs, which is shown by prstat.

Posted by JeffV on May 28, 2009 at 08:20 AM EDT #

You're right, I wish to see the LWPs -- the same resource that is capped. Sorry for the confusion. Thanks for the info Jeff. -c

Posted by Craig Bell on May 28, 2009 at 09:43 AM EDT #

Post a Comment:
Comments are closed for this entry.

Jeff Victor writes this blog to help you understand Oracle's Solaris and virtualization technologies.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.


« April 2014