Note sure what you mean by "stable", but this is what we do for q-Status. Also this run on both Global and local zones. CFGDIR should be '.'  the directory where you have this script. Set it up like this.

q-Status/bin/list.zones
q-Status/data/

The script will generate a file <hostname>.zones which is the configuration of your zone. There may be more we need, but no one has asked for it yet. What this will probably promote is some more discussion and maybe someone else will add some more ideas.
------------------------------------------------------------------------------

#!/bin/sh
# Copyright LogiQwest 2007
# Name: CFGDIR/bin/list.zones
# Version 1.00:02 Nov 2005 created (David Schulz).
# Version 1.01:12 Apr 2006 Added zoneinfo output.
# Version 1.02:30 Oct 2006 Added creation  of zpstat file.
# Version 2.00:10 Aug 2007 Updated for Rev5.
# Purpose: Reports zoneadm configuration information.
DIR=`/usr/bin/dirname $0`
CFGDIR=`/bin/cat $DIR/CFGDIR`
ZONE_ADM='/usr/sbin/zoneadm'
TMP='/tmp'
GLOBAL='FALSE'

if [ -f /usr/sbin/zoneadm ]; then
        /usr/sbin/zoneadm list -vi > ${CFGDIR}/data/`hostname`.zones 2>$1
        zones=`/usr/sbin/zoneadm list`
        for zone in $zones
        do
                if [ $zone = 'global' ]; then
                        GLOBAL='TRUE'
                        echo "# GLOBAL =========================================" >> ${CFGDIR}/data/`hostname`.zones
                fi
        done
        if [ $GLOBAL = 'TRUE' ]; then
                for zone in $zones
                do
                        if [ $zone != 'NAME' ]; then
                                if [ $zone != 'global' ]; then
                                        echo "ZONENAME=$zone" >> ${CFGDIR}/data/`hostname`.zones
                                        /usr/sbin/zonecfg -z $zone info >> ${CFGDIR}/data/`hostname`.zones
                                fi
                        fi
                done
                /usr/bin/prstat -n 1 -Z 1 1 > ${CFGDIR}/data/`hostname`.zpstat
                /usr/sbin/pooladm > ${CFGDIR}/data/`hostname`.pooladm  2>&1
        fi
fi

If you are interested in seeing our tool, I will send you the extraction script, you can send me back data and will post for you and interactive server configuration analysis (up to 10 servers) on our secure web site as a demo.

Steffen Weiberle wrote:
Is there a stable way of determining the configuration of a running zone?

zonecfg and /etc/zones/<zonename.xml> show the configuration that will 
be used on the next boot, so if a change was made via zonecfg, the 
current running instance may be different from what those report. 
zoneadm does list ip-type and brand, but does not show anything else. 
This includes limits, assigned interfaces for ip-type=exclusive, and 
other things. some things can be gleaned relatively easily. Others may not.

Thanks,
Steffen
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

  

--

Michael Barto
Software Architect

LogiQwest Circle
LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/

    [EMAIL PROTECTED]
Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

'tis a gift to be simple
This e-mail may contain LogiQwest proprietary information and should be treated as confidential.
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to