Timeline for Run unix command precisely at very short intervals WITHOUT accumulating time lag over time
Current License: CC BY-SA 3.0
32 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 17, 2018 at 23:37 | history | edited | Rui F Ribeiro | CC BY-SA 3.0 | added 1 character in body |
| Apr 13, 2017 at 12:36 | history | edited | CommunityBot | replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/ | |
| Oct 21, 2015 at 21:03 | comment | added | porg | Right! I could send them in the format <SequenceNr>-<TimeStamp>, and still would get the proper diffs, with the timestamp giving enough precision when the issue arose, but beeing freed from the purpose of serving as a UID (unique identifier). Then I can have overlapping timestamps, but always a UID. | |
| Oct 21, 2015 at 8:02 | comment | added | Dmitry Grigoryev | Though the question is great (and so are the answers), it's a typical XY problem. You shouldn't test your network connection like that. For what it's worth, you could just send increasing numbers and check if you received all of them. | |
| Nov 13, 2014 at 16:27 | answer | added | Stéphane Chazelas | timeline score: 1 | |
| Mar 5, 2014 at 3:43 | answer | added | user56318 | timeline score: 0 | |
| Jan 23, 2014 at 17:16 | answer | added | user56318 | timeline score: 0 | |
| Jul 24, 2012 at 11:31 | comment | added | porg | Am still in the process of testing. Also updated my question with the section Practical purpose / application. Now I realize that even if the timestamp-generator is precisely timed, the later parts in the pipe (tee and nc) also consume their time. I need to consider this too! How would I do this in the solutions: watch --precise, Perl Time::HiRes, shell threading/background ? | |
| Jul 24, 2012 at 11:25 | vote | accept | porg | ||
| Jul 24, 2012 at 11:22 | history | edited | porg | CC BY-SA 3.0 | added 582 characters in body |
| Jul 19, 2012 at 23:08 | vote | accept | porg | ||
| Jul 24, 2012 at 11:25 | |||||
| Jul 19, 2012 at 11:31 | comment | added | woliveirajr | So @porg, you asked the question, received some answers, then more answers... it would help you point if some of the new answers helped, and if you solved your problem in some other way, post that too. | |
| Jul 17, 2012 at 13:59 | answer | added | fwg | timeline score: 0 | |
| Jul 17, 2012 at 7:48 | answer | added | daniel kullmann | timeline score: 30 | |
| Jul 17, 2012 at 2:34 | comment | added | BillThor | At various times of the day the system is likely to be quite busy, and unless you use a real-time priority you will get slippage. The busier the system the more slippage to expect. | |
| Jul 17, 2012 at 1:44 | comment | added | Joel Cornett | Launch each command in it's own thread, that way any IO-related blocking does not throw off your time. | |
| Jul 16, 2012 at 22:35 | history | tweeted | twitter.com/#!/StackUnix/status/224995603275464705 | ||
| Jul 16, 2012 at 21:34 | comment | added | Hack Saw | It strikes me that your timing is always going to be affected by the current operating state of the box. If something causes the program you care about to be unloaded from the cache, you'll get a rise in time, unless you can guarantee that the typical runtime of the program is significantly less than the interval you want. I would want to be on a realtime system, in a significantly stripped down setup with no one else logged on, or in single user mode. Probably a better solution is to modify the program in question to do the loop itself, instead of invoking it from another program. | |
| Jul 16, 2012 at 21:34 | answer | added | tylerl | timeline score: 15 | |
| Jul 16, 2012 at 21:15 | answer | added | Simon Richter | timeline score: 0 | |
| Jul 16, 2012 at 20:54 | comment | added | mdpc | Have you though of using the REAL TIME scheduling to hopefully minimize the delay on a sleep() call. | |
| Jul 16, 2012 at 20:49 | answer | added | Dave | timeline score: 29 | |
| Jul 16, 2012 at 20:00 | answer | added | woliveirajr | timeline score: 4 | |
| Jul 16, 2012 at 19:26 | comment | added | Tilo Wiklund | What happens if you nice the process that sleeps? | |
| Jul 16, 2012 at 18:44 | answer | added | cdslashetc | timeline score: 1 | |
| Jul 16, 2012 at 18:15 | answer | added | Izkata | timeline score: 19 | |
| Jul 16, 2012 at 17:56 | answer | added | jippie | timeline score: 1 | |
| Jul 16, 2012 at 17:42 | comment | added | jippie | What is the required resolution, accuracy and why do you need it/what are you using it for? | |
| Jul 16, 2012 at 17:21 | answer | added | hhaamu | timeline score: 12 | |
| Jul 16, 2012 at 17:05 | answer | added | lynxlynxlynx | timeline score: 3 | |
| Jul 16, 2012 at 16:35 | answer | added | user732 | timeline score: 7 | |
| Jul 16, 2012 at 15:33 | history | asked | porg | CC BY-SA 3.0 |