Hi Shiv,

> DTraceToolkit has a dtrace script (Proc/pidpersec.d) that refers to a
> variable mpid as below
>
> profile:::tick-1sec
> {
>      printf("%-22Y %8d %6d\n", walltimestamp, `mpid, pids);
>      pids = 0;
> }
>
> Where is `mpid getting picked from (it isn't declared anywhere else)?

The backquote (`) allows you to access variables in the running kernel. The
'mpid' variable is defined in usr/src/uts/common/os/pid.c (on Solaris
that is). For more information on the scoping operator check out the docs:

http://wikis.sun.com/display/DTrace/Variables#Variables-ExternalVariables

Jon.
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to