real time get system data :return:
()
| 326 | diskIO["write"] = snapshot_write |
| 327 | |
| 328 | def get_realtime_data(): |
| 329 | ''' |
| 330 | real time get system data |
| 331 | :return: |
| 332 | ''' |
| 333 | t1 = threading.Thread( |
| 334 | target=_ping_thread, |
| 335 | kwargs={ |
| 336 | 'host': CU, |
| 337 | 'mark': '10010', |
| 338 | 'port': PROBEPORT |
| 339 | } |
| 340 | ) |
| 341 | t2 = threading.Thread( |
| 342 | target=_ping_thread, |
| 343 | kwargs={ |
| 344 | 'host': CT, |
| 345 | 'mark': '189', |
| 346 | 'port': PROBEPORT |
| 347 | } |
| 348 | ) |
| 349 | t3 = threading.Thread( |
| 350 | target=_ping_thread, |
| 351 | kwargs={ |
| 352 | 'host': CM, |
| 353 | 'mark': '10086', |
| 354 | 'port': PROBEPORT |
| 355 | } |
| 356 | ) |
| 357 | t4 = threading.Thread( |
| 358 | target=_net_speed, |
| 359 | ) |
| 360 | t5 = threading.Thread( |
| 361 | target=_disk_io, |
| 362 | ) |
| 363 | for ti in [t1, t2, t3, t4, t5]: |
| 364 | ti.daemon = True |
| 365 | ti.start() |
| 366 | |
| 367 | |
| 368 | def _monitor_thread(name, host, interval, type): |