PHP GetPerfmonReport Utility

AceInfinity

Emeritus, Contributor
Joined
Feb 21, 2012
Posts
1,728
Location
Canada
I was looking around the forum and read this thread: https://www.sysnative.com/forums/bs...ons-windows-10-8-1-8-7-and-windows-vista.html

And I decided that I would create a quick little utility that would automatically run Perfmon and retrieve the report.html file from the resulting output. I don't know why, but a bunch of users on Windows 8.1 seem to be having issues with running PerfMon to get a report (Perfmon /Report in Windows 8.1 produces weird results - Microsoft Community), yet the odd thing is that the report is still saved. I found that it takes about 30-60 seconds to actually see the report, and this might be why an error dialog shows up initially because it tries to fetch the report too soon. That's only speculation though, and I haven't looked deep enough into that issue, however, I've created a simple utility in C++ to make the task fully automated. :)

lOhuxBM.png


It requires admin elevation, so if you double click on the executable it will automatically request admin privilleges (if UAC is enabled, the dialog pops up). It'll automatically invoke PerfMon to run a report, and terminate the program, then wait until the report is finished being created, before it grabs the report.html file and makes a copy of it within the %USERPROFILE%\Documents folder.

I've attached the first release of my tool in an attachment below. It was a quick tool that I wrote, but it seems to be fairly effective.

Latest Release: Download v1.0.2
 
Last edited:
Re: GetPerfmonReport Utility v1.0

I've seen people with permissions errors as well.
 
Re: GetPerfmonReport Utility v1.0

PerfMon report required me to invoke the program with elevated rights, otherwise the function call to CreateProcess() fails with a unique Win32 Error code. This should solve the issue for people not being able to run and see the reports on Windows 8.1.
 
My eyes are bleeding with that much BLUE color.

Although, nice utility Ace ;)
Why not try Powershell?
 
My eyes are bleeding with that much BLUE color.

Although, nice utility Ace ;)
Why not try Powershell?

I already use powershell. You can, but on older Windows systems it needs to be installed, and it requires some configuration before you can actually run scripts as well. It's powerful, but you could probably do the same with a batch file if you wanted. You just need a timeout after executing perfmon /report to allow the report.html to be generated, the script would need to be run as administrator, and then you would need to determine which directory the newest report was saved to, then copy it to the destination. My program terminates perfmon automatically too.

I haven't heard any issues yet, so it must be working for people however. :grin1:

edit: I'm curious, would it be easier for me to just open the documents folder so they can see the report without having to manually open explorer and navigate there, or should I just copy the report to the same directory in which my program was invoked from?
 
Last edited:
My eyes are bleeding with that much BLUE color.

Although, nice utility Ace ;)
Why not try Powershell?

I already use powershell. You can, but on older Windows systems it needs to be installed, and it requires some configuration before you can actually run scripts as well. It's powerful, but you could probably do the same with a batch file if you wanted. You just need a timeout after executing perfmon /report to allow the report.html to be generated, the script would need to be run as administrator, and then you would need to determine which directory the newest report was saved to, then copy it to the destination. My program terminates perfmon automatically too.

I haven't heard any issues yet, so it must be working for people however. :grin1:

edit: I'm curious, would it be easier for me to just open the documents folder so they can see the report without having to manually open explorer and navigate there, or should I just copy the report to the same directory in which my program was invoked from?
The way I do things like these is simply get the desktop path, save it over desktop and finally print or display a message that the file has been saved here because no one seems to read the README or instructions.
Like everyone says, you need to expect the worst user out there who would be using the program.

I have created a MSINFO32 Zipper over here -
MSINFO Zipper - OMG Debugging!!!

It is written in C# though.



-Pranav
 
Could you test it in Win10? I wasn't able to get it working in 7 (32 bit at work) or 10 (64 bit) in a VM. I haven't tried 8 yet
Both said I was missing MSVCP120.dll
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top