For anyone interested:

#!/usr/sbin/dtrace -s -32 

#pragma D option quiet

typedef struct  {
        int njob;       /* limit */
        int nice;       /* nice for execution */
        int nwait;      /* wait time to next execution attempt */
        int nrun;       /* number running */
} queue;

queue *qp;

dtrace:::BEGIN
{
        printf("%-20s %s \n", "time", "nrun");
}

pid$1::-:14dcc
{
        qp = (queue *)copyin(0x0002df44, sizeof(queue));
        printf("%-20Y %d\n",walltimestamp,qp->nrun);
}


and the output:

[EMAIL PROTECTED] ./cron.d 24666
time                 nrun
2008 Aug 11 14:24:00 5
2008 Aug 11 14:24:00 6
2008 Aug 11 14:25:00 6
2008 Aug 11 14:25:00 7
2008 Aug 11 14:25:00 8
2008 Aug 11 14:26:00 7
2008 Aug 11 14:26:00 6
2008 Aug 11 14:27:00 6
2008 Aug 11 14:28:00 5
2008 Aug 11 14:29:00 5
2008 Aug 11 14:30:00 5
2008 Aug 11 14:30:00 6
2008 Aug 11 14:30:00 7
2008 Aug 11 14:30:00 8
2008 Aug 11 14:32:00 5

Piotr


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to