A few of us, myself included, threatened to write one a while ago, but you know how it goes. No time.<br><br>Eric Meddaugh wrote Zonestat, which is on Xymonton<br><a href="http://xymonton.trantor.org/doku.php/monitors:zonestat">http://xymonton.trantor.org/doku.php/monitors:zonestat</a><br>
But I haven't had a look at it yet, so I can't say if will do what you need.<br>(Again, time is my problem)<br><br>If you have the time, check it out, and let us know what you make of it.<br><br>Regards<br>      Vernon<br>
<br><br><div class="gmail_quote">On Thu, Feb 25, 2010 at 6:30 AM, James Wade <span dir="ltr"><<a href="mailto:jameskipwade@gmail.com">jameskipwade@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">












<div link="blue" vlink="blue" lang="EN-US">

<div>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thanks Vernon,</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">This was a great summary. I was hoping to
run the server in the container,</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">but I think I’ll move it to the global
zone.</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I will work on a separate client for
solaris zones. Has anyone out there</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">started writing one?</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">James</span></font></p>

<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>

<div>

<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr width="100%" align="center" size="2">

</span></font></div>

<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;"> Vernon Everett
[mailto:<a href="mailto:everett.vernon@gmail.com" target="_blank">everett.vernon@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 23, 2010
8:34 PM<br>
<b><span style="font-weight: bold;">To:</span></b> <a href="mailto:hobbit@hswn.dk" target="_blank">hobbit@hswn.dk</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [hobbit] Problems
running on a Solaris Zone</span></font></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi James<br>
<br>
I put a lot of effort into this recently, and there does not appear to be any
real practical solution to the problem.<br>
The problem is caused by how zones use memory and kernel space.<br>
<br>
In sparse zones, all kernels are the same kernel. There is only one instance of
the kernel running, and as a result, only one chunk of memory visible to the
kernel. <br>
<br>
When you set a memory cap in your zone definition, and do a prtconf in the
zone, it reports the value of the memory cap as the available memory.<br>
So far, so good.<br>
<br>
However, to determine free memory, we have to interrogate the kernel. This can
be done a number of different ways. Xymon, by default uses vmstat.<br>
You can also use kstat -p unix:0:system_pages:freemem and I am sure there are
others.<br>
However, the kernel in question, is the kernel running in the global zone!<br>
It's all one kernel.<br>
So the reported memory free is the free memory available to the kernel. It
should be the same value in all the zones too.<br>
<br>
The error you are seeing occurs when free memory available to the global kernel
is more than the memory cap you have placed on the zone.<br>
In C (and many other programming languages), if you subtract big numbers from
smaller numbers, you sometimes get strange results depending on how your
variables are defined. I think that's where your multi-Petabyte memory is
coming from. Any programmers out there that can confirm this?<br>
<br>
The other problem this creates, is that any sane-looking zone memory percentages
are meaningless. They do not represent the true memory utilisation within the
zone. Your zone memory utilisation could be 100%, and you would not realise it,
because your kernel is still seeing heaps of free memory, and reporting lots
free.<br>
Imagine a 2gb cap, and the apps in the zone are using all 2gb.<br>
However, the kernel can see 1.8gb free. <br>
Do the maths. Xymon tells us your zone is only using 10% of memory, which is
far from the truth.<br>
<br>
The only real way round it might not fit with your policies and methods.<br>
You need to remove all memory caps.<br>
This floats all memory, meaning that the memory "seen" in the zone,
is the same as the kernel, and Solaris does the management of memory, ensuring
all zones get enough.<br>
It also means that all of the zones will show identical memory graphs.<br>
<br>
The other way, which I haven't had time to do yet, is to use prstat -Z in the
global zone.<br>
This gives a summary of what the zones are using, which might be worth
tracking.<br>
<br>
As a short-term workaround, because we need memory caps for certain apps, we
have skipped memory monitoring on the zones. (It's pretty meaningless anyway -
see above)<br>
We have the global zone, and below it, all the zones, with the NOCOLUMNS:memory
bb-hosts tag.<br>
<br>
It's not really ideal, but I hope to find time to revisit this in the near
future.<br>
<br>
It would be nice to be able to disable just the memory test on these, and only
keep an eye on swap. Swap is local to the zone, and if you start using heaps of
it in the zone, or are doing lots of paging, chances are you are maxing out
your memory allocation.<br>
So swap is probably a good indicator.<br>
<br>
Sorry I could not be of any more help.<br>
<br>
Regards<br>
     Vernon<br>
<br>
<br>
<br>
</span></font></p>

<div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Wed, Feb 24, 2010 at 1:35 AM, James Wade <<a href="mailto:jkwade@futurefrontiers.com" target="_blank">jkwade@futurefrontiers.com</a>>
wrote:</span></font></p>

<div link="blue" vlink="purple">

<div>

<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">Has anyone see this problem.
I’ve just compiled 4.3.0.0.beta2 on a<br>
Solaris 10 system. I’m running on a Sun T5120 series in a Solaris<br>
sparse zone. </span></font></b></h3>

<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">When I run the server, I get
the following on the memory test.<br>
Fyi.. I don’t have 4.2 peta bytes of memory </span></font></b><font color="black" face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings; color: black; font-weight: normal;">J</span></font></h3>

<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">Has anyone seen similar
problems. Running the client in the global zone works fine.</span></font></b></h3>

<h3><b><font color="black" face="Times New Roman" size="4"><span style="font-size: 13.5pt; color: black;">Tue Feb 23 10:52:43 CST 2010 - Memory CRITICAL</span></font></b></h3>

<pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">   Memory              Used       Total  Percentage</span></font></pre><pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"><img src="cid:image001.gif@01CAB56E.B9EF7AF0" alt="red" width="16" border="0" height="16"> Physical     4294966186M      26624M 4294967292%</span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"><img src="cid:image002.gif@01CAB56E.B9EF7AF0" alt="green" width="16" border="0" height="16"> Swap                148M      26623M          0%</span></font></pre>
<pre><font color="#d8d8bf" face="Courier New" size="2"><span style="font-size: 10pt; color: rgb(216, 216, 191);"> </span></font></pre>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Thanks…James</span></font></p>

</div>

</div>

</div>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

</div></div></div>

</div>


</blockquote></div><br>