Thank you Dan! Also for the good hint to look at zone.c. I tried to add some of the information into my picture.

I moved it to http://gremliza.net  for anyone who likes it.

Regards,

Konstantin

This was my good old zone_state.d dtrace script:

#!/usr/sbin/dtrace -qs

BEGIN {
        z[0]="UNINITIALIZED";
        z[1]="READY";
        z[2]="BOOTING";
        z[3]="RUNNING";
        z[4]="SHUTTDING_DOWN";
        z[5]="EMPTY";
        z[6]="DOWN";
        z[7]="DYING";
        z[8]="DEAD";
        st=timestamp;
        printf("%14s %12s %3s %s\n", "TIME", "ZONE", "ID", "STATE");
}

proc:::exec
/ execname == "zoneadmd" / {
        self->exec = execname;
}

proc:::exec-success
/ self->exec == "zoneadmd" / {
        t=timestamp-st;
        printf("%10d.%03d", t/1000000, (t/1000)%1000 );
        printf(" EXEC: %s\n", curpsinfo->pr_psargs) ;
        self->exec = 0;
}

proc:::create
/ args[0]->pr_fname == "zsched" || args[0]->pr_fname == "init" / {
        t=timestamp-st;
        printf("%10d.%03d", t/1000000, (t/1000)%1000 );
        printf(" FORK: %3d %s[%d]\n", args[0]->pr_zoneid, args[0]->pr_fname, args[0]->pr_pid) ;
}

proc:::exit
/ execname == "zsched" || execname == "init" / {
        t=timestamp-st;
        printf("%10d.%03d", t/1000000, (t/1000)%1000 );
        printf(" EXIT: %3d %s[%d]\n", curpsinfo->pr_zoneid, execname, pid) ;
}



fbt:genunix:zone_status_set:entry {
        t=timestamp-st;
        printf("%10d.%03d", t/1000000, (t/1000)%1000 );
        printf("       %3d %12s %s\n", args[0]->zone_id, stringof(args[0]->zone_name), z[args[1]]);
}



Dan Price schrieb:
On Thu 10 Jul 2008 at 02:42AM, Konstantin Gremliza wrote:
  
   Ok.

   I wrote a dtrace script to monitor zone states. The resulting automata is
   in the attachment.
   In the state down, we should still have a zsched (ps), but we should not
   have any mounted filesystems, which is true (df).
    

Nicely done!  This is very well organized.

There's more info on the different states in the big comment at
the top of:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/zone.c

        -dp

  

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

Reply via email to