Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.
| Problem |
Solution |
Example |
Reference |
Recommended |
truss -xall -vall -rall -t'read' -p PID # To run a command and have it produce debug info, run it prefix with the truss syntax: truss -xall -vall -rall -t'read' your command # Another good option when debugging, is to run truss and look at the opens. Or more specifically the failures - as this often highlights missing libraries or permissions issues. truss -t'open' -p PID # - On Linux use strace, which takes basically the same options. You just use -e, like this:
strace -e'open' ls open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 open("/lib/tls/librt.so.1", O_RDONLY) = 3 open("/lib/libtermcap.so.2", O_RDONLY) = 3 open("/lib/libacl.so.1", O_RDONLY) = 3 open("/lib/tls/libc.so.6", O_RDONLY) = 3 open("/lib/tls/libpthread.so.0", O_RDONLY) = 3 open("/lib/libattr.so.1", O_RDONLY) = 3 open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3 open("/etc/mtab", O_RDONLY) = 3 open("/proc/meminfo", O_RDONLY) = 3
|
Leave a Reply