Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Why ping script failed
Name: Sam Date: December 4, 2002 at 19:25:25 Pacific OS: UNIX CPU/Ram: 132
Comment:
I tried this script:
ping 12.13.14.15 > result date >> result And run it as a cron job. But only the date is written to the file result and there is no ping answer.
Name: Jimbo Date: December 4, 2002 at 21:38:17 Pacific
Reply:
Maybe ping is not in the $PATH. Add the absolute path to the ping command and rerun the script.
-jim
0
Response Number 2
Name: panic Date: December 5, 2002 at 08:06:20 Pacific
Reply:
i think the ping command is still running, if you ping to some machine it donīt stop until you stop it manual or specify how much packages you want to send, example ping -c 2 12.13.14.15 > result this send 2 packages only but this will wait until the 2 packages are succesful received i donīt know if there is a way to send X packages and exit if there is no response using only the ping command, if donīt work try some programming lenguage.
0
Response Number 3
Name: RRunner Date: December 5, 2002 at 13:03:41 Pacific
Reply:
Try using this:
ping -c 2 -T 2 ipaddress
-T = time for the packet to live...
0
Response Number 4
Name: Jimbo Date: December 5, 2002 at 21:31:22 Pacific
Reply:
One way to be sure what is happenning is to capture standard error to the file also:
Summary: thanks alot Guys for your help. I took Luke's advice and commented out the echo----" and it seems to run now. The problem i have is that its not returning any out put to me. It reads a file called dis...
Summary: Hi, I'm running a Perl script that connects to a server using a socket. The script works on an external server, but not the one at home. The script fails at the line Bind(socket information here)...th...
Summary: I came across this while writing a ping script at work. I couldn't find a way to do it in the crontab. So, I put the following while statements around my script then put this script into the cron to r...