SilverWav's Journal

The best is yet to come…

Note: strace

leave a comment »

sudo strace -vvfo /tmp/cdrom_id_new.trace -s 1024 /lib/udev/cdrom_id /dev/sr0

DESCRIPTION
In the simplest case strace runs the specified command until it exits.

It intercepts and records the system calls which are called by a process and the signals which are received by a process.

The name of each system call, its arguments and its return value are printed.

OPTIONS
-o filename
Write the trace output to the file filename rather than to stderr.

-s strsize
Specify the maximum string size to print (the default is 32). Note that filenames are not considered strings and are always printed in full.

-v
Print unabbreviated versions of environment, stat, termios, etc. calls.
These structures are very common in calls and so the default behavior displays a reasonable subset of structure members. Use this option to get all of the gory details.

-f
Trace child processes as they are created by currently traced processes as a result of the fork(2) system call.

Advertisements

Written by SilverWav

April 13, 2010 at 11:33 pm

Posted in Notes

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: