About

Script Categories

Shell Script To Display The Running Process Running On The System Every 30 Seconds For 3 Times Only

Posted in Academic » Monitoring

#!/bin/bash
# Write a shell script to display the process running on the system for every
# 30 seconds, but only for 3 times.
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
#
# for loop 3 times
for r in 1 2 3
do
	#see every process on the system
	echo "**************************** x^x^x ****************************"
	ps -e
	echo "**************************** x^x^x ****************************"
	#sleep for 30 seconds
	sleep 3
        # clean
done

Download - Email this to a friend - Printable version

Is your site working? Monitor Your Web Site 24/7. Get SMS alerts on server downtime! Free 30-day trial including 20 SMS!

Related Other Helpful Shell Scripts:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags: , , , , , ~ Last updated on: September 13, 2008