Progress indication for scripts on Windows
I regularly have long-running scripts or programs on Windows that crunch through log files.
Often, the disadvantage with these programs, especially home-brew scripts, is that you have no idea how much progress they have made, or when they will finish.
I use a simple trick to get an idea: I use Microsoft Sysinternals' Process Explorer to check how much bytes have been read/written by a process.
First I select the appropriate columns for the main view:
And then I can get an idea of the progress of each process:
Do you know a better/different trick? Or for another OS? Please post a comment.
In my next diary entry, I'll give an example for dd.
Didier Stevens
Senior Handler
Microsoft MVP
blog.DidierStevens.com DidierStevensLabs.com
Keywords: process explorer progress indicator
5 comment(s)
×
Diary Archives
Comments
But there's no reason you couldn't have a script send a bunch of different notifications stating how far along it was in it's execution. If the script ever exited with an error, if you catch error conditions properly, you could even report that to nagios and have nagios send you an email or a text or whatever on error conditions but just quietly log the state of progress as the script ran.
Anonymous
Jul 3rd 2018
6 years ago
If you trace it with Process Monitor instead (set a Path filter to the name of the log file, and tell it to drop filtered events), then it will actually tell you the byte offset it is currently reading into the file at. You'll be able to work out exactly how far through it is at that point.
On Solaris, if memory serves, iosnoop does similar
Anonymous
Jul 4th 2018
6 years ago
Anonymous
Jul 4th 2018
6 years ago
It's not a problem with recent versions of PE.
Anonymous
Jul 4th 2018
6 years ago
Anonymous
Jul 6th 2018
6 years ago