HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Connectivity Script
Operating System - HP-UX
1830234
Members
2053
Online
109999
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2007 02:19 AM
07-19-2007 02:19 AM
Connectivity Script
Hello,
We have a model which contains around 20 production servers. Most of the servers are having connectivity to the external servers(out of Model). Problem is now a days we are facing the problem of dropping connections from our servers to the external systems, which results time consuption to our testing.
Help me in writing the script which will check for the connectivity to the external system, if connectivity dropped, it should Broadscats the message.
We are checking the connectivity as below----
[root@p4ehub02] #: telnet 10.80.10.82 8888
Trying 10.80.10.82...
Connected to 10.80.10.82.
Escape character is '^]'.
If we get the escape character, assume connectivity is in place.
==========================================
[root@p4ehub02] #: telnet 10.80.10.82 8888
Trying 10.80.10.82...
It means connectivity dropped..
==============================================
Could anyone please help me to write the script which will broadscat the message if connectivity dropped on certain interval of time?
We have a model which contains around 20 production servers. Most of the servers are having connectivity to the external servers(out of Model). Problem is now a days we are facing the problem of dropping connections from our servers to the external systems, which results time consuption to our testing.
Help me in writing the script which will check for the connectivity to the external system, if connectivity dropped, it should Broadscats the message.
We are checking the connectivity as below----
[root@p4ehub02] #: telnet 10.80.10.82 8888
Trying 10.80.10.82...
Connected to 10.80.10.82.
Escape character is '^]'.
If we get the escape character, assume connectivity is in place.
==========================================
[root@p4ehub02] #: telnet 10.80.10.82 8888
Trying 10.80.10.82...
It means connectivity dropped..
==============================================
Could anyone please help me to write the script which will broadscat the message if connectivity dropped on certain interval of time?
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2007 05:37 AM
07-20-2007 05:37 AM
Re: Connectivity Script
Hi,
You don't say what OS version you are using, but instead of using telnet, I'd use ping.
From a central host, I'd first create a list of all the hosts I want to test, call it hosts.dat. Then I'd do something like the following:
#!/usr/bin/ksh
while read HOST
do
ping $HOST -n 1 > /dev/null 2>&1
STAT=$?
if (( $STAT )) ; then
echo "$HOST is not responding"
fi
done < hosts.dat
Instead of the echo command, you could put some kind of mail, broadcast or pager notification. If the network is flakey, you may want to increase the number of pings from 1 to something bigger.
Regards,
Mark
You don't say what OS version you are using, but instead of using telnet, I'd use ping.
From a central host, I'd first create a list of all the hosts I want to test, call it hosts.dat. Then I'd do something like the following:
#!/usr/bin/ksh
while read HOST
do
ping $HOST -n 1 > /dev/null 2>&1
STAT=$?
if (( $STAT )) ; then
echo "$HOST is not responding"
fi
done < hosts.dat
Instead of the echo command, you could put some kind of mail, broadcast or pager notification. If the network is flakey, you may want to increase the number of pings from 1 to something bigger.
Regards,
Mark
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP