[dtrace-discuss] dtrace
Vivek Joshi
techvbj at gmail.com
Mon Jul 30 04:20:22 PDT 2007
Look at the stat(2) signature,
int stat(const char *restrict path, struct stat *restrict buf)
which suggests that first argument is the path .... you can do something
like this in a D script,
#!/usr/sbin/dtrace -Cs
#include <sys/stat.h>
syscall::stat:entry
{
printf("%s\n",stringof(copyinstr(arg0)));
}
I am new to DTrace. Someone of the list can correct me ...
Vivek
On 7/30/07, jeevan reddy <Jeevan.Reddy at sun.com> wrote:
>
> hi fnds,
> i want to print the filenames on which the stat system
> call is acting when a stat system call is invoked. can anyone can help
> me this regard.
>
>
> Thanks
> jeevan
> _______________________________________________
> 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/20070730/059d4aa0/attachment.html
More information about the dtrace-discuss
mailing list