[clug] Counting/watching which executables/scripts are called.

Andrew Janke a.janke at gmail.com
Thu Nov 27 12:05:16 GMT 2008


> strace won't give you a nice table without a bit of post-processing. *Very*
> roughly:
>
> pbarker at milligan:~$ strace -f  -o strace.out -s 8000 bin/log_printing.sh 1
> bw "test page for lenny upgrade"
> pbarker at milligan:~$ cat strace.out | grep 'execve' | cut -f 2 -d '"' | sort
> | uniq -c
>      1 /bin/date
>      1 bin/log_printing.sh
> pbarker at milligan:~$

Thanks, most useful.  Although I have added a:

   grep -v ENOENT |

in there to take care of PATH searching!

ta


a


More information about the linux mailing list