Skip to main content
6 events
when toggle format what by license comment
Jun 14, 2014 at 2:41 comment added Aquarius Power The sleep 1 could be improved based on the "pids growth", so the faster, the lower would be the delay. I will code these stuff as soon I actually find a use for wraps counter other than "knowing it is somewhat cool" :)
Jun 14, 2014 at 2:37 comment added Aquarius Power If my workaround about pids doesnt work I will think on a way to ask that question properly :). This question is mainly about counting wraps. I am still open to other solutions tho. My answer is "narrowed" (doesnt most ppl use ubuntu?) to ubuntu, but I would like to see another that could workaround random pids distribuition even if I cant test it.
Jun 14, 2014 at 0:21 comment added h.j.k. I know your script solves your original question to a certain extent, but as you have rightly pointed out under flaws and limitations, those make the applicability of your script very narrow and unsuitable as a generic, well-working answer. Especially the sleep 1 part, it just sounds hack-ish to me that a script will need to drift in and out of sleep every second just to check if pids have wrapped or not. Essentially, I'm agreeing with @MarkPlotnick that you should have a follow-up question asking how can you remove these PID files after the processes have stopped running...
Jun 13, 2014 at 20:00 comment added Aquarius Power the pids are unique only for running processes, new process can have a pid of a died proccess; the script relies on a file that contains the pid information, but before such file being removed there is a delay of 10 minutes, meanwhile a new process got the same pid of a dead process and so the file was not removed; the tip by @MarkPlotnick made me think on adding the full command line to that file and so "pid vs cmd" would mostly be a unique enough combination, anyway I was able to create a script that count the wraps what is what I was interested in knowing :)
Jun 13, 2014 at 2:49 review Low quality posts
Jun 13, 2014 at 3:14
Jun 13, 2014 at 2:25 history answered h.j.k. CC BY-SA 3.0