How to check ICMP code through shell script?
Hello to everyone.
I need to run a script so that I can check if a machine is still running. If somehow it goes offline then the machine which is making the check take its place, by changing its IP. Can someone help me out with that? |
you have to do some work with shell scripting i don't know the exact syntax at the moment so i am giving a hint at this time.(just like a psudo code)
Code:
#!/bin/bash $variable=`command` |
You could also short it a little as :
Code:
if ! ping -c 1 <host IP>; then |
All times are GMT -5. The time now is 09:40 AM. |