Skip to content

Commit 75d105e

Browse files
committed
继续完善
1 parent 19d3ce7 commit 75d105e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎kbe/src/server/machine/machine.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void Machine::onQueryAllInterfaceInfos(Mercury::Channel* pChannel, int32 uid, st
262262
networkInterface_.intaddr().ip, networkInterface_.intaddr().port,
263263
networkInterface_.extaddr().ip, networkInterface_.extaddr().port, getProcessPID(),
264264
cpu, float((totalusedmem * 1.0 / totalmem) * 100.0), SystemInfo::getSingleton().getMemUsedByPID(), 0,
265-
getProcessPID(), totalmem, totalusedmem, 0);
265+
getProcessPID(), totalmem, totalusedmem, SystemInfo::getSingleton().getCPUPerByPID());
266266

267267
if(finderRecvPort != 0)
268268
bundle.sendto(ep, finderRecvPort, pChannel->addr().ip);

‎kbe/tools/server/pycluster/cluster_controller.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ def do(self):
276276
print('-----------------------------------------------------')
277277
if len(infos) > 0:
278278
info = infos.pop(0)
279-
print("[%s: %%CPU:%.2f, %%MEM:%.2f, procMem=%.2fm, totalMem=%.2fMB/%.2fm, addr=%s]" % \
280-
(COMPONENT_NAME[info[16]], info[5], info[6], info[7] / 1024.0 / 1024.0, info[18] / 1024.0 / 1024.0, info[17] / 1024.0 / 1024.0, \
279+
print("[%s: %%CPU:%.2f, %%MEM:%.2f, %%pCPU:%.2f, pMem:%.2fm, totalMem:%.2fm/%.2fm, addr=%s]" % \
280+
(COMPONENT_NAME[info[16]], info[5], info[6], info[19], info[7] / 1024.0 / 1024.0, info[18] / 1024.0 / 1024.0, info[17] / 1024.0 / 1024.0, \
281281
socket.inet_ntoa(struct.pack('I', info[9]))))
282282

283283
print(" proc\t\tcid\t\tuid\tpid\tgid\ttid\t%CPU\t%MEM\tusedMem\textra1\t\textra2\t\textra3")

0 commit comments

Comments
 (0)