From 4b3e936efa4026fdf7bcc4c2a097141abcf84133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Thu, 22 Jun 2017 08:31:17 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@517 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- utils/system_daemon/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utils/system_daemon/main.cpp b/utils/system_daemon/main.cpp index 0476d690..381e9076 100755 --- a/utils/system_daemon/main.cpp +++ b/utils/system_daemon/main.cpp @@ -112,7 +112,6 @@ public: local_info_base << TileList::Row("Architecture: " + PISystemInfo::instance()->architecture, CellFormat()); local_info_base << TileList::Row(" CPU count: " + PIString::fromNumber(PISystemInfo::instance()->processorsCount), CellFormat()); local_info_base << TileList::Row("", CellFormat()); - local_info_base << TileList::Row("Threads:", CellFormat()); return ret; } PIScreenTile * peerDiagTile() { @@ -217,10 +216,17 @@ public: screen->lock(); tile->content = local_info_base; int num = 0, maxlen = 0; + PIString line = "Process load: k "; + PIString ns = PIString::fromNumber(sys_mon.statistic().cpu_load_system).replaceAll(",", "."); ns = ns.left(ns.find('.') + 2); + line += ns.expandLeftTo(5, ' ') + " %, u "; + ns = PIString::fromNumber(sys_mon.statistic().cpu_load_user).replaceAll(",", "."); ns = ns.left(ns.find('.') + 2); + line += ns.expandLeftTo(5, ' ') + " %"; + tile->content << TileList::Row(line, CellFormat()); + tile->content << TileList::Row("Threads:", CellFormat()); piForeachC (PISystemMonitor::ThreadStats & t, ts) maxlen = piMaxi(maxlen, t.name.length()); piForeachC (PISystemMonitor::ThreadStats & t, ts) { - PIString line = PIString(++num).expandLeftTo(2, ' ') + ": "; + line = PIString(++num).expandLeftTo(2, ' ') + ": "; line += PIString(t.name).expandRightTo(maxlen, ' ') + ": k "; PIString ns = PIString::fromNumber(t.cpu_load_kernel).replaceAll(",", "."); ns = ns.left(ns.find('.') + 2); line += ns.expandLeftTo(5, ' ') + " %, u ";