09-20-2013
There are several ways to do this.
- you can set ping to the interval and process the output, perhaps for each hour so you can switch logs.
- you can call ping every interval for one ping and process the output. You can regenerate the log file name on each pass.
- You can send part of your script to the far end using ssh, and send a small message every interval. To switch logs, you might limit the runs to an hour. For a full duplex check it might just be 'ssh there cat', so the messages go up and back.
- You can go to C/C++/Java/PERL/Python so the log switch is easier to detect and implement. You might even make it a free standing pipe fitting for just that. Scripts are harder to make blockage sensitive, compared to poll(). You could just write a ping output watcher. It might be a good time to use aio (asynchronous I O), so you can check progress without blocking any thread/process.
6 More Discussions You Might Find Interesting
1. Programming
I am developing a Network Appliation to monitor computers in a network.
Specs are
App monitors the current web page viewed in each system
App also can shutdown the computer in the network
App can show all process run by each computer in the network
I am now confused how to start my... (2 Replies)
Discussion started by: valaparambil88
2 Replies
2. UNIX for Advanced & Expert Users
Hello,
How to we typically monitor the % of utilization of network cards on a Unix box,basically the % utilization of the bytes transfered of the network card. This is required on all the flavours of OS - HP, AIX, RHEL, Sun etc.
Please let me know.
Thanks. (1 Reply)
Discussion started by: devtakh
1 Replies
3. Red Hat
How to monitor network device traffic using MRTG?
How can I add network devices in MRTG configuration to monitor? (2 Replies)
Discussion started by: manalisharmabe
2 Replies
4. Shell Programming and Scripting
Hello Guys,
I am starting with shell scripting and I need some help with my problem... The scenario is, I have like 20 servers inside one company, where I face some network issues affecting my servers functionality (Voice/recorder/IVR systems). So, to evidence the network events, I decided to... (1 Reply)
Discussion started by: raval
1 Replies
5. Shell Programming and Scripting
Hi
I want to write a script for netflow service
because my service doesnt send any packet to netflow walker (server).
Although the service is started but it does not send any packet to server until i restart the service
I want to write a script in order to restart the service... (7 Replies)
Discussion started by: mohsen1366
7 Replies
6. IP Networking
My son does homework on a school laptop. I was thinking about setting up a gateway on my home network, so that I can monitor web traffic and know if he is doing his homework without standing over his shoulder. Ideally I would like to use the Raspberry Pi Model b that I already have. However, I... (15 Replies)
Discussion started by: gandolf989
15 Replies
LEARN ABOUT LINUX
monitor
monitor(1) monitor command monitor(1)
NAME
monitor - receive logging information from LPD
SYNOPSIS
monitor [ -u ] [ -t ] [ port ]
DESCRIPTION
The monitor program is a template for a printer status monitoring program. It will open the specified TCP and/or UDP port, and then wait
for accounting or other information to be sent. It prints this information on it standard output.
OPTIONS
-u wait for connections on the UDP port.
-t wait for connections on the TCP port.
port Use the specified port number.
EXIT STATUS
The following exit values are returned:
zero (0) Successful completion.
non-zero (!=0) An error occurred.
SEE ALSO
lpd.conf(5), lpc(8), lpd(8), checkpc(8), lpr(1), lpq(1), lprm(1), printcap(5), lpd.conf(5), pr(1), lprng_certs(1), lprng_index_certs(1).
AUTHOR
Patrick Powell <papowell@lprng.com>.
HISTORY
LPRng is a enhanced printer spooler system with functionality similar to the Berkeley LPR software. The LPRng developer mailing list is
lprng-devel@lists.sourceforge.net; subscribe by visiting https://lists.sourceforge.net/lists/listinfo/lprng-devel or sending mail to lprng-
request@lists.sourceforge.net with the word subscribe in the body.
The software is available via http://lprng.sourceforge.net
LPRng 2006-12-09 monitor(1)