Results 1 to 5 of 5

Thread: How to figure out where/what program is writing

  1. #1
    Join Date
    Nov 2008
    Beans
    4

    How to figure out where/what program is writing

    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

  2. #2
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: How to figure out where/what program is writing

    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.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How to figure out where/what program is writing

    Run lsof as root with sudo. If you use

    Code:
    sudo lsof | grep program_name
    you'll see all the files being used by "program_name".
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: How to figure out where/what program is writing

    Quote Originally Posted by SeijiSensei View Post
    Run lsof as root with sudo. If you use

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

  5. #5
    Join Date
    Nov 2008
    Beans
    4

    Re: How to figure out where/what program is writing

    Works like a charm. Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •