*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> truss (1)              
Title
Content
Arch
Section
 

TRUSS(1)

Contents


NAME    [Toc]    [Back]

     truss -- trace system calls

SYNOPSIS    [Toc]    [Back]

     truss [-faedDS] [-o file] -p pid
     truss [-faedDS] [-o file] command [args]

DESCRIPTION    [Toc]    [Back]

     The truss utility traces the system calls called by the specified process
     or program.  Output is to the specified output file, or standard error by
     default.  It does this by stopping and restarting the process being monitored
 via procfs(5).

     The options are as follows:

     -f      Trace decendants of the original traced process created by
	     fork(2), vfork(2), etc.

     -a      Show the argument strings that are passed in each execve(2) system
 call.

     -e      Show the environment strings that are passed in each execve(2)
	     system call.

     -d      Include timestamps in the output showing the time elapsed since
	     the trace was started.

     -D      Include timestamps in the output showing the time elapsed since
	     the last recorded event.

     -S      Do not display information about signals received by the process.
	     (Normally, truss displays signal as well as system call events.)

     -o file
	     Print the output to the specified file instead of standard error.

     -p pid  Follow the process specified by pid instead of a new command.

     command [args]
	     Execute command and trace the system calls of it.	(The -p and
	     command options are mutually exclusive.)

EXAMPLES    [Toc]    [Back]

     # Follow the system calls used in echoing "hello"
	   $ truss /bin/echo hello
     # Do the same, but put the output into a file
	   $ truss -o /tmp/truss.out /bin/echo hello
     # Follow an already-running process
	   $ truss -p 1

SEE ALSO    [Toc]    [Back]

      
      
     kdump(1), ktrace(1), procfs(5)

HISTORY    [Toc]    [Back]

     The truss command was written by Sean Eric Fagan for FreeBSD.  It was
     modeled after similar commands available for System V Release 4 and
     SunOS.


FreeBSD 5.2.1		       November 23, 1997		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
strace Linux trace system calls and signals
ptrace Linux process trace
ptrace HP-UX process trace
moptrace OpenBSD MOP Trace Utility
ptrace IRIX process trace
socketcall Linux socket system calls
unimplemented Linux unimplemented system calls
syscalls Linux list of all system calls
intro HP-UX introduction to system calls
intro Tru64 Introduction to system calls
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service