sudo strace -vvfo /tmp/cdrom_id_new.trace -s 1024 /lib/udev/cdrom_id /dev/sr0
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.
Write the trace output to the file filename rather than to stderr.
Specify the maximum string size to print (the default is 32). Note that filenames are not considered strings and are always printed in full.
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.
Trace child processes as they are created by currently traced processes as a result of the fork(2) system call.