문제

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