Question

Is it possible find out what files were produced by a particular script by just having it's pid ?

input:
scriptA.ksh pid: 1234

output:
scriptA.log

OS version: AIX

Was it helpful?

Solution

You could use truss (similar to strace on Linux) for this.

truss scriptA.ksh 2>&1 | grep open

You'll have to sift through some unrelated calls to open(), but your log files will be in there.

Also, truss can attach to existing processes by using the -p switch.

Note: I speak from experience with strace, but it looks like this all holds for truss...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top