Sponsored Content
Top Forums UNIX for Dummies Questions & Answers ping to machine and count responses Post 47288 by oombera on Friday 6th of February 2004 11:38:36 AM
Old 02-06-2004
/etc/hosts isn't a directory, so here's what I'd do (just one possibility):
Code:
if [ -e "$1" ]; then
  awk '$1 != "" && $1 != "#" {print $1}' "$1" |
  while read COMP; do
    ping -c 1 "$COMP"
  done
fi

 

10 More Discussions You Might Find Interesting

1. HP-UX

ping Port number of HPUX machine

I have 2 HPUX machines. Let say machine A and B. In HPUX machine A, I would like to ping the port number of machine B. Is there any command or any HPUX freeware available? In windows, I can use some freeware to ping port to any type of machines (e.g. HPUX, Windows and etc). See URL below. ... (1 Reply)
Discussion started by: Teh Tiack Ein
1 Replies

2. Shell Programming and Scripting

Extracting Latency, Loss and Jitter from PING responses.

I have a script that pings several hosts and stores the response in a text file (see below) Once this file is created, the intention is to populate a database with the values for 'packet loss', 'avg' and 'mdev', but first I have to extract this data. avg=latency mdev = jitter packet... (5 Replies)
Discussion started by: tony.kandaya
5 Replies

3. IP Networking

Unable to ping freebsd machine using fully qualified domain name

hi all. am unable to ping a freebsd machine using fully qualified domain name from a windows machine. i have already set the fqdn for the machine. plz advise me. thanks. (2 Replies)
Discussion started by: coolatt
2 Replies

4. Programming

Ping remote UNIX machine from a java application

Hi Friends, Can some one please guide me on how to make a script run on a remote UNIX machine from a java application. Or may if you can just tell me how do u ping to the remote UNIX machine using java code. Been looking for the solution since 5-6 hrs, didn't got any where near :( Thanks. (1 Reply)
Discussion started by: Sanjay MD
1 Replies

5. SuSE

unable to ping virtualbox machine

I current have Windows 7 running Virtualbox - OpenSUSE. From SUSE I can ping the Windows box 10.10.x.x no problems. But from the windows box I can't ping SUSE. I have tried disabling the firewall and sill no luck. Tried pinging host name and still no luck. The network gives an IP from... (2 Replies)
Discussion started by: woofie
2 Replies

6. Solaris

Not able to connect (ping & http) to windows 2003 (with IIS installed) from Solaris9 Machine(Tomcat)

hi Am trying to connect from Solaris 9 installed Sun server and having Tomcat 5.5.9 installed on top of it to Windows 2003 server with IIS installed for web application. Scenarios am facing are 1. From Sun system am able to ping and telnet ip with port 80 of windows 2000 system which is... (2 Replies)
Discussion started by: aemunathan
2 Replies

7. Solaris

not able to ping base OS from virtual machine

I have a vista on my PC . I have created a Solaris 10 server on it using VM ware . I have selected bridge mode to connect my PC and virtual machine together .I have alloted ip 192.168.1.2 to my virtual machine and 192.168.1.11 to my PC . I am able to ping the virtual machine from the base machine... (1 Reply)
Discussion started by: asalman.qazi
1 Replies

8. Shell Programming and Scripting

Count time min/max/average for ping

I am redirecting my ping output to a file. The sample output is like this: 64 bytes from xx.xx.xx.167: icmp_seq=4490 ttl=116 3.75 ms 2011Jul12- 15 40 16 64 bytes from xx.xx.xx.167: icmp_seq=4491 ttl=116 5.29 ms 2011Jul12- 15 40 17 64 bytes from xx.xx.xx.167: icmp_seq=4492 ttl=116 4.88 ms... (6 Replies)
Discussion started by: zorrox
6 Replies

9. Red Hat

Total HDD size and count on Linux machine

Hi... I am trying to grab two information 1. Total size of HDD 2. Total number of HDD (if possible alongwith names) can someone suggest me how can we do that in linux machine.. though small scripts and commands like fdisk. (3 Replies)
Discussion started by: omkar.jadhav
3 Replies

10. IP Networking

Cant ping Linux machine from Windows

Hi I have established LAN with the help of D-Link router. I am having 2 desktops ethernet connection managed by this D-Link router. One PC is with Windows 7 OS Second PC is with Redhat Linux 6.1 Both the PCs now stands connected to internet via this D-Link router. I could ping windows PC... (12 Replies)
Discussion started by: videsh77
12 Replies
OCF_PACEMAKER_PING(7)					      Pacemaker Configuration					     OCF_PACEMAKER_PING(7)

NAME
ocf_pacemaker_ping - node connectivity SYNOPSIS
[OCF_RESKEY_pidfile=string] [OCF_RESKEY_dampen=integer] [OCF_RESKEY_name=string] [OCF_RESKEY_multiplier=integer] [OCF_RESKEY_host_list=string] [OCF_RESKEY_attempts=integer] [OCF_RESKEY_timeout=integer] [OCF_RESKEY_options=string] [OCF_RESKEY_failure_score=integer] [OCF_RESKEY_debug=string] ping [start | stop | reload | monitor | meta-data | validate-all] DESCRIPTION
Every time the monitor action is run, this resource agent records (in the CIB) the current number of ping nodes the host can connect to. It is essentially the same as pingd except that it uses the system ping tool to obtain the results. SUPPORTED PARAMETERS
OCF_RESKEY_pidfile = string [/ping-] PID file OCF_RESKEY_dampen = integer [5s] Dampening interval The time to wait (dampening) further changes occur OCF_RESKEY_name = string [pingd] Attribute name The name of the attributes to set. This is the name to be used in the constraints. OCF_RESKEY_multiplier = integer [] Value multiplier The number by which to multiply the number of connected ping nodes by OCF_RESKEY_host_list = string [] Host list The list of ping nodes to count. OCF_RESKEY_attempts = integer [2] no. of ping attempts Number of ping attempts, per host, before declaring it dead OCF_RESKEY_timeout = integer [2] ping timeout in seconds How long, in seconds, to wait before declaring a ping lost OCF_RESKEY_options = string [] Extra Options A catch all for any other options that need to be passed to ping. OCF_RESKEY_failure_score = integer [] failure_score Resource is failed if the score is less than failure_score. Default never fails. OCF_RESKEY_debug = string [false] Verbose logging Enables to use default attrd_updater verbose logging on every call. AUTHOR
Andrew Beekhof <andrew@beekhof.net> Author. Pacemaker Configuration 06/10/2014 OCF_PACEMAKER_PING(7)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy