We have scheduled few jobs/scripts in cron and it runs on daily basis at a specified time. We have a cron jobs has various parameters for main scripts like
/home/test/mainscript.ksh main_param
when the above jobs triggers, mainscript.ksh has below code and it refers
main_param="param1 param2 param3 param4"
the script1.ksh triggeres one by one for these params like script1.ksh param1 (once it finishes its execution), then it triggers script1.ksh param2
So, consider script1.ksh param1 is still running till next day the same param1 triggers (as said cron jobs runs on daily basis), it overlaps the logs and makes more usage in the database/server.
In order to avoid that, I have included the below code
It was running perfect in Sun solaris box, but in AIX, it started misbehaving like when the next param runs on the same day, it says that älready process is running"
script1.ksh param1 -- after it completion, it says that script1.ksh param2 is running (more than 1 instance condition) but there is no chance of param2 is running currently.
I have checked the condition as $check -gt 2, but it throws the message rarely that "Already process running"
Please help me to identify the correct process and throw this message.
your timely help is much appreciated as I m in the neck moment.
I am trying to find out that how many number of threads are currently running or in any other state which is created by POSIX standard in a process.
First I have defined a variable called proc_var of type proc defined in sys/proc.h.Next I open up the dir /proc and per directory wise I do an ioctl... (7 Replies)
I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
i have something like this
tablesName="abc def hij akn ... etc etc"
count=0
for i in $tablesName
do
echo -en "\b\b\b\b\b\b\b\b\b\b\b\b\bTableCount: $count"
count=`expr $count + 1`
done
the above is just a description wha i need is when the loop executes
the... (1 Reply)
Hi all
I have an input file which contains so many entries like this: And, I want to count hw many among ASN in one column are converted to LYS in third coulmns. which means output shuld contain only "ASN number LYS"
Kindly let me know wny programm for this
My input is
ASN 217 LYS... (2 Replies)
Hi,
I am trying to make a script which should execute if the same is not getting executed already.
To implement this check, I wrote a fragment of code as below
$ cat abc.sh
#!/bin/bash
check=0
#grepping "sh -x abc.sh" because if i check only for "abc.sh" and the file is open in say... (12 Replies)
Hi,
I have a file with contents
So what I have to do is
In short, break the file after every 6 lines and then truncate new line to tab for these 6 lines.
I am not able to execute the for loop in awk properly.
The idea is something like this:
less file| awk '{for .... {if ((nr>=1)... (7 Replies)
Hi guys,
I'm writing a script on a Solaris 10 server (server A) that needs to telnet 2 servers (server B & server C) and get a certain process count from these 2 servers.
Then on server A, I check if both counts are greater than 17, I do a sendmail to concerned people.
For the telnet part,... (7 Replies)