LWN.net Logo

Announcing a new utility: 'trace'

Announcing a new utility: 'trace'

Posted Nov 17, 2010 19:49 UTC (Wed) by oak (guest, #2786)
In reply to: Announcing a new utility: 'trace' by ilmari
Parent article: Announcing a new utility: 'trace'

Preferably also for unix sockets too, not just files. I mean, files are easy see if the process is still running, you just check /proc/PID/fd/ (or use lsof), but for unix sockets it's nearly impossible to see to which unix socket (file) given FD is related to unless you catch also the connect().

As this thing is tracing whole system not just individual process like strace does, it might be too slow to get all arguments to all functions. The arguments to functions like open() etc that return values being used by other system calls, are very important though. For example LTT doesn't store file names for access() calls (one can see them with strace if really necessary), but it will store them for open() calls.

As to formatting of the output, ltrace is quite nice. It aligns the call return values so that they're easier to see + it has separate option for call time and count summaries. Try for example:

  ltrace -S cat
  ^C
  ltrace -c cat
  ^C


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds