How to find out what parameters/arguments a program is passing when it calls other programs?

3

1

I am using a program called get_iplayer, and during it's run, it calls other programs such as RMTPdump, flvstreamer and ffmpeg.

What I would like to find out is what information it is passing to these program. I can see on terminal that they have been called and they are working, but I can't see what they've been given.

Geesh_SO

Posted 2012-11-21T00:59:24.940

Reputation: 383

Answers

2

On Linux, use strace to log the execve() syscall.

strace -f -e execve -o iplayer-trace.log get_iplayer ...

On Windows, use Process Monitor – enable just the "Processes" category. (Needs Administrator privileges.)

On BSDs...edits would be welcome. It seems that dtrace is the usual way, at least in some of them:

dtrace -n 'proc:::exec-success { printf("%d %s", pid,curpsinfo->pr_psargs); }'

user1686

Posted 2012-11-21T00:59:24.940

Reputation: 283 655