This discussion is archived
1 Reply Latest reply: Mar 15, 2011 4:32 AM by abrante RSS

arg0 of anonpgout probe

Alex12 Explorer
Currently Being Moderated
Hi,
I need to trace anonymous memory paged out activity. Following is the dscript:

<pre>
#pragma D option quiet

dtrace:::BEGIN
{
printf("Tracing... Hit Ctrl-C to end.\n");
}

vminfo:::anonpgout
{
@apo[pid, execname] = sum(arg0);
}

dtrace:::END
{
printf("%6s %-16s %16s\n", "PID", "CMD", "PAGES");
printa("%6d %-16s %@16d\n", @apo);
}
</pre>

when I ran this script, I got output but the data on PAGES column is zero:

PID CMD PAGES
0 sched 0
25 sshd 0
221 sshd 0
351 ypbind 0
2616 mv 0
2621 ftp 0
2622 update.ksh 0
2680 touch 0
2693 tjb 0

according to the <<SolarisDynamicTracing Guide>>, arg0=1, if the probe fired, PAGES column should always be greater than 1, it should never be 0.

Could anyone explain why I got the above result?

Thanks in advance,

Alex
  • 1. Re: arg0 of anonpgout probe
    abrante Pro
    Currently Being Moderated
    Well, i know that pgpgin and pgpgout returns the amount of pages in arg0, but i thought that anonpgin and anonpgout only returned 0.

    However, don't you get one probe fired everytime there is a pgin or pgout? Can't you just count the amount of times the probe fires to get the amount of pages?

    i.e:

    @apo[pid, execname] = count();

    should return the amount of pages.. or so i would guess

    .7/M.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points