- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script for monitoring the Network connection o...
Operating System - HP-UX
1753690
Members
5034
Online
108799
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
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО06-21-2009 11:01 PM
тАО06-21-2009 11:01 PM
Hi,
Is there anyone having the script to monitor the network connection of Server's is UP. If network goes down or server goes down it should send the message as "Request timed out"
Thanks,
Narendra
Is there anyone having the script to monitor the network connection of Server's is UP. If network goes down or server goes down it should send the message as "Request timed out"
Thanks,
Narendra
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-22-2009 12:12 AM
тАО06-22-2009 12:12 AM
Solution
Hello Narendra,
You can have your own script which will check the network connectivity of the server by sending ping request.
There are many scripts available; one of them is below:
Here in this script, You can review the hosts which are not reachable by ping request in /tmp/pnaidu/NOTOK.
Modify the script at your wish.
#!/bin/ksh
clear
echo "Do you want to flush the log data before running ping test (y/n): "
read choice
case $choice in
y)
cat /dev/null > /tmp/pnaidu/err.txt
cat /dev/null > /tmp/pnaidu/ok
cat /dev/null > /tmp/pnaidu/NOTOK
for A in `awk '{print $1}' /script/testpnhost.txt`
do
ping ${A} -n 1 >>/tmp/pnaidu/out.txt 2>>/tmp/pnaidu/err.txt
if [ $? = 0 ]; then
{
echo "${A} is able to connect" >> /tmp/pnaidu/ok
}
else
{
echo "${A} NOT able to connect" >> /tmp/pnaidu/NOTOK
}
fi
done
echo "Hosts which couldn't ping throw them all from the 7th Floor"
echo "Check the log files under /tmp/pnaidu \n "
;;
n)
echo "Bye Bye for Now"
exit 0
;;
*)
echo "Invalid Choice "
echo "Exiting....... Wake up and get a cup of coffee"
exit 1
esac
Cheers!!
You can have your own script which will check the network connectivity of the server by sending ping request.
There are many scripts available; one of them is below:
Here in this script, You can review the hosts which are not reachable by ping request in /tmp/pnaidu/NOTOK.
Modify the script at your wish.
#!/bin/ksh
clear
echo "Do you want to flush the log data before running ping test (y/n): "
read choice
case $choice in
y)
cat /dev/null > /tmp/pnaidu/err.txt
cat /dev/null > /tmp/pnaidu/ok
cat /dev/null > /tmp/pnaidu/NOTOK
for A in `awk '{print $1}' /script/testpnhost.txt`
do
ping ${A} -n 1 >>/tmp/pnaidu/out.txt 2>>/tmp/pnaidu/err.txt
if [ $? = 0 ]; then
{
echo "${A} is able to connect" >> /tmp/pnaidu/ok
}
else
{
echo "${A} NOT able to connect" >> /tmp/pnaidu/NOTOK
}
fi
done
echo "Hosts which couldn't ping throw them all from the 7th Floor"
echo "Check the log files under /tmp/pnaidu \n "
;;
n)
echo "Bye Bye for Now"
exit 0
;;
*)
echo "Invalid Choice "
echo "Exiting....... Wake up and get a cup of coffee"
exit 1
esac
Cheers!!
" Let Villagers Be Happy!! "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2009 10:55 PM
тАО08-18-2009 10:55 PM
Re: Script for monitoring the Network connection of Server's
Thanks for the solution.
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP