From My Brain to Your Browser
Jeff Victor's Blog
Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Click me to subscribe
Search

Links
 

Today's Page Hits: 253

« Zonestat: How Big is... | Main | OpenSolaris 2008.11... »
Monday Nov 24, 2008
Zonestat v1.3

It's - already - time for a zonestat update. I was never happy with the method that zonestat used to discover the mappings of zones to resource pools, but wanted to get v1.1 "out the door" before I had a chance to improve on its use of zonecfg(1M). The obvious problem, which at least one person stumbled over, was the fact that you can re-configure a zone while it's running. After doing that, the configuration information doesn't match the current mapping of zone to pool, and zonestat became confused.

Anyway, I found the time to replace the code in zonestat which discovered zone-to-pool mappings with a more sophisticated method. The new method uses ps(1) to learn the PID that each zone's [z]sched process is. Then it uses "poolbind -q <PID>" to look up the pool for that process. The result is more accurate data, but the ps command does use more CPU cycles.

While performing surgery on zonestat, I also:

With all of that, zonestat v1.3 provides better data, is roughly 30% faster, and is even smaller than the previous version! :-) You can find it at http:://opensolaris.org/os/project/zonestat.

Posted at 10:40AM Nov 24, 2008 by Jeffrey Victor in Solaris 10 Containers  |  Comments[5]

Comments:

Jeff,

This is awesome. I've been looking for this exact thing. However, when I run 1.3 it takes 15 seconds versus less than 4 seconds for 1.2. Also, 1.3 no longer shows the zones broken out. It only shows the totals. Did I miss a new flag?

Sam

Posted by Sam Freiberg on November 24, 2008 at 04:39 PM EST #

Great improvement on the earlier version. For pset, it would be helpful to see the load factor from poolstat.

Posted by Jeroen on November 25, 2008 at 11:39 PM EST #

Great improvements! Any chance of varying the zone name field based on the length of the actual names, or adding a "long name" flag. One of the specific reasons we like zonestat is that it supported names longer than 8 characters.

Posted by Greg Kranz on December 07, 2008 at 10:32 AM EST #

Greg - good idea, and easy to implement. I'll add it to v1.3.1.

Jeroen - please bring this up on zones-discuss at opensolaris.org - it needs some discussion.

Posted by Jeff Victor on December 07, 2008 at 10:51 AM EST #

Great tool. I'll have to second Greg's comments on the zone name length. Adding a "long name" flag or increasing the name field would be helpful.

Posted by Ed Ortiz on February 03, 2009 at 10:01 AM EST #

Post a Comment:
Comments are closed for this entry.