Sponsored Content
Top Forums Shell Programming and Scripting A bi directional script that will monitor the TCP/IP connections between two physical Post 302277411 by angheloko on Friday 16th of January 2009 08:36:58 AM
Old 01-16-2009
Hi samura,

If I were in your case, I'd be using 2 scripts.

Script 1 will be the one sending all those pings or "hellos" and will only be executed in one server which will serve as the checker.

Script 2 will be the "agent" who will send "acks" or acknowledgents or just simple ping backs to the server to express that the server is alive.

Its like a "I say hey you say ho" program.

Your problem can be solved with one script only but the problem with that is the checker may be able to ping or "see" the other machine but the other machine may not necessarily be able to "see" the server (due to firewalls or whatever reasons). Hence, the need for the "checker" and the "agent". But like I said earlier, just 1 script can suffice in some cases.

As for the sending of SMS, you'll have to have a machine that picks-up SMS messages and send it.

In my current company, we have an SMS server that parses XML files to be sent as SMS.

What we do is the server (checker), when needed to, ftps an XML file to the SMS server in an XML format. The SMS server, which just waits for available files, picks it up, parses it, then sends it.

The main script can be a cron job or an infinite script that uses a flat-file for reference of servers which it must ping (or ftp a file. The point is it must establish some means of communication with the other machine).

Now the 2nd script (if needed) may be a cron job or an infinite script that just waits for pings (or files from the server) then pings (or ftp's back) just to say "Yep, I'm still here"
 

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
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)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy