Sponsored Content
Top Forums Shell Programming and Scripting A bi directional script that will monitor the TCP/IP connections between two physical Post 302277436 by angheloko on Friday 16th of January 2009 09:41:33 AM
Old 01-16-2009
Not tested but gives you the idea

Say you have your list.

Code:
cat <list_of_server> | while read x; do
ping $x
if [ $? -ne 0 ]; then
  # Oh no, there's something wrong with the server. Ping exited with a non-zero. Do stuff here like ftp SMS file to your SMS server
fi
done

Check ping command for more info (man ping)

Code:
...
...
If ping does not receive any reply packets at all it will exit with code
1.  On error it exits with code 2. Otherwise it exits with code 0. This
makes it possible to use the exit code to see if a host is alive or not.

This program is intended for use in network testing, measurement and man-
agement.  Because of the load it can impose on the network, it is unwise
to use ping during normal operations or from automated scripts.
...
...

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Physical volume- no free physical partitions

I was in smit, checking on disc space, etc. and it appears that one of our physical volumes that is part of a large volume group, has no free physical partitions. The server is running AIX 5.1. What would be the advisable step to take in this instance? (9 Replies)
Discussion started by: markper
9 Replies

2. IP Networking

Unix Scripts & Counting TCP Connections

Here's a question I received on a test recently. I'm new to Linux/Unix so if this is easy, don't kill me. What scripting or tools could you use to count and sort the number of connections from each internal host? I'd appreciate any feedback and resources. "The Cisco PIX firewall provides... (5 Replies)
Discussion started by: daveohr
5 Replies

3. UNIX for Advanced & Expert Users

Redirecting output to remote monitor over TCP/IP.

We have AIX4.1 (yeah I know - we're upgrading to 5 soon) and have been running almost entirely on ASynch direct connects. We're now converting to TCP/IP thin client terminals and PC's. One of processes was a Turn Around Time screen job that would constantly update various information from 6... (4 Replies)
Discussion started by: gamesman02
4 Replies

4. Red Hat

How to kill all active tcp connections from an IP?

How to kill all active tcp connections from an IP? I am using CentOS (3 Replies)
Discussion started by: an00p
3 Replies

5. AIX

Maximum Limit of HMC to handle Physical Power Virtualization Physical Machine

Hello All, Can anybody please tell me what is the maximum limit of Physical IBM Power Machine which can be handled by single HMC at a single point of time? Thanks, Jenish (1 Reply)
Discussion started by: jenish_shah
1 Replies

6. Shell Programming and Scripting

Script to block IP with too many connections

Hello everyone. I'd really appreciate some help on this since someone is ddosing or doing something to cause our server to overload. It happens once a day and always from the same isp. I've reported it to abuse email of this isp but they don't seem to care. It happens once a day. And... (0 Replies)
Discussion started by: thesting
0 Replies

7. IP Networking

How to test max number of tcp connections

Hello, I wanna test max tcp connection value. Please suggest how to do that. Thanks. (2 Replies)
Discussion started by: gstoychev
2 Replies

8. AIX

Monitor Physical CPU usage on multiple servers

Hello, Looking for some help. I am trying to gather data at each server showing when the physical CPU is being used the most based on a weekly timeframe. I know this data can be seen through NMON but with multiple servers in our environment it could take a real long time. is there a easier... (4 Replies)
Discussion started by: audis$
4 Replies

9. IP Networking

Need to know reason for connections closed in netstat -p tcp

Hello netstat -p give below 6634176 connections as closed.How do we trace that which all connections are being closed on the server? 1366888371 data packet headers correctly predicted 1195906 connection requests 5227320 connection accepts 5992919... (6 Replies)
Discussion started by: Vishal_dba
6 Replies

10. UNIX for Advanced & Expert Users

30 tcp connections Established for a while and after a few minutes are close

Good morning, I need your help please After Restarting Aps or connection, these are connections tcp 0 0 10.80.1.26.57597 10.81.248.79.53008 ESTABLISHED tcp 0 47 10.80.1.26.57607 10.81.248.79.53008 ESTABLISHED tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies
RDS-PING(1)						    BSD General Commands Manual 					       RDS-PING(1)

NAME
rds-ping -- test reachability of remote node over RDS SYNOPSIS
rds-ping [-c count] [-i interval] [-I local_addr] remote_addr DESCRIPTION
rds-ping is used to test whether a remote node is reachable over RDS. Its interface is designed to operate pretty much the standard ping(8) utility, even though the way it works is pretty different. rds-ping opens several RDS sockets and sends packets to port 0 on the indicated host. This is a special port number to which no socket is bound; instead, the kernel processes incoming packets and responds to them. OPTIONS
The following options are available for use on the command line: -c count Causes rds-ping to exit after sending (and receiving) the specified number of packets. -I address By default, rds-ping will pick the local source address for the RDS socket based on routing information for the destination address (i.e. if packets to the given destination would be routed through interface ib0, then it will use the IP address of ib0 as source address). Using the -I option, you can override this choice. -i timeout By default, rds-ping will wait for one second between sending packets. Use this option to specified a different interval. The timeout value is given in seconds, and can be a floating point number. Optionally, append msec or usec to specify a timeout in milliseconds or microseconds, respectively. Specifying a timeout considerably smaller than the packet round-trip time will produce unexpected results. AUTHORS
rds-ping was written by Olaf Kirch <olaf.kirch@oracle.com>. SEE ALSO
rds(7), rds-info(1), rds-stress(1). BSD
Apr 22, 2008 BSD
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy