This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Saving Snapshots of TOP automatically every half hour

I have a problem I am trying to debug where my astaro's load is locking for long periods of time.  The thing is, I don't necessarily notice it until the next day when I get the report so I can't see what top is showing (I reboot automatically at 6am).

I am not a linux guru, but something tells me that a script for this wouldn't be too difficult.  Any ideas?


This thread was automatically locked due to age.
Parents Reply
  • top -b -n 1 > /tmp/top-report-`date '+%Y-%m-%d-%H%M'`.txt

    would create one file each minute, with the date in the filename.

    You don't want to let this run too long, or you'll have 1000's of files created.

    You could probably do a SMB mount...
    mkdir /tmp/toplog
    mount -t cifs ...

    Barry
Children