- Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Milestone
Description
Related issues:
- The output of new versions of Handle.exe has been changed rabbitmq-management-agent#67
- "Could not find handle.exe, please install from sysinternals" message floods the log rabbitmq-management-agent#90
- Handle.exe output sometimes does not contain "File" #6612
The issue is that, for some Windows users, handle.exe sometimes does not output the data line starting with File that the stats monitor expects. We have no idea why this happens, and have not been able to reproduce it. However, you can use Powershell to get the total number of handles for a process, which should be a "good enough" fallback.
Here is the output of each command on Windows 11, while I have PerfTest running with 10 consumers and producers:
(rabbit@bakkenl-z01)12> string:tokens(os:cmd("handle.exe /accepteula /nobanner /s /p " ++ os:getpid()), "\r\n"). ["Handle type summary:"," <Unknown type> : 2", " <Unknown type> : 119"," ALPC Port : 8", " Desktop : 1"," Directory : 2", " Event : 158"," File : 62", " IoCompletion : 18"," IoCompletionReserve: 1", " IRTimer : 6"," Key : 17", " Mutant : 2"," Process : 3", " Section : 3"," Semaphore : 8", " Thread : 23"," TpWorkerFactory : 3", " WaitCompletionPacket: 15"," WindowStation : 2", "Total handles: 453"] (rabbit@bakkenl-z01)13> os:cmd("pwsh.exe -NoLogo -NoProfile -NonInteractive -Command (Get-Process -Id " ++ os:getpid() ++ ").Handles"). "453\r\n When connections increase, the File count goes up (as expected) as do a couple others. But, it is linear, and gives a useful stat. Since the statistic is not used for alarms or rate-limiting RabbitMQ using this as a fallback seems reasonable.
@michaelklishin - thoughts?
Metadata
Metadata
Assignees
Labels
No labels