I have a process that crashes quite often. I'm unable to fix it since I'm not the developer and it is beyond my control to do so. However restarting the process will fix the issue which is fine.
I would like to receive a notification via email that the process has failed so I can login and restart the process without having to activelymonitor it.
Is this possible to achieve without installing additional software as this is not allowed for my servers? I was thinking of a bash script like the one below without the threshold only when it fails.
swx - is name process name
500- threshold for permitted processes
You can add this to crontab like below:
Thanks in advnace for any help provided
It is more a question of having sendmail installed and configured... which I doubt unless your server is a mail server also... but with a bit of luck may be configured to send to mail server...
I would like for modify that script to monitor when the Child process fails. What happens is that I have a parent process that starts and spawns different child processes. If one child process dies then the parent will continue to run but not correctly. I need to be notified if that child process fails
---------- Post updated at 08:35 AM ---------- Previous update was at 06:23 AM ----------
I wanted to clarify something. I realize that I can't reliably count on ps | grep or variants to accurately tell me what PID is started. However I know what I need for interim until this problem is resolved in the next release.
I have a process named Foo that is the parent, Bar is the child process. If Bar dies off Foo will continue to run and will not respawn Bar. How do I know this because the program to restart Bar requires Foo to be restarted first.
So when I want to monitor a child process it is just so I know to login and restart the parent process.
To make change to the ps command I was looking at
or
The else portion will then fire off the sendmail to notify me.
Hi there.
I used to use linux a lot a number of years ago but it has been quite a while so ?I really consider myself a beginner again.
I have an old IBM eServer X Series 335 machine and I want to get it back up and running for a number of reasons. I knew that one of the SCSI drives was bad and... (2 Replies)
Hi all,
I have read about sendmail running as 2 separate process.
1 as a MSP, and the other as the real daemon or MTA.
In my current configuration,
the sendmail-client is disabled.
Both submit.cf and sendmail.cf are left as default untouch
I do not specified any mailhost... (3 Replies)
so lets say I have a process in cron that writes to a particular directory /var/tmp/EXAMPLEA
so, from time to time, say every couple of months, an upgrade is made. and here's how the upgrade works:
1. move the existing directory /var/tmp/EXAMPLEA somewhere else and name it differently...i.e.... (6 Replies)
I try and start a short script nohup the nohup immediately stops.
Here's the code
#!/bin/sh
rm backup.out
for i in `cat /home/xxxxx/Allservers.txt`
do
echo "Logging onto $i"
ssh -qt $i '/usr/local/bin/sudo "/src/bkupsa"'
done >>backup.out
Any ideas? (3 Replies)
Hi,
I am not sure how well I can explain this.. Below is the file which I want to perform the code on.. Column 2 are my stop sites and column 3 are my start site.. For every gene I need to look at my starts(column3) and add +10,000 to it only if there is no gene when we move upstream 10,000(... (3 Replies)
my ksh script is not working...
i wanna remove lines in file2.txt from file1.txt
# cat file1.txt
this is line one
this is line two
this is line three
this is line four
this is line five
# cat file2.txt
this is line two
this is line three
# cat my_script.ksh
#!/bin/ksh
i=1
y=1... (8 Replies)
Hello Experts
I have M4000 Solaris 10 server, from few many days there are too many sendmail and mail.local process starting on server and each time i need to kill mannualy using pkill send mail, some time there will 600 of them taking 30mb memory for each and hence slowing down the server,... (2 Replies)
The while loop exits (early) when a simple ssh command is run.
#!/bin/ksh
#set -x
#-------------------------------------------------------------------------
# Functions Section
#-------------------------------------------------------------------------
while :
do
cat list.txt|while read... (1 Reply)
Hi,
SUN E3500 box.
boot cdrom -s
create disk partitions
mount on /a one of the partitions
cd /a
ufsrestore -rf dev/rmt/0n
Starts create de inodes
Starts the extraction
and then......
stops the extraction without any error and didn´t extract all files
and stays forever waiting for i... (1 Reply)
Hi
can anybody help me when i boot up my machine the LED runs until it gets to 406coch6 and it simply stops their
noting appears on the screen...?
Is their a website that lists all the codes and their meaning
Thanks
Liam (2 Replies)