Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 1.26 KB

README.md

File metadata and controls

19 lines (18 loc) · 1.26 KB

CpuMem_Monitor

Cross platform cpu and memory monitor

Linux/Mac

Windows

No External Dependencies, just a single header file

SL::NET::CPUMemMonitor mon;
auto memusage = mon.getMemoryUsage();
auto cpuusage = mon.getCPUUsage();
std::cout << "Total CPU Usage: " << cpuusage.TotalUse << std::endl;
std::cout << "Total CPU Process Usage: " << cpuusage.ProcessUse << std::endl;
std::cout << "Physical Process Memory Usage: " << SL::NET::to_PrettyBytes(memusage.PhysicalProcessUsed) << std::endl;
std::cout << "Total Physical Process Memory Available: " << SL::NET::to_PrettyBytes(memusage.PhysicalTotalAvailable) << std::endl;
std::cout << "Total Physical Memory Usage: " << SL::NET::to_PrettyBytes(memusage.PhysicalTotalUsed) << std::endl;
std::cout << "Virtual Process Memory Usage: " << SL::NET::to_PrettyBytes(memusage.VirtualProcessUsed) << std::endl;
std::cout << "Total Virtual Process Memory Usage: " << SL::NET::to_PrettyBytes(memusage.VirtualTotalAvailable) << std::endl;
std::cout << "Total Virtual Process Memory Usage: " << SL::NET::to_PrettyBytes(memusage.VirtualTotalUsed) << std::endl;