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

By neokrates, written on June 22, 2010

bash   snippet

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • Which virtualization do you like most?

    • I don't use virtulization (100%, 5 Votes)
    • VM Ware (0%, 0 Votes)
    • Virtual Box (0%, 0 Votes)
    • Parallels (0%, 0 Votes)
    • coLinux (0%, 0 Votes)
    • Xen (0%, 0 Votes)
    • OpenVZ (0%, 0 Votes)
    • Something else (0%, 0 Votes)

    Total Voters: 5

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

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'
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +8 (from 8 votes)
8 votes 'YES'  0 votes 'NO'
TAGS
No tags for this post.
RELATED
Pages
Posts
    nope :(
SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

Leave a Reply