473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

send ping and log result to file

Hello,

I want to have a php script which pings a host with ping 1.1.1.1 -t all the
time and it shoukld write these things to a logfile.
When it comes like "timout exceeded" it should write this only once to a
file. Because if timout is 2000 times I don't want to have timeout exceeded
200 times in a database.
But when ping times are coming they should be logged in a file with date and
time when the ping accured.

Is this possible? - if yes, how?

Thanks
Jul 17 '05 #1
1 3451
georgios zakitraxis wrote:
Is this possible? - if yes, how?


Some things are better handled by the system. Just run the job on the
background, e.g.:

$ ping 1.1.1.1 -t > /ping.log &
JW

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Egil Hansen | last post by:
Hi I'm wondering if its possible to write a javascript, that can ping a ip and return the average round trip time (like ping in dos/linux)? Regards, Egil.
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
2
by: Ryan | last post by:
I want to ping every IP on a subnet (255 IP's) and display in a table what IP's are active. I'm currently using a For loop but this takes forever because it pauses to test each Ping. So my guess...
12
by: Matt F | last post by:
I'm creating simple ping script that prompts a user for various parameters. However, I would like each line of the ping displayed as it is received. Currently, the result isn't displayed until...
3
by: imughal | last post by:
I got the perl script which does following task. This solution reads in a line from a text file that is passed in as input parameter 1 to a Perl script. This script will then ping the machine...
2
by: airwot4 | last post by:
I've been using ADSI to lookup a complete hostname from active directory from a partial as part of a script. It goes something like: Retrieve partial hostname from excel spreadsheet -...
4
by: Eran.Yasso | last post by:
Hi all, I am trying to write application which runs on my PC that sends data to an application running on Windows mobile. The problem is that the tcp over activesync doesn't work. The device is...
1
by: ScottZ | last post by:
With python 2.6 and wxpython I'm trying to create a system tray icon application based around an example found here:...
1
by: somsub | last post by:
Can any one help me on ping command . for this line of code ($ret, $duration, $ip) = $p->ping ($line) If i give any 1> invalid entry as a parameter ($line) in ping command or
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.