I have a tantan.sh under /home/mydir which is a caller to another script "tantan.sh" under /home/anotherdir
-----------------------------------------------------------
/home/mydir/tantan.sh
------------------------------------------------------------
-----------------------------------------------------------
/home/anotherdir/tantan.sh
-----------------------------------------------------------
This always echos 3 PIDs and not two. My requirement is to see, that if there are two or more tantan.sh process initiated, then exit. Only one tantan.sh must be there at any time, parellel processing is not supported.
I was thinking to go this way, if there is any other process other than the currentPID and parent PID, then exit, but since the ps command returns three PIDs, I am not able to get a solution, please advice.
Last edited by Franklin52; 10-11-2013 at 03:04 AM..
Reason: Please use code tags
Hi,
I need to list out the processes which are started/restarted today in my Solaris box. If not possible need to convert the process uptime in minutes or seconds and compare it with a configurable value to list out those process ids for further processing in my scripting.
Can any one guide... (7 Replies)
Hi,
I have four tomcat instances named PNK, PNK1, PNK2, PNK3.
All are running on the same server.
To kill tomcat instance I usually do below for PNK1,PNK2,PNK3
kill -9 `ps -ef|grep tomcat|grep PNK1|grep -v grep|awk '{print $2}'`
But the above command does not work for PNK. Can some... (7 Replies)
Hi All,
I am using RHEL 6 linux in my lab server and I am new to RHEL6 features.
lab1:root> uname -a
Linux lab1 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 17:04:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
I am facing a peculiar issue in my lab machine. When I connected via Opsware Global... (0 Replies)
Hi,
I need a script to kill the process Ids for the user ABC.
I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out.
#!/bin/bash
for filesize in $(ls -ltr | grep... (4 Replies)
Hi All
what is the command to check process ids , which are running from long time and which are consuming more cpu?
Also how to check, what a particular PID is running what
For Ex:
i have a pid :3223722 which is running since from long time,
if i want to check what is this... (1 Reply)
Hello all:
Working on a job I was asked get a simple script to perform the following task and would like to ask for some help. I'm looking forward to learning more and diving deeper into the World of Open Source servers.
I need a script for a Unix server, using as few lines as possible, that... (4 Replies)
Hi all,
I need a script that will loop around all the current processes and take a pmap -x <process id> and output each pmap to a separate file.
Would anyone have a quick command to do this? (2 Replies)
Hello All,
I need to track the exact process ID related to a particular application running on HP-UX machine. i.e. the exact functionality of fuser unix command.
fuser application.log // It gives the exact process ID for application.log
Since there is no provision for 'fuser' in HP-UX... (13 Replies)
Hello all,
I develop an ERP application that runs on a number of *nix flavors. This application had been around for quite a number of years.
As part of the application launch, we do a check for a background process using the following command:
ps -ef | grep -v grep | grep mi\/ba | grep... (6 Replies)