PDA

View Full Version : How to figure out where/what program is writing



astef
December 6th, 2012, 06:34 PM
Hi everyone,

I have a third-party program installed (binary, no source code) that keeps crashing. Support from provider is close to useless. iotop shows that the program (idle) keeps writing to disk. top also shows it uses more and more CPU until 100% when it becomes unresponsive.

Is there a way to figure out what this program is writing? Maybe I can modify the output file somehow.

Thanks

drmrgd
December 6th, 2012, 06:40 PM
Maybe you could run it from the terminal with a strace dump to see what it's writing and what resources are being use? Just run strace <program_name>. You could also add the -o option to write the output to a file for easier parsing.

SeijiSensei
December 6th, 2012, 06:43 PM
Run lsof as root with sudo. If you use


sudo lsof | grep program_name

you'll see all the files being used by "program_name".

drmrgd
December 6th, 2012, 06:55 PM
Run lsof as root with sudo. If you use


sudo lsof | grep program_name

you'll see all the files being used by "program_name".

Ahhh....totally didn't think of 'lsof'. To extend on that notion (very good idea!), you can get that information in htop as well, which might in conjunction with the rest of the htop output give a little more clear picture.

astef
December 6th, 2012, 07:21 PM
Works like a charm. Thanks!