MCPcopy Create free account
hub / github.com/cppla/ServerStatus / get_realtime_data

Function get_realtime_data

clients/client-psutil.py:294–331  ·  view source on GitHub ↗

real time get system data :return:

()

Source from the content-addressed store, hash-verified

292 diskIO["write"] = disks_after.write_bytes - disks_before.write_bytes
293
294def get_realtime_data():
295 '''
296 real time get system data
297 :return:
298 '''
299 t1 = threading.Thread(
300 target=_ping_thread,
301 kwargs={
302 'host': CU,
303 'mark': '10010',
304 'port': PROBEPORT
305 }
306 )
307 t2 = threading.Thread(
308 target=_ping_thread,
309 kwargs={
310 'host': CT,
311 'mark': '189',
312 'port': PROBEPORT
313 }
314 )
315 t3 = threading.Thread(
316 target=_ping_thread,
317 kwargs={
318 'host': CM,
319 'mark': '10086',
320 'port': PROBEPORT
321 }
322 )
323 t4 = threading.Thread(
324 target=_net_speed,
325 )
326 t5 = threading.Thread(
327 target=_disk_io,
328 )
329 for ti in [t1, t2, t3, t4, t5]:
330 ti.daemon = True
331 ti.start()
332
333def _monitor_thread(name, host, interval, type):
334 # 参考 _ping_thread 风格:每轮解析一次目标,按协议族偏好解析 IP,测 TCP 建连耗时

Callers 1

client-psutil.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected