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
- Mela
on Cebu Pacific Sucks - madcSPYnX
on AMA Desktop: Linux Made in Philippines - David Fortier
on Cebu Pacific Sucks - David Fortier
on Cebu Pacific Sucks - Mr. Walkman
on Shopping for Mobile Phone: Sony Ericsson Phones Only








