Sponsored Content
Top Forums Shell Programming and Scripting Ping script using Redhat and BAsh Post 37146 by edkung on Friday 13th of June 2003 08:41:07 AM
Old 06-13-2003
Thanks, that worked much better. Getting both the positive and negative results I originally wanted. I have to work on the sendmail part (get the right switches).

Now here is another question

Lets say in my iplist.txt file I want to include a name for the ip address
ex: 192.168.60.5,router1

and I want to have the email subject to say

Router1 is down!

I am thinking that any of the text editors will help with this...(sed awk or what have you)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help With Ping Script

Hello all...I'm new to Unix and learning. What I'm trying to create is a script that will ping a known range of IP addresses, say 192.168.1.1 to 192.168.1.254. For each address that no reply is received, that address will be written to a log file that will be emailed to an administrator. My wife... (1 Reply)
Discussion started by: spmitchell
1 Replies

2. Shell Programming and Scripting

Bash script for ping in your own subnet

I have a question for one who wants to help me. I want to create a bash script to ping IP-adresses. It must first ask me the beginnen IP, then the ending IP like: 192.168.100.1 - 192.168.100.255. When nothing is filled in, then it must find my subnet and ping that, like when my ip is... (14 Replies)
Discussion started by: ugurgazi
14 Replies

3. UNIX for Dummies Questions & Answers

Ping bash script to file

Hello: I have this script: #!/bin/bash #for loop for ip in `cat ips` do ping $ip | grep "is alive">>pingtestlog done And its working properly with this input: ericadm@amxcruas1> cat ips 10.196.60.4 10.196.61.210 10.196.62.73 10.196.61.152 (5 Replies)
Discussion started by: asenav1
5 Replies

4. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

5. Shell Programming and Scripting

Using ping in script

Hi. I have a server with multiple network ports that need to be tested to a list of destinations. I'm trying to write a scripts to automate this but can't seem to get past an error and could use some help. I have two test files one contains the ip addresses of the onboard NICs and the other... (10 Replies)
Discussion started by: mikez104
10 Replies

6. 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

7. Shell Programming and Scripting

ping with timeout bash

Hi experts: I want to do below thing with bash if ping 192.168.0.1 sucussful then do somthing without delay, if ping failed within 20s, then kill ping and exit not sure this can use "alarm" to do this. any code will be welcome Thanks (1 Reply)
Discussion started by: yanglei_fage
1 Replies

8. Shell Programming and Scripting

ping script

hello fellows, I need help with a script, I'm using this one HOSTS="192.168.10.9 192.168.10.15 " SUBJECT="Attention - Gateway San Martin DOWN " COUNT=1 EMAILID="lmail@mydomain.com" for myHost in $HOSTS do count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2... (2 Replies)
Discussion started by: lucas.fradusco
2 Replies

9. 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

10. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
Wiki::Toolkit::Plugin::Ping(3pm)			User Contributed Perl Documentation			  Wiki::Toolkit::Plugin::Ping(3pm)

NAME
Wiki::Toolkit::Plugin::Ping - "ping" various services when nodes are written SYNOPSIS
use Wiki::Toolkit::Plugin::Ping; my $ping = Wiki::Toolkit::Plugin::Ping->new( node_to_url => 'http://mywiki/$node', services => { "geourl" => 'http://geourl.org/ping?p=$url' }, agent => "My Wiki ping agent", ); $wiki->register_pugin( plugin => $ping ); DESCRIPTION
A plug-in for Wiki::Toolkit sites, which will "ping" various external services when a node is written. A list of the services to ping, and where in their URLs to add the URL of the node, are supplied when the plugin is created. You need to tell it how to turn a node into a URL (node_to_url), and what services to ping (services). You can optionally pass a custom user-agent string AUTHOR
The Wiki::Toolkit team (http://www.wiki-toolkit.org/) COPYRIGHT
Copyright (C) 2003-2004 I. P. Williams (ivorw_openguides [at] xemaps {dot} com). Copyright (C) 2006-2009 the Wiki::Toolkit team (http://www.wiki-toolkit.org/) All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Wiki::Toolkit, Wiki::Toolkit::Plugin, OpenGuides perl v5.10.1 2009-02-24 Wiki::Toolkit::Plugin::Ping(3pm)
All times are GMT -4. The time now is 12:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy