- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ping report
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
11-04-2002 11:10 PM
11-04-2002 11:10 PM
I having a problem to determine the network connectivity. I have an application that will generate kind of alarm on the screen if there is any problem with network connection and the alrm cease automaticcaly if the problem resolve, according to our design the script use "ping" on ICMP level and hostname to get the status of the connection. What happen now is, although the alarm is report problem with connection BUT when I ping manually it doesn't show any time out or any problem with coonection. ( the alarm generate and cease quickly)
So I am looking a script that can continously ping (delay, timeout etc..) the ip or hostname then when there is a problem with network conn it stop automatically and produce report or create log file with date and time. This will help me to match with my alarm database. Would appreciate if someone can help.
Regards,
Munawwar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 12:01 AM
11-05-2002 12:01 AM
Re: ping report
Try the following script and modify according to your requirement.The attached script looks into a file /ADMscripts/hosts.list
(all the hostname needs to be monitored is listed in this file.
-----------------------------------------------
#!/usr/bin/ksh
ext=$RANDOM
>/tmp/status.$ext
for i in `cat /ADMscripts/hosts.list`
do
echo "$i \t \c" >>/tmp/status.$ext
z=`ping $i -n 3|grep "packet loss"|awk -F , '{print $3}'`
echo $z >>/tmp/status.$ext
loss=`echo $z|awk '{print $1}'|tr -d "%"`
if [ -z "$loss" ]
then
mailx -s "ALERT:Failure of $i NameResolution" abc@abc.com &1
elif
[ "$loss" -ne "0" ]
then
mailx -s "ALERT:$i System packet loss is $loss%" abc@abc.com &1
else
cat /dev/null
fi
done
-----------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 03:59 AM
11-05-2002 03:59 AM
Re: ping report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 06:20 AM
11-05-2002 06:20 AM
Re: ping report
Search the forums and you should find some examples.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 07:58 AM
11-05-2002 07:58 AM
Re: ping report
e.g.
ping.pl -I -t 5 -n 3 bugs
STAT=${?}
if [[ ${STAT} -ne 0 ]]
then
echo "Ping of host bugs failed"
fi
This will request an ICMP ping with a timeout of 5 seconds and 3 attempts on host 'bugs'. This approach is much easier that parsing stderr of ping itself and the timeout and built-in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 08:09 AM
11-05-2002 08:09 AM
Re: ping report
It's worth recording all failures so that you are aware of issues, but paging/emailing for a down host that is not down will get annoying.
Harry, BB in my opinion is not very good. I spent alot of time setting it up, and making it work. I get more use out of scripts like Clay demonstrates than investing so much time in BB. BB works well for Linux, but not enough functionality for HP-UX to be worth the time.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2002 09:55 AM
11-05-2002 09:55 AM
SolutionYou may need to filter out garbage that doesn't need to go over the WAN or change the queue length or type. Or if you have lots of money get more bandwidth. If it's caused by errors then get on your supllier to clean them up.
Look into MRTG. You can have it monitor the traffic and drops/errors and really see what is going on. It can even map your ping delay times if you work with it a little. Runs on most anything and is free. http://www.mrtg.cz/
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2002 10:08 AM
11-06-2002 10:08 AM
Re: ping report
It has a variety of alert mechanisms and monitors.
I found it easy to configure.
You can find it at:
http://www.kernel.org/software/mon/