Use ‘watch’ command with pipe (with simple process monitor example)

By neokrates, written on June 22, 2010

bash   snippet

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 756 views
Rate it
Ad
Poll
  • Which features are most important for perfect CI tool?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

Dump all java processes every 15 seconds. Log the result into processmonitor.log. Add timestamps.

watch -n 15 'ps -ef|grep java|grep -v grep >> file.res ; date >>
processmonitor.log'
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +9 (from 9 votes)
9 votes 'YES'  0 votes 'NO'
TAGS
No tags for this post.
RELATED
Pages
Posts
SOCIAL
Be Sociable, Share!

Leave a Reply