How to Use watch Command
If you need to execute a certain command repeatedly, you may use the watch command to do the repeating for you.
In this example, the command ps will be run every 2 seconds to monitor how fast the new processes spawn:
$ watch -n2 "ps aux|grep http"
The watch command will run ps every two seconds and it will display the output in stdout. You may increase or decrease the interval as necessary. This is useful if you want to monitor a process at certain time intervals. Personally, I use this to check for processes that spawns children way too fast.
Related Posts
Post comment
Search PinoyTux
Subscribe to Email Feeds
Blog Lounge
Popular Posts
Recent Posts
Drop your Card Here
Recent Comments
- david portman
on Cebu Pacific Airlines is Evil! - kim chiu
on Cebu Pacific Airlines is Evil! - Alma
on Cebu Pacific Airlines is Evil! - AnnKatz
on Cebu Pacific Sucks - chinito
on Cebu Pacific Airlines is Evil!








