pcstat icon indicating copy to clipboard operation
pcstat copied to clipboard

add sleep loop option

Open tobert opened this issue 11 years ago • 0 comments

Add a -interval / -n option to make pcstat display results every N seconds (or fractions of a second). Do not bother with \r or other terminal interactions to keep it simple. Just print a new dataset on every iteration. Should work with all output modes.

e.g.

pcstat -interval 1 -json > pcstats.json pcstat -n 1 pcstat -terse -n 1

Ideally a hook can be added inside the getMincore() function to accept a function that it will call in a loop to avoid the open/mmap on every iteration. This is fairly complicated when multiple files are in play, so I need to think about how to do it some more.

tobert avatar May 02 '14 20:05 tobert