From 5d87db101a4bfb308033a0774c18c291f0f71717 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 10 Jun 2015 10:26:42 -0400 Subject: Update the memory calculation for FreeBSD/PC-BSD to also use the kernel info directly instead of running top (much faster). --- libLumina/LuminaOS-FreeBSD.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index 96a7d9c2..ae394f38 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -318,24 +318,11 @@ int LOS::CPUUsagePercent(){ //Returns: Overall percentage of the amount of CPU c int LOS::MemoryUsagePercent(){ //SYSCTL: vm.stats.vm.v__count - - //qDebug() << "Get Mem Usage"; - QStringList mem = LUtils::getCmdOutput("top -n 0").filter("Mem: ", Qt::CaseInsensitive); - if(mem.isEmpty()){ return -1; } - mem = mem.first().section(":",1,50).split(", "); - //Memory Labels: "Active", "Inact", "Wired", "Cache", "Buf", "Free" (usually in that order) - // Format of each entry: "