unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Johannes Schauer
Hi, I'm looking for a unix tool that does nothing else than increment and print an integer with a fixed frequency. As a bonus it should be able to execute a command with a fixed frequency. The special requirement: it should precise in the interval. Thus, the following will not work:

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Darac Marjal
On Wed, May 02, 2012 at 10:20:11AM +0200, Johannes Schauer wrote: Hi, I'm looking for a unix tool that does nothing else than increment and print an integer with a fixed frequency. As a bonus it should be able to execute a command with a fixed frequency. The special requirement: it should

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Johannes Schauer
Hi Darac, I'm not entirely sure if such a tool exists, but one thing you will need to bear in mind is that you will need to make sure you're running a real-time kernel (apt-cache search linux-image-rt). This will allow you to run your look with real-time priority. If you don't have real-time

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Karl E. Jorgensen
On Wed, May 02, 2012 at 09:20:11AM +0100, Johannes Schauer wrote: Hi, I'm looking for a unix tool that does nothing else than increment and print an integer with a fixed frequency. As a bonus it should be able to execute a command with a fixed frequency. The special requirement: it should

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Paul E Condon
On 20120502_102011, Johannes Schauer wrote: Hi, I'm looking for a unix tool that does nothing else than increment and print an integer with a fixed frequency. As a bonus it should be able to execute a command with a fixed frequency. The special requirement: it should precise in the

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Lars Noodén
On 5/2/12 5:33 PM, Paul E Condon wrote: I think you should be careful to not set the schedule to execute you job too frequently. This system will launch a new job on schedule, whether or not the previously launched job has completed. For some jobs this can cause problems. If you want to do

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Johannes Schauer
Hi Paul, Use crontab (see man crontab). But as far as I see, cron doesnt do what I want. First of all, it will run as a daemon in the background so there is no way (at least as far as I am aware) to make it output a counter/timer in my terminal. Second, as also mentioned in my initial email,

Re: unix tool as precise counter/timer for periodic print/exec

2012-05-02 Thread Johannes Schauer
Hi Karl, Perhaps the sleepenh package will help you? Not a solution per se, but possibly a useful building block.. It works perfectly and was exactly what I was looking for! Thanks a lot! In case anybody ever finds this thread later on, this is what I now wrote based on sleepenh which does