JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

2.  Maintenance Commands (Man Pages Section 1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

5.  File Formats (Man Pages Section 4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

media(5)

sam_dtrace(5)

sam_worm(5)

SUNW.qfs(5)

7.  Device and Network Interfaces (Man Pages Section 7)

sam_dtrace(5)

NAME
     sam_dtrace - SAM-QFS DTrace probes

AVAILABILITY
     SUNWqfs SUNWsamfs

DESCRIPTION
     The SAM-QFS filesystem supports dynamic tracing with  DTrace
     probes.   More  information  on  the  usage of DTrace can be
     found                                                     at
     https://wikis.oracle.com/display/DTrace/Documentation.

     The following is a description of the currently  implemented
     DTrace probes with their arguments.  A quick list of SAM-QFS
     DTrace probes can be found online by typing:

       dtrace -l -m sdt:samfs

  sdt:samfs::sam-open-ret
     The sam-open-ret probe triggers at the end of a  file  open.
     The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - ip->di.status.bits
     arg2 - Open count (after open)
     arg3 - errno (after open)

  sdt:samfs::sam-close-ret
     The sam-close-ret probe triggers at the end of a file close.
     The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - ip->di.status.bits
     arg2 - Open count (after close)
     arg3 - last_close_flag << 32 & errno

  sdt:samfs::sam-read-ent
     The sam-read-ent probe triggers at the start of a file read.
     The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - uiop->uio_loffset (Offset in file at start of read)
     arg2 - uiop->uio_resid (Amount to read)

  sdt:samfs::sam-read-ret
     The sam-read-ret probe triggers at the end of a  file  read.
     More  information is returned here.  You may want to trigger
     only the return call.  The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - uiop->uio_loffset (Offset in file at end of read)
     arg2 - Number of bytes read.
     arg3 - Directio flag << 32 & errno

  sdt:samfs::sam-write-ent
     The sam-write-ent probe triggers at  the  start  of  a  file

     write.  The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - uiop->uio_loffset (Offset in file at start of write)
     arg2 - uiop->uio_resid (Amount to write)

  sdt:samfs::sam-write-ret
     The sam-write-ret probe triggers at the end of a file write.
     More  information is returned here.  You may want to trigger
     only the return call.  The arguments returned are:
     arg0 - Equipment number << 32 & Inode number
     arg1 - uiop->uio_loffset (Offset in file at end of write)
     arg2 - Number of bytes written.
     arg3 - Directio flag << 32 & errno

  sdt:samfs::sam-syscall-ent
     The sam-syscall-ent probe triggers at the entry of a sam-qfs
     syscall.  The arguments returned are:
     arg0 - syscall command (see include/sam/syscall.h)
     arg1 - pointer to syscall argument struct (use copyout to read it)
     arg2 - size of syscall argument

  sdt:samfs::sam-syscall-ret
     The sam-syscall-ent probe triggers at the end of  a  sam-qfs
     syscall.  The arguments returned are:
     arg0 - syscall command (see include/sam/syscall.h)
     arg1 - pointer to returned argument (may be NULL, use copyout to read it)
     arg2 - errno (after syscall)

  sdt:samfs::sam-msgread-client
     The sam-msgread-client probe triggers when the shared client
     receives  a message from the metadata server.  The arguments
     returned are:
     arg0 - hdr.operation << 32 & hdr.command
     arg1 - hdr.hostid << 32 & client ordinal
     arg2 - hdr.fsid (file system id from message)
     arg3 - hdr.error (errno)

  sdt:samfs::sam-msgread-server
     The sam-msgread-client probe triggers when the shared  meta-
     data  server receives a message from the shared client.  The
     arguments returned are:
     arg0 - hdr.operation << 32 & hdr.command
     arg1 - hdr.hostid << 32 & client ordinal
     arg2 - hdr.fsid (file system id from message)
     arg3 - hdr.error (errno)

  sdt:samfs::sam-lookup-name
     The sam-lookup-name probe triggers when the metadata  server
     needs to look up a file name.  The arguments returned are:
     arg0 - File name component string (use stringof(arg0))
     arg1 - Nonzero if case insensitive lookup
     arg2 - Internal flags field.

  sdt:samfs::sam-find-component
     The sam-find-component  probe  triggers  when  the  metadata
     server  searches  a file name component in a directory.  The
     arguments returned are:
     arg0 - File name component string (use stringof(arg0))
     arg1 - Nonzero if case insensitive lookup
     arg2 - File name hash

EXAMPLES
     Some examples of usage of the SAM-QFS DTrace probes  can  be
     found in /opt/SUNWsamfs/examples/dtrace.  These examples are
     useful in their own right, but also serve as example scripts
     which can be modified for other purposes.  The scripts are:

  fs_mon eqid
     This script will monitor a specific file  system  and  print
     out  once  per  second  the  top  5 bytes/second files being
     accessed.  It will continue  until  interrupted.   The  file
     system  is specified by the numeric equipment id of the file
     system from the mcf file (see man  mcf  for  more  details).
     The output of fs_mon looks like:

     lake-mn### /opt/SUNWsamfs/examples/dtrace/fs_mon 10
             inode           bytes/sec
                  1030         22020096
                  1029         20971520
             inode           bytes/sec
                  1029         28311552
                  1030         27874304

  ino_mon eqid inode
     This script will monitor a specific file in a specific  file
     system  and  print  out  once  per second data on read/write
     speed.  It will also gather and quantize I/O size  data  for
     that  file and report a summary of that when the script ends
     (via ^C interrupt).  The file  is  specified  via  equipment
     number  (from  mcf file) and inode number.  Inode number can
     be found from "ls -i" output.   Output  from  ino_mon  looks
     like:

     lake-mn### /opt/SUNWsamfs/examples/dtrace/ino_mon 10 1029
     Inode 1029 opened by pid 15155, tid 1
     Inode 1029,  51261 KB/sec read,      0 KB/sec written
     Inode 1029, 110238 KB/sec read,      0 KB/sec written
     Inode 1029, 110640 KB/sec read,      0 KB/sec written
     Inode 1029, 115298 KB/sec read,      0 KB/sec written
     Inode 1029, 114805 KB/sec read,      0 KB/sec written
     Inode 1029 closed by pid 15155, tid 1, last_close 1
     Inode 1029,  39851 KB/sec read,      0 KB/sec written
     ^C
     I/O size breakdown for eq 10, inode 1029

                value  ------------- Distribution ------------- count
                   -1 |                                         0
                    0 |                                         1
                    1 |                                         0
                    2 |                                         0
                    4 |                                         0
                    8 |                                         0
                   16 |                                         0
                   32 |                                         0
                   64 |                                         0
                  128 |                                         0
                  256 |                                         0
                  512 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1720320
                 1024 |                                         0