handleboot is a utility that helps with Windows handle allocation concerns. Specifically, it can list active handle counts, count the sum of all handles (like you see in Task Manager), and reboot the system if a certain threshold is met.
handleboot.exe (command)
- list: list all running processes, and their handle counts.
- count: count the sum of all handle counts from running processes.
- reboot (handle_count_limit) (seconds to reboot): reboot the system, if a certain limit of handles is reached, after a set amount of seconds.
- version: current version string
- help: program help
- You can only use one command at a time.
- You have to run this process as Administrator for the reboot to be successful.
- The specified handle count for reboot, may not go below 250000. Most working systems will be in the 50K-200K range, so this should be a safe default limit.
- This program uses an "undocumented" API, NtQuerySystemInformation from ntdll; it may not work for all versions of Windows.
nimble install winim
nim c -d:release .\handleboot.nim
- 2026.01.25.1 -> Initial Release