ZFS snoop problem



Hi Managers,
I am running Solaris 11 as a NFS server and have found a script called
nfsv3rwsnoop.d
It works fine for most files but some times it lists the file name as
<unknown> why?

# ./nfsv3rwsnoop.d
TIME(us) CLIENT OP OFFSET BYTES PATHNAME
1171685002348 192.168.17.75 W 3093304 2389 <unknown>
1171685003791 192.168.17.75 W 3093304 2426 <unknown>
1171687011333 192.168.17.75 W 3093304 2492 <unknown>
1171687013031 192.168.17.75 W 3093304 2529 <unknown>
1171689020596 192.168.17.75 W 3093304 2595 <unknown>


# more ./nfsv3rwsnoop.d
#!/usr/sbin/dtrace -s
/* This DTrace scripts traces NFSv3 read and write requests, showing
details of each operation
* ./nfsv3iosnoop.d
* TIME(us) CLIENT OP OFFSET BYTES PATHNAME
* 4299383207 192.168.17.75 R 0 4096
/export/stuff/bin/ghex2
* 4299391813 192.168.17.75 R 4 28672
/export/stuff/bin/ghex2
* 4299395700 192.168.17.75 R 32 32768
/export/stuff/bin/ghex2
*/
#pragma D option quiet
#pragma D option switchrate=10hz

dtrace:::BEGIN
{
printf("%-16s %-18s %2s %-8s %6s %s\n", "TIME(us)",
"CLIENT", "OP", "OFFSET", "BYTES", "PATHNAME");
}

nfsv3:::op-read-start
{
printf("%-16d %-18s %2s %-8d %6d %s\n", timestamp / 1000,
args[0]->ci_remote, "R", args[2]->offset / 1024,
args[2]->count,
args[1]->noi_curpath);
}

nfsv3:::op-write-start
{
printf("%-16d %-18s %2s %-8d %6d %s\n", timestamp / 1000,
args[0]->ci_remote, "W", args[2]->offset / 1024,
args[2]->data.data_len, args[1]->noi_curpath);
}





--



Cheers

Richard Skelton
Richard.Skelton@xxxxxxxxxxxx
Infineon Technologies UK Ltd
Infineon House
Great Western Court
Hunts Ground Road
Stoke Gifford
Bristol
BS34 8HP
Tel +44(0)117 952 8808
Fax: +44(0)117 952 8777
Mobile: +44(0)743 6272 137
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • DTrace Issues
    ... had any success printing out the arguments passed to a program? ... is the log of what happens when I run my script the source for my ... #pragma D option quiet ...
    (freebsd-stable)
  • Re: [kde] exporting from kmail (Was: Kmail2/Akonadi issue on FreeBSD.)
    ... I handle all my lists thru gmane.org, ... instances of claws for mail and feeds, but I did go to the trouble to ... bailed on kmail & went to claws, and see just how hard it would be to ... running the script for that purpose as available on the claws-mail ...
    (KDE)
  • [Full-Disclosure] Re: [0day] ExploitLabs.com CGI Script Irony (was: Vote Today)
    ... It is also my belief that Donnie Werner's ... For the benefit of the lists, ... Filtering Flaws in ExploitLabs.com CGI Script ... Donnie's script insecurely sanitizes the "host" URI parameter. ...
    (Full-Disclosure)
  • Re: sysconf -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.
    ... For those reasons I am not supportive of adding this to the base at ... | internals of the script would be added to rc.subr so that they could be ... cc'ing multiple FreeBSD lists. ...
    (freebsd-hackers)
  • Re: cp/mv with verify step?
    ... script), so a quick'n'dirty check would be to see if the last argument ... is a directory (in which case you append each source filename in turn) ... for every "target" file. ... Generating the lists *could* be scripted, ...
    (comp.os.linux.misc)