10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to check how many processes are running with same names and get their respective counts.
ps -ef|grep -Eo 'process1|process2|process3| '|sort -u | awk '{print $2": "$1}'
Output would look like :
$ ps -ef|grep -Eo 'process1|process2|process3| '|sort | uniq -c | awk '{print $2":... (8 Replies)
Discussion started by: simpltyansh
8 Replies
2. UNIX for Beginners Questions & Answers
I have one shell script in NAS shared location. Since NAS is mounted in many servers, script can be run from any of those servers.
I want to make sure if the script is already running, it should not allow others to run it. I googled it and got some idea that i can touch one empty file in the... (8 Replies)
Discussion started by: thomasraj87
8 Replies
3. Shell Programming and Scripting
Happy New Year
Is there a quick way to check to see if a script is already running.
I want to put in a check in the script to exit, if already running.
Currerntly i can only think of doing it the following way.
# ps -ef | grep -i 3_HOUSEKEEPING_FFTVTL_TO_FFTDSSU_DUPLICATION.ksh |... (5 Replies)
Discussion started by: Junes
5 Replies
4. Solaris
Hi,
I put this at start of my shell (korn shell) to be sure that the shell is not already running and sometimes it fails and says that it is already running which is not true !
sleep 1
/usr/bin/ps -ef | /usr/bin/grep "$0" | /usr/bin/egrep -v grep>$LOGDIR/$0.res
isup=$(cat $LOGDIR/$0.res|wc... (4 Replies)
Discussion started by: zionassedo
4 Replies
5. Shell Programming and Scripting
How to check what cron is scheduled to run? I don't want to modify anything. Thanks (1 Reply)
Discussion started by: stevensw
1 Replies
6. UNIX and Linux Applications
Hi
I would like to check if an instance of a script is already running.
I've seen many different examples, but I haven't the slightest idea as to how to do this.
Can you please help.
Thank you. (5 Replies)
Discussion started by: ladyAnne
5 Replies
7. Shell Programming and Scripting
Hi ,
I have a csh code below which check the process if it's running.
Can any expert advise me on the following:
1) what does this notationmean ">!" and how is it different from the append ">" notation ?
2) how does "setenv" work in this code ?
# Check whether there is a running... (3 Replies)
Discussion started by: Raynon
3 Replies
8. Programming
Dear all,
When I write the daemon programs it is consuming high memory and processor time. How can I avoid this?
But, the system daemons are not consuming more. How?
Can any one explain how the system daemons are handling the memory consumption and processor time.
Thanks,... (1 Reply)
Discussion started by: nagalenoj
1 Replies
9. Shell Programming and Scripting
I have this script:
-------------------------------------------------------
#!/bin/ksh
#
if ] ||
]
then
echo "Executing main_load.sh script"
/usr1/psc_load/jobs/cron/main_load.sh "ods"
else
echo "File not found, do nothing"
fi
exit 0
... (4 Replies)
Discussion started by: rose1207
4 Replies
10. Shell Programming and Scripting
using ps -ef | fgrep "ld_data"
how do i write a script to check that it didn't already run
Thanks (2 Replies)
Discussion started by: Link_02
2 Replies