gepebril69 has asked for the wisdom of the Perl Monks concerning the following question:
Hi there
Create a loop every second at hh:mm:ss.000000
For netwerkmonitoring I want to create a loop of 1 second and do a ping to another server
The result of this ping, with timeout set to 10000msec I want to store in a logfile. This logfile (ping-test_yyyymmdd.log will so be filled with yyyy-mm-dd hh:mm:ss;<response in ms> entries
- To do a ping with timeout of 10000ms -> No problem
- Store in logfile -> No problem
- Change the logfile very day -> No problem
- Fork a child, as some pings can time out and you don't want to influence the next ping -> No problem
Create a loop every 1000ms at the exact second, that I don't understand.
So after 12:00:00 localtime start an event (fork child) at
hh:mm:ss:ms
12:00:00.000
12:00:01.000
12:00:02.000
12:00:03.000
etc, etc
Any clue on how to handle that issue?
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create a loop of 1000ms at the exact second
by RichardK (Parson) on Feb 20, 2015 at 11:14 UTC | |
by gepebril69 (Scribe) on Feb 21, 2015 at 15:04 UTC | |
by locked_user sundialsvc4 (Abbot) on Feb 23, 2015 at 01:38 UTC | |
|
Re: Create a loop of 1000ms at the exact second
by Discipulus (Canon) on Feb 20, 2015 at 10:27 UTC | |
by gepebril69 (Scribe) on Feb 20, 2015 at 16:21 UTC | |
by sam_bakki (Pilgrim) on Feb 22, 2015 at 14:55 UTC |