Frage

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

War es hilfreich?

Lösung

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...

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top