On 04/26/12 10:33, Christian Meier wrote:
Dear List,

with the solaris resource control feature you are able to set the max
number of LWP for a zone

e.g

bash-3.00# prctl -n zone.max-lwps -i zone v0136
zone: 20: v0136
NAME    PRIVILEGE       VALUE    FLAG   ACTION
RECIPIENT
zone.max-lwps
         privileged        120       -   deny
                                 -
         system          2.15G     max
deny                                 -

with the rctladm you're able to generate warning if the limit was reached:

Apr 26 16:34:52 g0057 genunix: privileged rctl zone.max-lwps (value 120)
exceeded by process 15930 in zone v0136.

is there a "simple" way to get the actual value of the zone(s)?

actual known ways:
prstat:
/usr/bin/prstat -LZ

with sed,grep and awk possible:
  /usr/bin/prstat -LZ -n 1,10 1 1 | sed '1,3d' | grep -v Total
      0      216  111M  139M   6.8%   0:09:05 0.1% global
     20      100   40M   23M   1.1%   0:00:32 0.0% v0136
Potential improvements on that are:

$ ps -Leo zone | sort | uniq -c | sort -n
   1     ZONE
 110       z1
 319   global

$ ps -Lz z1 -o pid= | wc -l
     109

The reason that these are improvements are:

- We don't force ps to do any name lookups. If name lookups are broken for some reason (e.g. ldap server failure), you want to minimize the amount of monitoring that breaks. - No use of imprecise grep patterns that could match process names or substrings of other zones.
- If you have a lot of zones, prstat may not list the least active ones.


kstat:
kstat -p unix:0:lwp_cache:buf_inuse
unix:0:lwp_cache:buf_inuse      319

but I get only the sum of all lwp on the system, not for a special zone

ps:
ps -efZ -o zone,zoneid,lwp,args | grep global | wc -l
      219
ps -efZ -o zone,zoneid,lwp,args | grep v0136 | wc -l
      105

on Solaris 11 it is possible to get these values by zonestat
e.g.

$ zonestat -p -P zones -r processes,lwps 1 1
interval:processes:system-limit:global:66:0.22%:-:-
interval:processes:system-limit:v0134:30:0.10%:-:-
interval:lwps:system-limit:global:670:0.00%:-:-
interval:lwps:system-limit:v0134:112:0.00%:-:-

but for solaris 10?

any hints are very welcome

regards
Christian
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org


--
Mike Gerdts
Solaris Core OS / Zones                 http://blogs.oracle.com/zoneszone/

_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to