CliveWilliams has asked for the wisdom of the Perl Monks concerning the following question:

Seeking the wisdom of my fellow brethren

I have a script that does some automatic analysis from Windows perfmon logs. What I want to do is use the standard windoze relog.exe utility to do some merging/filtering/conversion to csv.

I can get it to run fine by doing an open with a pipe and that returns most of the output (via STDOUT and STDERR).

However what the relog command does is write its progress as an increasing percentage figure. I'd like to capture this - the logs I'm relogging are big and take some time to complete.

Any thoughts on this? I've seen other programs do this and have wondered how we can capture this sort of info.

  • Comment on What's the other output from a DOS command window and how do you capture it in PERL?

Replies are listed 'Best First'.
Re: What's the other output from a DOS command window and how do you capture it in PERL?
by kevbot (Vicar) on Jul 03, 2014 at 04:39 UTC
    If the relog.exe utility writes to STDOUT or STDERR, you may be able to capture this output using the Capture::Tiny module. I have used it in a couple scripts and it seems to work well.
Re: What's the other output from a DOS command window and how do you capture it in PERL? (console)
by tye (Sage) on Jul 04, 2014 at 02:44 UTC

    If it isn't going to STDOUT nor STDERR, then it is likely going straight to "the console". I've seen descriptions of software that manages to intercept direct updates to the console. I wouldn't want to deal with any of that.

    But if you really want to work that hard, then perhaps this gives you some search terms to help you figure out how that is done. :)

    - tye