I don't understand the requirements well enough to give you a complete answer. But here's a sample of how you can use "pkill" (if you system has it) to determine if a process is running or not. I think it's simpler and easier to understand than a pipeline of ps/grep.
Sending a "0" signal doesn't actually send any signal to the process. So you can't unintentionally interrupt it. It's just a simple way to find out if the process with the given pattern is running.
I have a shell script which runs from 7AM to 3AM every day. The script performs certain monitoring functions and if it has a problem it may need to email someone about it. The problem is that the notification process was never modified to handle running past midnight (from 23:59:59 till 3AM). ... (0 Replies)
hi all,
i would like to write the shell script to monitoring the processing, but if i passing the parameter the number of process is incorrect
how to slove it? many thx
got the correct number of process as following script:
===========================================================... (3 Replies)
Hi ,
I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose.
#!/bin/sh
diff common.log... (3 Replies)
I have a requirement of checking the current system time and performing certain actions in a shell script. example:
if the current system time is greater than 1400 hrs, then perform step 1,2,3
if the current system time is greater than 1000 hrs, then perform step 1,2
if the current system time... (2 Replies)
Hi All,
I have a Java application running in the background which process looks like this.
java -DMyService=Y -DWorkingDir
And I have a monitoring script which looks like this;
count_service=`ps -aef | grep MyService | wc -l`
if ; then
echo "Service_Stopped on `date`" >>... (6 Replies)
Hello All,
I have a problem calculating the time difference between start and end timings...!
the timings are given by 24hr format..
Start Date : 08/05/10 12:55
End Date : 08/09/10 06:50
above values are in mm/dd/yy hh:mm format.
Now the thing is, 7th(08/07/10) and... (16 Replies)
Some of the colors weren't working on the Monitor. I found pressing around the plastic border of the screen brought them back. I opened the monitor casing and used the folded paper to put pressure against the LCD panel and housing. Wah Lah. More of a bend than a hack I guess. (2 Replies)
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Today I found out that many new user registrations were having trouble logging in.
I spend about three hours debugging this, and I think I fixed the problem.
If anyone registers and has trouble logging in please contact me on Live Chat.
Thanks. (1 Reply)