[dtrace-discuss] DTrace instead of `lsof`?
Ian Campbell
ian.c.campbell at gmail.com
Tue Aug 15 07:51:56 PDT 2006
With that syntax, you won't get info on existing processes. Try the same
with bash, for instance, then exec a new instance of bash. You'll get some
output.
On 8/15/06, Sean McGrath - Sun Microsystems Ireland <sean.mcgrath at sun.com>
wrote:
>
> UNIX admin stated:
> < How would I replicate `lsof` functionality with DTrace?
> <
> < I tried for example
> <
> < dtrace -n 'syscall::open:entry /execname == $1/ {printf("%s",
> copyinstr(arg0));}' named
> <
>
> You may need to match against open64 as well (32bit apps opening files
> on
> 64bit OS)..
>
> Regards,
>
> < but that does not seem to work, at least not in the way I expect. What I
> expected to see was a list of open files that $1 has open, but instead I
> just got how many probes DTrace matched. And no further output.
> <
> <
> < This message posted from opensolaris.org
> < _______________________________________________
> < dtrace-discuss mailing list
> < dtrace-discuss at opensolaris.org
>
> --
> Sean.
> .
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060815/a0a4216c/attachment-0001.html
More information about the dtrace-discuss
mailing list