diff options
author | Ken Moore <moorekou@gmail.com> | 2015-07-13 10:04:11 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-07-13 10:04:11 -0400 |
commit | aedadeb4b826bbeaf20743ee6997f8cf453d7726 (patch) | |
tree | 0653dab13d25c235884fcf2e21c76c3d855740b3 /libLumina | |
parent | Tag version 0.8.5-release in the source tree. (diff) | |
parent | Merge pull request #135 from Nanolx/master (diff) | |
download | lumina-aedadeb4b826bbeaf20743ee6997f8cf453d7726.tar.gz lumina-aedadeb4b826bbeaf20743ee6997f8cf453d7726.tar.bz2 lumina-aedadeb4b826bbeaf20743ee6997f8cf453d7726.zip |
Merge branch 'master' of github.com:pcbsd/lumina
Diffstat (limited to 'libLumina')
-rw-r--r-- | libLumina/LuminaOS-Debian.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libLumina/LuminaOS-Debian.cpp b/libLumina/LuminaOS-Debian.cpp index 12d8f11e..85dd657e 100644 --- a/libLumina/LuminaOS-Debian.cpp +++ b/libLumina/LuminaOS-Debian.cpp @@ -262,12 +262,12 @@ int LOS::CPUUsagePercent(){ //Returns: Overall percentage of the amount of CPU c } int LOS::MemoryUsagePercent(){ - QStringList mem = LUtils::getCmdOutput("top -bn1").filter("Mem:"); + QStringList mem = LUtils::getCmdOutput("top -bn1").filter("Mem :"); if(mem.isEmpty()){ return -1; } double fB = 0; //Free Bytes double uB = 0; //Used Bytes - fB = mem.first().section(" ", 6, 6, QString::SectionSkipEmpty).toDouble(); - uB = mem.first().section(" ", 4, 4, QString::SectionSkipEmpty).toDouble(); + fB = mem.first().section(" ", 5, 5, QString::SectionSkipEmpty).toDouble(); + uB = mem.first().section(" ", 7, 7, QString::SectionSkipEmpty).toDouble(); double per = (uB/(fB+uB)) * 100.0; return qRound(per); } |