Sponsored Content
Operating Systems Solaris Finding capped memory of a non global zone Post 302921155 by jim mcnamara on Wednesday 15th of October 2014 11:17:54 AM
Old 10-15-2014
Not really for a regular user. It is /etc/zones/zonename.xml only visible from the global zone.

Sun took extra care to be sure there is no way to "escape" directly from the virtual machine (zone) into the controlling domain. That would create a horrible security hole. And some data must exist locally in kernel or zsched memory, which requires privileged access.

Use ssh - that reads directly from the global zone via a "proxy". I don't get your requirement for local access. Unless you are a programmer writing code and cannot access the global zone. If so, then if the mcap is absolutely required you will have to work with your sysadmin on that requirement. S/he may write some code for you or "place" a file just after boot time:

Code:
cp /etc/zones/*.xml /etc/zones/zonename/root/tmp/

Which is a small security issue, compared to granting users access. You would then see the file you need in /tmp. This does not accomodate the use of prctl to dynamically change zone resource control values during runtime.

Code:
grep 'mcap_physcap' /etc/zones/zonename.xml
<mcap physcap="34359738368"/>

so
Code:
mcap=$(ssh zonename "grep 'mcap_physcap' /etc/zones/${zonename}.xml" )

You can then parse the number in the variable mcap.

Last edited by jim mcnamara; 10-15-2014 at 12:38 PM..
This User Gave Thanks to jim mcnamara For This Post:
 

9 More Discussions You Might Find Interesting

1. Solaris

capped-memory in zone

How does capped-memory work in zones? I have 32G of memory and 10 zones. I want about physical=4G and swap=4G in each zone. Is this possible? I am going over the 32G. (1 Reply)
Discussion started by: photon
1 Replies

2. Solaris

Reserve Memory for Global Zone

We have several containers on one machine and would like to reserve some memory for the global zone. capped-memory only allows max physical/swap and setting a max on each container isn't an option. The server has 32GB physical and 30GB swap. Currently there are ten containers on it. Normally... (6 Replies)
Discussion started by: kharjahn
6 Replies

3. Solaris

[b]How to mount a folder from global zone to non global zone??

Hi All There is one folder in global zone I just want to share the same folder innon global zone. How can i do it? pls send me script for this. (2 Replies)
Discussion started by: vijaysachin
2 Replies

4. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

5. Solaris

Finding the global zone name

Hi im in a local zone which command if i execute in the local zone will show the global zone name Thanks (6 Replies)
Discussion started by: newtoaixos
6 Replies

6. Solaris

zone breaching 'capped-memory' threshold

Calling upon all Solaris zone experts. I have a Sun T3-1 that is running a few whole-root zones. I've set the 'capped-memory' setting on all the zones. However, I have a problem on the one zone. Under load it uses more memory that has been allocated to it. zonecfg -z sunrep02 export ... (4 Replies)
Discussion started by: soliberus
4 Replies

7. Solaris

Global and non-global zone resource sharing - tricky

hi all, Just a simple question but i cant get the answers in the book - In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies

8. Solaris

Date and time change in global and non global zone

Hi, If I change date and time in global zone, then it will affect in non global zones. During this process what files will get affect in non global zones and which mechanism it's using to change. gloabl zone:Solaris 11.3 X86 TIA (1 Reply)
Discussion started by: Sumanthsv
1 Replies

9. Solaris

Solaris 11 zone has no external network access (except to Global Zone)

Hi, hoping someone can help, its been a while since I used Solaris. After creating a NGZ (non global zone), the NGZ can access the GZ (Global Zone) and the GZ can access the NGZ (using ssh, zlogin) However, the NGZ cannot access any other netwqork devices, it can't even see the default router ... (2 Replies)
Discussion started by: GazinLincoln
2 Replies
zonename(1)							   User Commands						       zonename(1)

NAME
zonename - print name of current zone SYNOPSIS
zonename DESCRIPTION
The zonename utility prints the name of the current zone. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWzoneu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
zlogin(1), zoneadm(1M), zonecfg(1M), attributes(5), zones(5) SunOS 5.10 9 Jan 2004 zonename(1)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy