Sponsored Content
Full Discussion: script for continous ping
Operating Systems Linux Red Hat script for continous ping Post 302630207 by amarlinux on Wednesday 25th of April 2012 01:38:18 PM
Old 04-25-2012
in2nix4life,
Script is running fine now. I do see a few problem.

1. Why am i not able to delete the monitor.log file
2. Though i set the ping for 5 sec but it is continuously running till now. Why is that?
3. Can you please explain the later part
awk '/packets/{if($4 ~ 0) print $0)' >> /tmp/monitor.log;echo >> /tmp/monitor.log;done
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

To remove Continous blank spaces from a file in UNIX

All... I want to remove blank spaces in file . I just leraned that we can use " cat <Input filename> | tr -s ‘ ‘ > <Target file name> " i also know with SED we can replace a blank space by other character by sed s/ /*/g filename. Please let me know how can i do that by... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

2. UNIX for Advanced & Expert Users

Continous Integration for Unix / Linux

Hi all, We have serious problem with continuous integration system for application building on few different platforms. (aix 5.2, 5.3 solaris 8,9 , SUSE Linux 9.3, 10 , Slackware Linux 10,11,12, RedHAt Enterprise Linux и Windows 2003) We need application ( program ) to do the following tasks:... (1 Reply)
Discussion started by: +Yan
1 Replies

3. UNIX for Dummies Questions & Answers

To run a job continous (24x7)

Hi All, I have a job. I need to create a shell script which will execute that job continously i.e 24x7. Please help me in writing this script. Thanks, Kumar66 (6 Replies)
Discussion started by: kumar66
6 Replies

4. Shell Programming and Scripting

Awk Print Only Continous Numbers

Hi, i need help to print only those numbers which occur next to each other from a file. Input: 1 2 3 9 44 45 46 77 79 80 81 Desired Output: (8 Replies)
Discussion started by: saint2006
8 Replies

5. Shell Programming and Scripting

Need bash script to ping the servers and rename the output file each time the script is ran

HI, I have a file serverlist in that all host names are placed. i have written a small script #./testping #! /bin/bash for i in `cat serverlist` do ping $i >> output.txt done so now it creates a file output.txt till here fine.. now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies

6. UNIX for Dummies Questions & Answers

help with continous scroll

I figured out my question. mods please delete. Thank you (2 Replies)
Discussion started by: rpmischris
2 Replies

7. Shell Programming and Scripting

Extract & Manipulate continous data stream-- tcpdump

Hello; I have this rather tricky problem to solve --(to me, anyways) .. I am processing the following one liner with tcpdump.. tcpdump -i T3501 -A ether host 00:1e:49:29:fc:c9 or ether host 00:1b:2b:86:ec:1b or ether host 00:21:1c:98:a4:08 and net 149.83.6.0/24 | grep --line-buffered -B... (5 Replies)
Discussion started by: delphys
5 Replies

8. Programming

Ping test sends mail when ping fails

help with bash script! im am working on this script to make sure my server will stay online, so i made this script.. HOSTS="192.168.138.155" COUNT=4 pingtest(){ for myhost in "$@" do ping -c "$COUNT" "$myhost" &&return 1 done return 0 } if pingtest $HOSTS #100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
IP-MONITOR(8)							       Linux							     IP-MONITOR(8)

NAME
ip-monitor, rtmon - state monitoring SYNOPSIS
ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ] OPTIONS
-t, -timestamp Prints timestamp before the event message on the separated line in format: Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec <EVENT> -ts, -tshort Prints short timestamp before the event message on the same line in format: [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT> DESCRIPTION
The ip utility can monitor the state of devices, addresses and routes continuously. This option has a slightly different format. Namely, the monitor command is the first in the command line and then the object list follows: ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ] OBJECT-LIST is the list of object types that we want to monitor. It may contain link, address, route, mroute, prefix, neigh, netconf, rule and nsid. If no file argument is given, ip opens RTNETLINK, listens on it and dumps state changes in the format described in previous sec- tions. If the label option is set, a prefix is displayed before each message to show the family of the message. For example: [NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE [LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff If the all-nsid option is set, the program listens to all network namespaces that have a nsid assigned into the network namespace were the program is running. A prefix is displayed to show the network namespace where the message originates. Example: [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE If the file option is given, the program does not listen on RTNETLINK, but opens the given file, and dumps its contents. The file should contain RTNETLINK messages saved in binary format. Such a file can be generated with the rtmon utility. This utility has a command line syntax similar to ip monitor. Ideally, rtmon should be started before the first network configuration command is issued. F.e. if you insert: rtmon file /var/log/rtmon.log in a startup script, you will be able to view the full history later. Nevertheless, it is possible to start rtmon at any time. It prepends the history with the state snapshot dumped at the moment of starting. If the dev option is given, the program prints only events related to this device. SEE ALSO
ip(8) AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com> Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com> iproute2 13 Dec 2012 IP-MONITOR(8)
All times are GMT -4. The time now is 08:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy