La commande 'strace' est l'équivalent de 'truss' sous AIX et permet de suivre les appels système effectués par un processus en cours.
La syntaxe de la commande est : 'strace -p Pid' où Pid est le numéro du processus à suivre.
La commande 'strace' est disponible avec le paquet RPM 'strace'.
Le résultat est de la forme :
access("/bin/date", X_OK) = 0
stat("/bin/date", {st_mode=S_IFREG|0755, st_size=55576, ...}) = 0
geteuid() = 5755031
getegid() = 11000
getuid() = 5755031
getgid() = 11000
access("/bin/date", R_OK) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5ec80859d0) = 22155
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x43d6c0, [], SA_RESTORER, 0x7f5ec76e9510}, {SIG_DFL, [], SA_RESTORER, 0x7f5ec76e9510}, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 22155
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22155, si_status=0, si_utime=0, si_stime=0} ---
wait4(-1, 0x7fff44712edc, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn() = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f5ec76e9510}, {0x43d6c0, [], SA_RESTORER, 0x7f5ec76e9510}, 8) = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=24264, ...}) = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=24264, ...}) = 0
geteuid() = 5755031
getegid() = 11000
getuid() = 5755031
getgid() = 11000
access("/bin/sleep", X_OK) = 0
stat("/bin/sleep", {st_mode=S_IFREG|0755, st_size=24264, ...}) = 0
geteuid() = 5755031
getegid() = 11000
getuid() = 5755031
getgid() = 11000
access("/bin/sleep", R_OK) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5ec80859d0) = 22156
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0