Fixes in data
This commit is contained in:
parent
d4597a3571
commit
f1b57cbc03
1 changed files with 15 additions and 3 deletions
|
|
@ -98,6 +98,10 @@ def load_config():
|
|||
def run(url, group=''):
|
||||
|
||||
network_info=psutil.net_io_counters(pernic=False)
|
||||
|
||||
#snetio(bytes_sent=508847144, bytes_recv=2664036642, packets_sent=1879739, packets_recv=2645451, errin=0, errout=0, dropin=0, dropout=0)
|
||||
|
||||
net_info={'bytes_sent': network_info.bytes_sent, 'bytes_recv': network_info.bytes_recv, 'packets_sent': network_info.packets_sent, 'packets_recv': network_info.packets_recv}
|
||||
|
||||
network_devices=psutil.net_if_addrs()
|
||||
|
||||
|
|
@ -114,14 +118,22 @@ def run(url, group=''):
|
|||
for disk in disk_info:
|
||||
|
||||
partition=str(disk[1])
|
||||
partitions[partition]=psutil.disk_usage(partition)
|
||||
#sdiskusage(total=234622398464, used=108806705152, free=113822973952, percent=48.9)
|
||||
|
||||
disk_data=psutil.disk_usage(partition)
|
||||
|
||||
partitions[partition]={'total': disk_data.total, 'used': disk_data.used, 'free': disk_data.free, 'percent': disk_data.percent}
|
||||
#print(partition+"="+str(partitions[partition]))
|
||||
|
||||
dev_info={}
|
||||
|
||||
mem_info=psutil.virtual_memory()
|
||||
#svmem(total=16682799104, available=7034916864, percent=57.8, used=8982822912, free=2082840576, active=10260533248, inactive=3136503808, buffers=789561344, cached=4827574272, shared=319221760, slab=706420736)
|
||||
|
||||
obj_stats={'net_info': network_info, 'cpu_idle': cpu_idle, 'cpus_idle': cpus_idle, 'cpu_number': cpu_number, 'disks_info': partitions, 'mem_info': mem_info, 'hostname': hostname, 'group': group}
|
||||
mem_data=psutil.virtual_memory()
|
||||
|
||||
mem_info={'total': mem_data.total, 'available': mem_data.available, 'percent': mem_data.percent, 'used': mem_data.used, 'free': mem_data.free, 'active': mem_data.active, 'inactive': mem_data.inactive, 'buffers': mem_data.buffers, 'cached': mem_data.cached, 'shared': mem_data.shared, 'slab': mem_data.slab}
|
||||
|
||||
obj_stats={'net_info': net_info, 'cpu_idle': cpu_idle, 'cpus_idle': cpus_idle, 'cpu_number': cpu_number, 'disks_info': partitions, 'mem_info': mem_info, 'hostname': hostname, 'group': group}
|
||||
|
||||
for module in modules_imported.values():
|
||||
obj_stats=module.stat(obj_stats)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue