Article View: alt.privacy.anon-server
Article #312362Re: Ping redjohn
From: inwtx
Date: Sat, 19 Dec 2020 14:41
Date: Sat, 19 Dec 2020 14:41
62 lines
2417 bytes
2417 bytes
>
>>
>> On 2020-12-17 8:18 a.m., inwtx wrote:
>>
>>>>
>>>> Appears that mixmaster stopped running. I just rebooted my server
>>>> and things are moving again.
>>>>
>>>
>>> Here is a small script I run every 5 minutes to check that certain
>>> programs are running.
>>>
>>>
>>>
>>> #!/bin/bash
>>>
>>> ## PgmsRunningGlobalChk.sh
>>> ## Add/insert the program name into the array list.
>>> ## Place your home email address in the emailaddr= field.
>>>
>>> ## Cron: */5 * * * * /root/PgmsRunningGlobalChk.sh &> /dev/null
>>>
>>>
>>> filePath=${0%/*} # current file path
>>>
>>> emailaddr="your@email.address"
>>>
>>> array=(
>>> "mixmaster" # mixmaster
>>> "yamn" # yamn
>>> "master" # nginx
>>> "qmgr" # postfix
>>> )
>>>
>>> for index in ${!array*}; do
>>> varpgm=${arrayindex}
>>>
>>> if $(pgrep --exact -x $varpgm) == "" ; then
>>> mutt -s "Warning: Program not running - $varpgm" $emailaddr <<< "Warning: Program not running - $varpgm" # send error
>>> fi
>>>
>>> done
>>>
>>> exit 0
>>>
>>
>> This is useful. Thanks for sharing.
>>
>> For my servers I have been using an online notification service called
>> UptimeRobot <https://uptimerobot.com> which sends an email when it
>> notices the server is unreachable. But using your script in addition to
>> uptimerobot.com is an even better solution since if the entire box goes
>> offline your script won't be able to notify. But UptimeRobot will.
>>
>
> You can also use one of these on a windows machine.
>
> https://listoffreeware.com/best-free-ping-monitoring-tools-windows/
Here is what seems to be a good Windows pinger:
https://sourceforge.net/projects/majorpinger/
Technical Details
Message-ID:
<rrl3ff$tsm$1@news.mixmin.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<rrl1sr$otb$1@news.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <rrl3ff$tsm$1@news.mixmin.net> Subject: Re: Ping redjohn Date: Sat, 19 Dec 2020 08:41:50 -0600 From: "inwtx" <noreply@inwtx.net> References: <rrl1sr$otb$1@news.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: alt.privacy.anon-server Organization: Mixmin Injection-Date: Sat, 19 Dec 2020 14:41:51 -0000 (UTC) Injection-Info: news.mixmin.net; posting-host="35b24c43f24abb1063f5dc069e43e02b3ecba8cd"; logging-data="30614"; mail-complaints-to="abuse@mixmin.net"