How to identify a global or non-global Solaris server?

Hi,
I have Solaris zone configured with Solaris 9 and 10.
In Solaris 10(non global), I use the command �zonename� to get whether it is global or non-global server.
For Solaris 9, what command I can use to get whether it is global or non-global server.

Regards,
Kalai :confused:

There are no zones in Solaris 9.

But there are Solaris 8 and 9 branded zones.

I have not one of these available at the moment but I guess "df -k" and "ifconfig -a" output might give some clues.

If your Solaris 9 runs in a container, obviously its a non-global zone.

You are right, I didn't think of branded zones.

Strong indicators for running in a non-global zones could be:

  • init's PID not 1
  • no mountpoint for the root filesystem in /etc/vfstab
  • presence of a lo0:<n> interface in the output of ifconfig -a while there is no lo0

At least this is true for regular zones.

Indeed, but that doesn't answer the OP question which is precisely: "is my Solaris 9 running in a container or not".

root@globalzone# zonename
global

root@localzone# zonename
localzone

masloff: there is no zonename command for Solaris 9, that's the OP issue.

a solaris 9 container (branded zone) won't know this command!

my bad, sorry

is there any way to get it

I doubt you can..:o

There is probably a way but it would help if you participate in finding the solution.
What display in your Solaris 9 zone these commands:

pgrep init
df -k
ifconfig -a

from the global zone, its obvious why you would want to be able to tell as well be able to admin non-global zones. however, i think the point of a non-global zone is to make the appearance as if this were a stand alone box. i'm not in front of my box(es) now so i can't look. however, can you post the output as requested by jlliagre. i'm wondering if df -h or mount show something.

I Hope in solaris 9 zones are not available . Difference b/t global & non-global is global zone is nothing but the physical machine , non-global zone are the virutal OE . Even though zones are not available on solaris 9 , conceptually speaking , solaris 9 is global zone, a physical system by default is global zone .

Solaris 9 zones are definitely available.
1.Introduction to Solaris 9 Containers (System Administration Guide: Solaris 9 Containers) - Sun Microsystems
Please read this thread from the start to avoid posting confusing statements.

how to get a non booted zone's list (means not running now).

zoneadm list -cv

will show you all zones with their states.

man zoneadm

netstat -in & arp -a should give some clue about global zone.