View previous topic :: View next topic |
Author |
Message |
rasc
Joined: 11 Oct 2009 Posts: 95
|
Posted: Wed Aug 11, 2010 5:14 am Post subject: no ping available in rma128_lin_x64.tgz? |
|
|
Hi,
though rma.ini reads
Code: | [EnabledTests]
; specifies the list of tests methods allowed for execution by this RMA.
; To enable the test assign 1 to the parameter, to disable the test assign 0
; to the parameter
Ping=1
TCP=1 |
RMA-manager doesn't list it as available test and HM 8.60 says
Code: | ---------------------------
Confirm
---------------------------
Warning: Agent S4U-SRV does not support specified test.
Would you like to perform this test by HostMonitor?
---------------------------
Yes No
--------------------------- |
As "Ping localhost" is per your suggestion to avoid false error messages for tests done by un-connected agent:
- how to get a ping test in rma128_lin_x64.tgz (good to have in every case)?
- how to replace "ping localhost"?
Thank you |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed Aug 11, 2010 8:03 am Post subject: |
|
|
You may use Shell Script test method to perform ping from Unix system
E.g.
=====================
#!/bin/sh
ping -c $2 -w 3 $1 1> /dev/null 2> /dev/null
if [ $? -eq 0 ]
then
echo "ScriptRes:Host is alive:"
else
echo "ScriptRes:No answer:"
fi
=====================
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rasc
Joined: 11 Oct 2009 Posts: 95
|
Posted: Wed Aug 11, 2010 8:38 am Post subject: |
|
|
Thank you Alex.
unfortunately that script is pretty unreliable.
Every other second it marks the host as unavailable whilst every single ping in the shell goes through.
What might be the reason?
Thank you
HM:
11.08.2010 16:31:54 Host is alive
11.08.2010 16:32:08 No answer
11.08.2010 16:32:39 Host is alive
11.08.2010 16:32:54 No answer
11.08.2010 16:33:00 Host is alive
11.08.2010 16:33:13 No answer
11.08.2010 16:33:28 Host is alive
11.08.2010 16:33:44 No answer
11.08.2010 16:33:54 Host is alive
11.08.2010 16:34:07 No answer
11.08.2010 16:34:13 Host is alive
11.08.2010 16:34:28 No answer
11.08.2010 16:34:48 Host is alive
11.08.2010 16:35:03 No answer
11.08.2010 16:35:22 Host is alive
11.08.2010 16:35:38 No answer
11.08.2010 16:35:50 Host is alive
11.08.2010 16:36:04 No answer
11.08.2010 16:36:16 Host is alive
11.08.2010 16:37:03 No answer
11.08.2010 16:37:15 Host is alive
11.08.2010 16:37:42 No answer
11.08.2010 16:37:47 Host is alive
Shell:
ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.026 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.032 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=4 ttl=64 time=0.027 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=5 ttl=64 time=0.031 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=6 ttl=64 time=0.017 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=7 ttl=64 time=0.020 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=8 ttl=64 time=0.022 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=9 ttl=64 time=0.029 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=10 ttl=64 time=0.032 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=11 ttl=64 time=0.024 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=12 ttl=64 time=0.020 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=13 ttl=64 time=0.033 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=14 ttl=64 time=0.026 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=15 ttl=64 time=0.030 ms |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed Aug 11, 2010 9:09 am Post subject: |
|
|
Well, script uses the same ping utility. So it should work in the same way when you are using the same parameters (hostname, timeout, retries)
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rasc
Joined: 11 Oct 2009 Posts: 95
|
Posted: Wed Aug 11, 2010 9:13 am Post subject: |
|
|
well, it doesn't!
It's not out of boredom we do post here. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Wed Aug 11, 2010 9:23 am Post subject: |
|
|
Well, we are not developers of Unix Ping utility so we cannot explain this problem right away.
What exactly version of Linux and Ping utility do you use?
What exactly parameters do you use for script and command line utility?
Regards
Alex |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rasc
Joined: 11 Oct 2009 Posts: 95
|
Posted: Wed Aug 11, 2010 9:30 am Post subject: |
|
|
Ubuntu 8
Linux server.net 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 GNU/Linux
ping utility, iputils-sss20071127
Params for script "localhost 4"
command at shell: "ping localhost", stopped after about 600 sec with these results:
--- localhost.localdomain ping statistics ---
593 packets transmitted, 593 received, 0% packet loss, time 592000ms
rtt min/avg/max/mdev = 0.015/0.029/0.126/0.006 ms |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
rasc
Joined: 11 Oct 2009 Posts: 95
|
Posted: Wed Aug 11, 2010 9:56 am Post subject: |
|
|
I found it.
Your script is simply bad!
-w deadline
Specify a timeout, in seconds, before ping exits regardless of how many packets have been sent or received. In this case ping does not stop after count packet are sent, it waits either for deadline expire or until count probes are
answered or for some error notification from network.
What's the use of your "-w"? It simply fails the test if more than 3 pings were requested.
Except the 4th pings answer comes immediately. Then the test runs OK. That's why it switched back and forth.
A usable script looked like this:
=====================
#!/bin/sh
ping -c $2 $1 1> /dev/null 2> /dev/null
if [ $? -eq 0 ]
then
echo "ScriptRes:Host is alive:"
else
echo "ScriptRes:No answer:"
fi
=====================
BTW: error handling for missing parameters is missing too.
Regards
P.S. This sheds a 'light' on your other answers where you said "We cannot be guilty". You said the same above but you are... |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|