سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top