The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Idle Oracle Process has removed automatically in AIX5.2 balareddy AIX 1 06-26-2008 11:07 PM
sar output gives 98% idle CPU Ashrunil HP-UX 3 08-24-2007 06:02 AM
CPU idle melanie_pfefer SUN Solaris 4 01-19-2007 02:26 PM
finding idle time of a process Krrishv Shell Programming and Scripting 36 01-10-2007 06:34 AM
Identifiy and Kill Idle Unix(SCO) Process called externally vbalajis SCO 1 12-19-2003 07:52 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-30-2007
Registered User
 

Join Date: Jul 2006
Posts: 141
How to see if the process is idle

We are running AIX 5.3 and for ICICS Printing we have process called cicstermp runing whcih attaches the print to print queue

But is process is triggered when ever a print is to be given

Can we find the processes which are idle

I mean every time a print is given it creats a new cicstermp process but it doesnot kill it when its done

Can we find these kind of processes
Some times even if the shell which triggered it gets closed the process runs with out a terminal

I am posting few of those output form ps -ef


root 5931186 1 0 10:00:12 pts/29 0:00 cicstermp -r CICSREGION -n PRINTER -P lp -cs -dcaisse

root 6017234 1 0 Aug 28 - 0:00 cicstermp -r CICSREGION -n PRINTER -P lp -cs -dcaisse
Reply With Quote
Forum Sponsor
  #2  
Old 11-26-2007
Registered User
 

Join Date: Nov 2007
Posts: 4
Hi,
i hope this will help you

# Checking and counting the process [ABC.EXE] which is running on root directory "/"
COUNT=`cd / |ps -ef |grep ABC.EXE |wc -l`

# THIS WILL CHECK EITHER SERVICE IS RUNNING OR NOT
if [ $COUNT = 0 ]
then
ABC.EXE
echo "SERVICE STARTED"
exit 0
fi

# THIS WILL CHECK IF THE SERVICE IS RUNNING ONLY ONCE
if [ $COUNT = 1 ]
then
echo "SERVICES ALREADYRUNNING"
exit 0
fi

# THIS WILL CHECK IF THE SERVICE IS RUNNING MORE THAN ONCE
if [ $COUNT > 1 ]
then
banner ERROR
echo "SERVICES HALTED - MORE THAN ONE INSTANCE"
echo "PLEASE RESTART"
echo "PRESS ANY KEY TO CONTINUE"
read exit
exit 0
fi
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0