Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all,
A data feed from my proxy is broadcasted to my consumers outside my datacenter at remote locations through http connection. This feed suddenly times out and there is currently no way to determine when the feed actually stops until my clients mail in with a complaint.
I have thought about using a crontab to set a MAILTO if the cron job tests the connection to the proxy. can anybody guide me on how to achieve this task? i want to know when the feed goes down so i can react before my clients mail in a complaint...
Thanks
Thanks for your reply catkin, i know how to do all the three of them but cannot determine how to unify them into a single cron job... What is this other method you're talking about?
You could write a script to do all three things and either call it from cron (would fill the cron log if run very often) or the script could have something like:
Code:
while true
do
sleep 5 # or whatever is appropriate delay
<do whatever you need>
done
The script could normally be started at boot either from the boot scripts or cron; to start it without having to boot you could use
hi catkin, saw your post. great idea... my problem is the logs growing. I tried this:
MAILTO="myemail"
* * * * * / sbin / ping -c 1 192.168.100.2> /dev /null
It is supposed to move all standard output to a black hole and mail standard errors to me.... i have run it into the proxy machine and i didn't get an email.... maybe its because the system didn't time out as usual...
Last edited by villagemanduo; 09-01-2011 at 10:14 AM.
No as a matter of fact i don't... this is what the problem is. I pulled the rj45 from the proxy to see if it will trigger the mails and it didn't so i guess it didn't have a mail server instance running on the machine. i know there would be a mail script that can do this... can you recommend any?
exim, postfix and sendmail are popular choices. All are powerful programs with what can be a bewildering array of configuration options. postfix was intended to be a simpler alternative to sendmail but it grew and is almost as complex now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.