git-svn-id: svn://db.shs.com.ru/pip@523 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-06-22 21:18:19 +00:00
parent d9272f68e4
commit a611b7a996

View File

@@ -217,9 +217,9 @@ public:
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);
PIString ns = PIString::fromNumber(sys_mon.statistic().cpu_load_system, 'f', 2);
line += ns.expandLeftTo(5, ' ') + " %, u ";
ns = PIString::fromNumber(sys_mon.statistic().cpu_load_user).replaceAll(",", "."); ns = ns.left(ns.find('.') + 2);
ns = PIString::fromNumber(sys_mon.statistic().cpu_load_user, 'f', 2);
line += ns.expandLeftTo(5, ' ') + " %";
tile->content << TileList::Row("PID: " + PIString(sys_mon.statistic().ID), CellFormat());
tile->content << TileList::Row(line, CellFormat());
@@ -229,9 +229,9 @@ public:
piForeachC (PISystemMonitor::ThreadStats & t, ts) {
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);
PIString ns = PIString::fromNumber(t.cpu_load_kernel, 'f', 2);
line += ns.expandLeftTo(5, ' ') + " %, u ";
ns = PIString::fromNumber(t.cpu_load_user).replaceAll(",", "."); ns = ns.left(ns.find('.') + 2);
ns = PIString::fromNumber(t.cpu_load_user, 'f', 2);
line += ns.expandLeftTo(5, ' ') + " %";
tile->content << TileList::Row(line, CellFormat());
}