Commit fd2a6906 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos/test/collect: Extend tests to increase coverage

  On the tests for ConsumptionReportBase, it contains a port from a test
   on slapos.toolbox done by Alain Takoudjou.
parent 985e5810
...@@ -89,9 +89,9 @@ def do_collect(conf): ...@@ -89,9 +89,9 @@ def do_collect(conf):
user_dict[snapshot.username].append(snapshot) user_dict[snapshot.username].append(snapshot)
except (KeyboardInterrupt, SystemExit, NoSuchProcess): except (KeyboardInterrupt, SystemExit, NoSuchProcess):
raise raise
if conf.has_option("slapos", "collect_cache"):
days_to_preserve = conf.get("slapos", "collect_cache") days_to_preserve = conf.get("slapos", "collect_cache")
if days_to_preserve is None: else:
days_to_preserve = 15 days_to_preserve = 15
log_directory = "%s/var/data-log" % conf.get("slapos", "instance_root") log_directory = "%s/var/data-log" % conf.get("slapos", "instance_root")
mkdir_p(log_directory, 0o755) mkdir_p(log_directory, 0o755)
......
...@@ -314,7 +314,7 @@ class PartitionReport(ConsumptionReportBase): ...@@ -314,7 +314,7 @@ class PartitionReport(ConsumptionReportBase):
} }
fdata.write(json.dumps(data_dict)) fdata.write(json.dumps(data_dict))
def buildJSONMonitorReport(self): def buildJSONMonitorReport(self, date_scope=None, min_time=None, max_time=None):
for user in self.user_list.values(): for user in self.user_list.values():
location = os.path.join(user.path, ".slapgrid") location = os.path.join(user.path, ".slapgrid")
...@@ -342,7 +342,8 @@ class PartitionReport(ConsumptionReportBase): ...@@ -342,7 +342,8 @@ class PartitionReport(ConsumptionReportBase):
["date, io rw counter, io cycles counter, disk used"]) ["date, io rw counter, io cycles counter, disk used"])
process_result, memory_result, io_result = \ process_result, memory_result, io_result = \
self.getPartitionConsumptionStatusList(user.name) self.getPartitionConsumptionStatusList(
user.name, date_scope=date_scope, min_time=min_time, max_time=max_time)
resource_status_dict = {} resource_status_dict = {}
if process_result and process_result['total_process'] != 0.0: if process_result and process_result['total_process'] != 0.0:
...@@ -366,7 +367,9 @@ class PartitionReport(ConsumptionReportBase): ...@@ -366,7 +367,9 @@ class PartitionReport(ConsumptionReportBase):
with open(status_file, 'w') as fp: with open(status_file, 'w') as fp:
fp.write(json.dumps(resource_status_dict)) fp.write(json.dumps(resource_status_dict))
resource_process_status_list = self.getPartitionProcessConsumptionList(user.name) resource_process_status_list = self.getPartitionProcessConsumptionList(
user.name, date_scope=date_scope, min_time=min_time, max_time=max_time)
if resource_process_status_list: if resource_process_status_list:
with open(resource_file, 'w') as rf: with open(resource_file, 'w') as rf:
rf.write(json.dumps(resource_process_status_list)) rf.write(json.dumps(resource_process_status_list))
...@@ -472,6 +475,8 @@ class ConsumptionReport(ConsumptionReportBase): ...@@ -472,6 +475,8 @@ class ConsumptionReport(ConsumptionReportBase):
return xml_report_path return xml_report_path
def _getAverageFromList(self, data_list): def _getAverageFromList(self, data_list):
if not data_list:
return 0
return sum(data_list)/len(data_list) return sum(data_list)/len(data_list)
@withDB @withDB
......
<?xml version='1.0' encoding='utf-8'?><journal><transaction type="Sale Packing List"><title>Eco Information for COMP-192938 </title><start_date>2019-10-07 00:00:00</start_date><stop_date>2019-10-07 23:59:59</stop_date><reference>2019-10-07-global</reference><currency></currency><payment_mode></payment_mode><category></category><arrow type="Destination"/><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average</title><reference>COMP-192938</reference><quantity>76.4371428571</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Used Memory</title><reference>COMP-192938</reference><quantity>14211174517.0</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/zero_emission_ratio</resource><title>Zero Emission Ratio</title><reference>COMP-192938</reference><quantity>-1</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser12</title><reference>slapuser12</reference><quantity>5.54571428571</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser13</title><reference>slapuser13</reference><quantity>1.0</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser10</title><reference>slapuser10</reference><quantity>18.1114285714</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser9</title><reference>slapuser9</reference><quantity>0.822857142857</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser2</title><reference>slapuser2</reference><quantity>5.79714285714</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser3</title><reference>slapuser3</reference><quantity>0.971428571429</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/cpu_load_percent</resource><title>CPU Load Percent Average for slapuser6</title><reference>slapuser6</reference><quantity>1.39714285714</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser12</title><reference>slapuser12</reference><quantity>1726.23069196</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser13</title><reference>slapuser13</reference><quantity>793.577232143</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser10</title><reference>slapuser10</reference><quantity>4311.40703125</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser9</title><reference>slapuser9</reference><quantity>88.5420758929</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser2</title><reference>slapuser2</reference><quantity>1784.5375</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser3</title><reference>slapuser3</reference><quantity>370.342857143</quantity><price>0.0</price><VAT></VAT><category></category></movement><movement><resource>service_module/memory_used</resource><title>Memory Used Average for slapuser6</title><reference>slapuser6</reference><quantity>886.900558036</quantity><price>0.0</price><VAT></VAT><category></category></movement></transaction></journal>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
[{"memory_percent": 1.25, "cpu_time": 1635.11, "io_rw_counter": 8766267392.0, "cpu_percent": 0.4, "memory_rss": 301.79, "pid": 9990416.0, "io_cycles_counter": 79707458.0, "cpu_num_threads": 7.0}, {"memory_percent": 0.18, "cpu_time": 6552.74, "io_rw_counter": 56853405696.0, "cpu_percent": 0.4, "memory_rss": 42.36, "pid": 9998060.0, "io_cycles_counter": 1382992374.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 6564.61, "io_rw_counter": 57960878080.0, "cpu_percent": 0.4, "memory_rss": 42.59, "pid": 9998477.0, "io_cycles_counter": 1386945193.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 171.73, "io_rw_counter": 4096.0, "cpu_percent": 0.4, "memory_rss": 7.44, "pid": 9998668.0, "io_cycles_counter": 65859625.0, "cpu_num_threads": 14.0}, {"memory_percent": 0.18, "cpu_time": 6557.88, "io_rw_counter": 61241507840.0, "cpu_percent": 0.4, "memory_rss": 42.62, "pid": 9999026.0, "io_cycles_counter": 1387400302.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 6586.83, "io_rw_counter": 61504995328.0, "cpu_percent": 0.4, "memory_rss": 42.8, "pid": 9999965.0, "io_cycles_counter": 1388061635.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 8997.6, "io_rw_counter": 60593946624.0, "cpu_percent": 0.2, "memory_rss": 43.81, "pid": 9997309.0, "io_cycles_counter": 1725313340.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.15, "cpu_time": 65.01, "io_rw_counter": 1232896.0, "cpu_percent": 0.2, "memory_rss": 36.09, "pid": 9997499.0, "io_cycles_counter": 2749.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 6567.25, "io_rw_counter": 57906438144.0, "cpu_percent": 0.2, "memory_rss": 42.49, "pid": 9998718.0, "io_cycles_counter": 1387150700.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.53, "cpu_time": 582.87, "io_rw_counter": 9380737024.0, "cpu_percent": 0.2, "memory_rss": 127.92, "pid": 9999025.0, "io_cycles_counter": 1786930.0, "cpu_num_threads": 29.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 5427200.0, "cpu_percent": 0.0, "memory_rss": 25.33, "pid": 9990417.0, "io_cycles_counter": 1098608.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 12.61, "io_rw_counter": 44838912.0, "cpu_percent": 0.0, "memory_rss": 6.78, "pid": 9990421.0, "io_cycles_counter": 33028.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 6550.26, "io_rw_counter": 57762111488.0, "cpu_percent": 0.0, "memory_rss": 42.54, "pid": 9990422.0, "io_cycles_counter": 1386885705.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 1.1, "io_rw_counter": 1724416.0, "cpu_percent": 0.0, "memory_rss": 24.0, "pid": 9990423.0, "io_cycles_counter": 1362.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 44.3, "io_rw_counter": 188358656.0, "cpu_percent": 0.0, "memory_rss": 3.63, "pid": 9990620.0, "io_cycles_counter": 2164.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 12.47, "io_rw_counter": 19161088.0, "cpu_percent": 0.0, "memory_rss": 6.87, "pid": 9990623.0, "io_cycles_counter": 33007.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 13.56, "io_rw_counter": 735088640.0, "cpu_percent": 0.0, "memory_rss": 7.33, "pid": 9990627.0, "io_cycles_counter": 56954.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.97, "io_rw_counter": 4427776.0, "cpu_percent": 0.0, "memory_rss": 25.36, "pid": 9990628.0, "io_cycles_counter": 1098602.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 6569.86, "io_rw_counter": 62612807680.0, "cpu_percent": 0.0, "memory_rss": 42.55, "pid": 9990629.0, "io_cycles_counter": 1389066907.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 133373952.0, "cpu_percent": 0.0, "memory_rss": 2.38, "pid": 9991083.0, "io_cycles_counter": 838.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 4.52, "pid": 9991392.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.49, "pid": 9991403.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 4.48, "pid": 9991444.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.19, "pid": 9991922.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.22, "pid": 9991935.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.06, "pid": 9991938.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.25, "pid": 9991961.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.32, "pid": 9992046.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.49, "pid": 9992070.0, "io_cycles_counter": 0.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 2.46, "pid": 9992071.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 8192.0, "cpu_percent": 0.0, "memory_rss": 4.46, "pid": 9992072.0, "io_cycles_counter": 33.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.47, "pid": 9992081.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.04, "pid": 9992309.0, "io_cycles_counter": 31.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.12, "pid": 9992405.0, "io_cycles_counter": 1.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 36864.0, "cpu_percent": 0.0, "memory_rss": 0.0, "pid": 9992765.0, "io_cycles_counter": 868.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 12288.0, "cpu_percent": 0.0, "memory_rss": 0.0, "pid": 9992858.0, "io_cycles_counter": 868.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 12288.0, "cpu_percent": 0.0, "memory_rss": 0.0, "pid": 9992867.0, "io_cycles_counter": 868.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.18, "cpu_time": 15.78, "io_rw_counter": 2949120.0, "cpu_percent": 0.0, "memory_rss": 44.2, "pid": 9993474.0, "io_cycles_counter": 512.0, "cpu_num_threads": 3.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993773.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993774.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.69, "pid": 9993775.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.73, "pid": 9993776.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.68, "pid": 9993777.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993778.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.7, "pid": 9993779.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.78, "pid": 9993780.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.65, "pid": 9993781.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.68, "pid": 9993782.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.64, "pid": 9993783.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993784.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.74, "pid": 9993893.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993895.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993896.0, "io_cycles_counter": 51.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.65, "pid": 9993898.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.67, "pid": 9993899.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993905.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.64, "pid": 9993906.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993910.0, "io_cycles_counter": 51.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993913.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.64, "pid": 9993916.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.69, "pid": 9993917.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.67, "pid": 9993920.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993925.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.67, "pid": 9993932.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.63, "pid": 9993939.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.69, "pid": 9993954.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 5.66, "pid": 9993984.0, "io_cycles_counter": 135.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.19, "cpu_time": 0.18, "io_rw_counter": 28672.0, "cpu_percent": 0.0, "memory_rss": 46.91, "pid": 9996414.0, "io_cycles_counter": 24357.0, "cpu_num_threads": 4.0}, {"memory_percent": 0.09, "cpu_time": 0.01, "io_rw_counter": 2605056.0, "cpu_percent": 0.0, "memory_rss": 22.64, "pid": 9997287.0, "io_cycles_counter": 29296.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 32.15, "io_rw_counter": 1017692160.0, "cpu_percent": 0.0, "memory_rss": 6.82, "pid": 9997288.0, "io_cycles_counter": 7168327.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 5.49, "io_rw_counter": 917807104.0, "cpu_percent": 0.0, "memory_rss": 4.0, "pid": 9997289.0, "io_cycles_counter": 7334771.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 442368.0, "cpu_percent": 0.0, "memory_rss": 3.09, "pid": 9997290.0, "io_cycles_counter": 89.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 29.57, "io_rw_counter": 71159808.0, "cpu_percent": 0.0, "memory_rss": 6.61, "pid": 9997291.0, "io_cycles_counter": 6416091.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.2, "cpu_time": 253.48, "io_rw_counter": 113287168.0, "cpu_percent": 0.0, "memory_rss": 48.43, "pid": 9997295.0, "io_cycles_counter": 27101191.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.01, "io_rw_counter": 655360.0, "cpu_percent": 0.0, "memory_rss": 4.6, "pid": 9997300.0, "io_cycles_counter": 1278.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 0.01, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 23.63, "pid": 9997304.0, "io_cycles_counter": 3859.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 3.86, "io_rw_counter": 12398592.0, "cpu_percent": 0.0, "memory_rss": 26.65, "pid": 9997307.0, "io_cycles_counter": 2195727.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.03, "pid": 9997308.0, "io_cycles_counter": 0.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.08, "cpu_time": 95.14, "io_rw_counter": 18190336.0, "cpu_percent": 0.0, "memory_rss": 20.45, "pid": 9997310.0, "io_cycles_counter": 103611.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 2.09, "io_rw_counter": 162516992.0, "cpu_percent": 0.0, "memory_rss": 3.73, "pid": 9997359.0, "io_cycles_counter": 696336.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 2.98, "io_rw_counter": 228069376.0, "cpu_percent": 0.0, "memory_rss": 4.0, "pid": 9997360.0, "io_cycles_counter": 961984.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 5.16, "io_rw_counter": 388579328.0, "cpu_percent": 0.0, "memory_rss": 3.63, "pid": 9997361.0, "io_cycles_counter": 1553456.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 3.74, "io_rw_counter": 280453120.0, "cpu_percent": 0.0, "memory_rss": 3.93, "pid": 9997362.0, "io_cycles_counter": 1155330.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 8.82, "io_rw_counter": 668151808.0, "cpu_percent": 0.0, "memory_rss": 4.8, "pid": 9997363.0, "io_cycles_counter": 2624116.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.09, "cpu_time": 217.19, "io_rw_counter": 203988992.0, "cpu_percent": 0.0, "memory_rss": 21.07, "pid": 9997485.0, "io_cycles_counter": 76961.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.07, "cpu_time": 0.0, "io_rw_counter": 151552.0, "cpu_percent": 0.0, "memory_rss": 17.55, "pid": 9997498.0, "io_cycles_counter": 624.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 5832704.0, "cpu_percent": 0.0, "memory_rss": 25.9, "pid": 9998057.0, "io_cycles_counter": 1098604.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 211443712.0, "cpu_percent": 0.0, "memory_rss": 3.84, "pid": 9998271.0, "io_cycles_counter": 1340.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.19, "cpu_time": 121.3, "io_rw_counter": 23388160.0, "cpu_percent": 0.0, "memory_rss": 45.63, "pid": 9998272.0, "io_cycles_counter": 4984.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 1.8, "io_rw_counter": 326815744.0, "cpu_percent": 0.0, "memory_rss": 1.47, "pid": 9998273.0, "io_cycles_counter": 226755.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 162.37, "io_rw_counter": 876544.0, "cpu_percent": 0.0, "memory_rss": 8.41, "pid": 9998440.0, "io_cycles_counter": 37.0, "cpu_num_threads": 15.0}, {"memory_percent": 0.03, "cpu_time": 171.55, "io_rw_counter": 286720.0, "cpu_percent": 0.0, "memory_rss": 7.38, "pid": 9998441.0, "io_cycles_counter": 65859957.0, "cpu_num_threads": 14.0}, {"memory_percent": 0.04, "cpu_time": 164.15, "io_rw_counter": 450560.0, "cpu_percent": 0.0, "memory_rss": 10.27, "pid": 9998443.0, "io_cycles_counter": 65860182.0, "cpu_num_threads": 16.0}, {"memory_percent": 0.03, "cpu_time": 12.35, "io_rw_counter": 90210304.0, "cpu_percent": 0.0, "memory_rss": 6.87, "pid": 9998446.0, "io_cycles_counter": 33020.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 4141056.0, "cpu_percent": 0.0, "memory_rss": 25.64, "pid": 9998476.0, "io_cycles_counter": 1098606.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.04, "cpu_time": 161.61, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 8.61, "pid": 9998667.0, "io_cycles_counter": 37.0, "cpu_num_threads": 15.0}, {"memory_percent": 0.04, "cpu_time": 164.25, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 10.18, "pid": 9998670.0, "io_cycles_counter": 65860609.0, "cpu_num_threads": 16.0}, {"memory_percent": 0.03, "cpu_time": 12.49, "io_rw_counter": 53301248.0, "cpu_percent": 0.0, "memory_rss": 6.86, "pid": 9998688.0, "io_cycles_counter": 33022.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 6594560.0, "cpu_percent": 0.0, "memory_rss": 25.38, "pid": 9998717.0, "io_cycles_counter": 1098607.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 12.56, "io_rw_counter": 18763776.0, "cpu_percent": 0.0, "memory_rss": 6.88, "pid": 9999023.0, "io_cycles_counter": 33009.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 5251072.0, "cpu_percent": 0.0, "memory_rss": 25.61, "pid": 9999024.0, "io_cycles_counter": 1098604.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 57.29, "io_rw_counter": 51384320.0, "cpu_percent": 0.0, "memory_rss": 24.62, "pid": 9999957.0, "io_cycles_counter": 11305.0, "cpu_num_threads": 2.0}, {"memory_percent": 0.03, "cpu_time": 12.66, "io_rw_counter": 58900480.0, "cpu_percent": 0.0, "memory_rss": 6.91, "pid": 9999962.0, "io_cycles_counter": 33010.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.98, "io_rw_counter": 4935680.0, "cpu_percent": 0.0, "memory_rss": 25.81, "pid": 9999964.0, "io_cycles_counter": 1098604.0, "cpu_num_threads": 1.0}]
\ No newline at end of file
{"cpu_time": 59236.69, "cpu_percent": 3.2, "memory_rss": 1617.36, "memory_percent": 6.71, "io_rw_counter": 500668526592.0, "date": "2019-10-06 00:00:00", "total_process": 104, "disk_used": 0, "io_cycles_counter": 11844398924.0, "cpu_num_threads": 419.0}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, io rw counter, io cycles counter, disk used","2019-10-06 00:00:00, 5.00668526592e+11, 11844398924.0, 0"]}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, memory used percent, memory used","2019-10-06 00:00:00, 6.71, 1617.36"]}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, total process, CPU percent, CPU time, CPU threads","2019-10-06 00:00:00, 104, 3.2, 59236.69, 419.0"]}
\ No newline at end of file
[{"memory_percent": 0.14, "cpu_time": 2.69, "io_rw_counter": 200704.0, "cpu_percent": 1.0, "memory_rss": 33.7, "pid": 9995924.0, "io_cycles_counter": 69511.0, "cpu_num_threads": 4.0}, {"memory_percent": 0.63, "cpu_time": 104620.14, "io_rw_counter": 186451374080.0, "cpu_percent": 0.9, "memory_rss": 152.14, "pid": 999368.0, "io_cycles_counter": 18555368768.0, "cpu_num_threads": 1.0}, {"memory_percent": 7.96, "cpu_time": 91.51, "io_rw_counter": 1247145984.0, "cpu_percent": 0.2, "memory_rss": 1919.27, "pid": 9993422.0, "io_cycles_counter": 5387456.0, "cpu_num_threads": 17.0}, {"memory_percent": 0.23, "cpu_time": 35.79, "io_rw_counter": 5070848.0, "cpu_percent": 0.2, "memory_rss": 56.51, "pid": 9993473.0, "io_cycles_counter": 1032859.0, "cpu_num_threads": 3.0}, {"memory_percent": 0.13, "cpu_time": 3932.5, "io_rw_counter": 44593651712.0, "cpu_percent": 0.2, "memory_rss": 32.33, "pid": 9994319.0, "io_cycles_counter": 1077742642.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3959.34, "io_rw_counter": 166728986624.0, "cpu_percent": 0.2, "memory_rss": 32.39, "pid": 9994633.0, "io_cycles_counter": 1097590845.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3921.5, "io_rw_counter": 45878280192.0, "cpu_percent": 0.2, "memory_rss": 32.18, "pid": 9994709.0, "io_cycles_counter": 1078109461.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 0.18, "io_rw_counter": 4096.0, "cpu_percent": 0.2, "memory_rss": 7.88, "pid": 9995925.0, "io_cycles_counter": 22172.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.01, "cpu_time": 0.07, "io_rw_counter": 202575872.0, "cpu_percent": 0.0, "memory_rss": 1.97, "pid": 999034.0, "io_cycles_counter": 34618.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 43.74, "io_rw_counter": 663552.0, "cpu_percent": 0.0, "memory_rss": 8.44, "pid": 999075.0, "io_cycles_counter": 149006.0, "cpu_num_threads": 15.0}, {"memory_percent": 0.04, "cpu_time": 42.28, "io_rw_counter": 40960.0, "cpu_percent": 0.0, "memory_rss": 9.77, "pid": 999100.0, "io_cycles_counter": 14103433.0, "cpu_num_threads": 14.0}, {"memory_percent": 0.04, "cpu_time": 40.94, "io_rw_counter": 787259392.0, "cpu_percent": 0.0, "memory_rss": 8.95, "pid": 999114.0, "io_cycles_counter": 14380297.0, "cpu_num_threads": 16.0}, {"memory_percent": 0.03, "cpu_time": 43.92, "io_rw_counter": 5529600.0, "cpu_percent": 0.0, "memory_rss": 6.95, "pid": 999141.0, "io_cycles_counter": 261950.0, "cpu_num_threads": 15.0}, {"memory_percent": 0.02, "cpu_time": 0.02, "io_rw_counter": 2916352.0, "cpu_percent": 0.0, "memory_rss": 5.16, "pid": 999363.0, "io_cycles_counter": 193206.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 683.86, "io_rw_counter": 3962613760.0, "cpu_percent": 0.0, "memory_rss": 8.24, "pid": 999364.0, "io_cycles_counter": 26876622.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 64.39, "io_rw_counter": 3667714048.0, "cpu_percent": 0.0, "memory_rss": 3.0, "pid": 999365.0, "io_cycles_counter": 36879682.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 301.31, "io_rw_counter": 340484096.0, "cpu_percent": 0.0, "memory_rss": 8.13, "pid": 999370.0, "io_cycles_counter": 34523442.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 4807.64, "io_rw_counter": 690188288.0, "cpu_percent": 0.0, "memory_rss": 31.66, "pid": 999377.0, "io_cycles_counter": 206338218.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.01, "io_rw_counter": 1572864.0, "cpu_percent": 0.0, "memory_rss": 1.75, "pid": 999379.0, "io_cycles_counter": 1354.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.01, "io_rw_counter": 1564672.0, "cpu_percent": 0.0, "memory_rss": 4.16, "pid": 999384.0, "io_cycles_counter": 1330.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.08, "cpu_time": 8.49, "io_rw_counter": 141389824.0, "cpu_percent": 0.0, "memory_rss": 19.6, "pid": 999387.0, "io_cycles_counter": 6395354.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.07, "cpu_time": 176.23, "io_rw_counter": 84766720.0, "cpu_percent": 0.0, "memory_rss": 15.75, "pid": 999388.0, "io_cycles_counter": 167204.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 3.37, "io_rw_counter": 289902592.0, "cpu_percent": 0.0, "memory_rss": 3.59, "pid": 999429.0, "io_cycles_counter": 1965690.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 5.21, "io_rw_counter": 467496960.0, "cpu_percent": 0.0, "memory_rss": 3.46, "pid": 999430.0, "io_cycles_counter": 2894697.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 8.33, "io_rw_counter": 726188032.0, "cpu_percent": 0.0, "memory_rss": 3.27, "pid": 999431.0, "io_cycles_counter": 4232665.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 13.11, "io_rw_counter": 1101680640.0, "cpu_percent": 0.0, "memory_rss": 3.19, "pid": 999432.0, "io_cycles_counter": 6088057.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 27.58, "io_rw_counter": 2205339648.0, "cpu_percent": 0.0, "memory_rss": 3.36, "pid": 999433.0, "io_cycles_counter": 11760562.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.04, "cpu_time": 40.96, "io_rw_counter": 504889344.0, "cpu_percent": 0.0, "memory_rss": 9.17, "pid": 999501.0, "io_cycles_counter": 14409338.0, "cpu_num_threads": 16.0}, {"memory_percent": 0.07, "cpu_time": 60666.23, "io_rw_counter": 1970564177920.0, "cpu_percent": 0.0, "memory_rss": 17.98, "pid": 999531.0, "io_cycles_counter": 10241327094.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 20480.0, "cpu_percent": 0.0, "memory_rss": 3.46, "pid": 999540.0, "io_cycles_counter": 677.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 91.58, "io_rw_counter": 38248448.0, "cpu_percent": 0.0, "memory_rss": 24.08, "pid": 999541.0, "io_cycles_counter": 26672.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.04, "cpu_time": 42.25, "io_rw_counter": 8192.0, "cpu_percent": 0.0, "memory_rss": 9.71, "pid": 999583.0, "io_cycles_counter": 14104294.0, "cpu_num_threads": 14.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.17, "pid": 9991073.0, "io_cycles_counter": 80.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 107.39, "io_rw_counter": 12873646080.0, "cpu_percent": 0.0, "memory_rss": 2.26, "pid": 9991094.0, "io_cycles_counter": 14023538.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9991113.0, "io_cycles_counter": 166.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.7, "pid": 9991389.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.62, "pid": 9991390.0, "io_cycles_counter": 2.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 4.73, "pid": 9991391.0, "io_cycles_counter": 1.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.03, "cpu_time": 12.15, "io_rw_counter": 63651840.0, "cpu_percent": 0.0, "memory_rss": 6.71, "pid": 9991677.0, "io_cycles_counter": 1052.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.27, "pid": 9991882.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.39, "pid": 9991890.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.39, "pid": 9991902.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.37, "pid": 9991915.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.39, "pid": 9992056.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.03, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 6.39, "pid": 9992339.0, "io_cycles_counter": 16.0, "cpu_num_threads": 6.0}, {"memory_percent": 0.01, "cpu_time": 0.01, "io_rw_counter": 454656.0, "cpu_percent": 0.0, "memory_rss": 3.36, "pid": 9992739.0, "io_cycles_counter": 38445.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9992740.0, "io_cycles_counter": 28.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.56, "io_rw_counter": 904810496.0, "cpu_percent": 0.0, "memory_rss": 2.03, "pid": 9993495.0, "io_cycles_counter": 108273.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.06, "cpu_time": 1.45, "io_rw_counter": 38531072.0, "cpu_percent": 0.0, "memory_rss": 14.74, "pid": 9993595.0, "io_cycles_counter": 1544986.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 2.12, "io_rw_counter": 2520035328.0, "cpu_percent": 0.0, "memory_rss": 1.5, "pid": 9993601.0, "io_cycles_counter": 1063005.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.21, "pid": 9993624.0, "io_cycles_counter": 36.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 30.62, "io_rw_counter": 4898885632.0, "cpu_percent": 0.0, "memory_rss": 2.36, "pid": 9993644.0, "io_cycles_counter": 3052660.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993678.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993679.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.74, "pid": 9993680.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993681.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.68, "pid": 9993682.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.7, "pid": 9993683.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.7, "pid": 9993684.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.68, "pid": 9993685.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.72, "pid": 9993686.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.64, "pid": 9993687.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.68, "pid": 9993688.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.66, "pid": 9993689.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993691.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993692.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993693.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993694.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.72, "pid": 9993695.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993696.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993697.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993698.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993699.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.67, "pid": 9993700.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.63, "pid": 9993701.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.66, "pid": 9993702.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.72, "pid": 9993715.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993716.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993717.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.69, "pid": 9993718.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993719.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993720.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993721.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.68, "pid": 9993722.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.68, "pid": 9993723.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993724.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.64, "pid": 9993725.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.65, "pid": 9993726.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993799.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9993801.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.74, "pid": 9993802.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.72, "pid": 9993803.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993804.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993805.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.7, "pid": 9993806.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993808.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.63, "pid": 9993811.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.71, "pid": 9993813.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.65, "pid": 9993816.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.64, "pid": 9993817.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993834.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.67, "pid": 9993835.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993837.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.65, "pid": 9993839.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993840.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.7, "pid": 9993842.0, "io_cycles_counter": 19.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993843.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993844.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.65, "pid": 9993845.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.68, "pid": 9993846.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.66, "pid": 9993847.0, "io_cycles_counter": 18.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.63, "pid": 9993848.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3919.29, "io_rw_counter": 43622899712.0, "cpu_percent": 0.0, "memory_rss": 32.34, "pid": 9993883.0, "io_cycles_counter": 1074686716.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993933.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993948.0, "io_cycles_counter": 12.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9993949.0, "io_cycles_counter": 12.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.79, "pid": 9993951.0, "io_cycles_counter": 6.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.07, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 17.3, "pid": 9993952.0, "io_cycles_counter": 640.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 8192.0, "cpu_percent": 0.0, "memory_rss": 0.0, "pid": 9993959.0, "io_cycles_counter": 681.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.07, "cpu_time": 0.01, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 18.01, "pid": 9993963.0, "io_cycles_counter": 620.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3922.19, "io_rw_counter": 44555653120.0, "cpu_percent": 0.0, "memory_rss": 32.27, "pid": 9994073.0, "io_cycles_counter": 1077429486.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 29.85, "io_rw_counter": 56397824.0, "cpu_percent": 0.0, "memory_rss": 7.35, "pid": 9994077.0, "io_cycles_counter": 5974579.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.26, "io_rw_counter": 1527808.0, "cpu_percent": 0.0, "memory_rss": 26.3, "pid": 9994110.0, "io_cycles_counter": 827877.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 31.18, "io_rw_counter": 58994688.0, "cpu_percent": 0.0, "memory_rss": 7.42, "pid": 9994323.0, "io_cycles_counter": 5873515.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.26, "io_rw_counter": 1536000.0, "cpu_percent": 0.0, "memory_rss": 25.59, "pid": 9994354.0, "io_cycles_counter": 827981.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3941.68, "io_rw_counter": 50129039360.0, "cpu_percent": 0.0, "memory_rss": 32.5, "pid": 9994447.0, "io_cycles_counter": 1080874730.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 32.09, "io_rw_counter": 18731008.0, "cpu_percent": 0.0, "memory_rss": 7.32, "pid": 9994450.0, "io_cycles_counter": 5893727.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.27, "io_rw_counter": 1589248.0, "cpu_percent": 0.0, "memory_rss": 26.0, "pid": 9994453.0, "io_cycles_counter": 828233.0, "cpu_num_threads": 1.0}, {"memory_percent": 1.31, "cpu_time": 584.52, "io_rw_counter": 349637890048.0, "cpu_percent": 0.0, "memory_rss": 316.34, "pid": 9994454.0, "io_cycles_counter": 281663871.0, "cpu_num_threads": 33.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 561152.0, "cpu_percent": 0.0, "memory_rss": 2.22, "pid": 9994464.0, "io_cycles_counter": 49.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.02, "io_rw_counter": 937984.0, "cpu_percent": 0.0, "memory_rss": 2.19, "pid": 9994471.0, "io_cycles_counter": 116503.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.71, "pid": 9994520.0, "io_cycles_counter": 10.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.04, "io_rw_counter": 112242688.0, "cpu_percent": 0.0, "memory_rss": 2.33, "pid": 9994523.0, "io_cycles_counter": 87359.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 28.08, "io_rw_counter": 62095360.0, "cpu_percent": 0.0, "memory_rss": 7.3, "pid": 9994635.0, "io_cycles_counter": 6081104.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.43, "cpu_time": 67.79, "io_rw_counter": 14532022272.0, "cpu_percent": 0.0, "memory_rss": 104.14, "pid": 9994638.0, "io_cycles_counter": 8774519.0, "cpu_num_threads": 2.0}, {"memory_percent": 0.11, "cpu_time": 2.26, "io_rw_counter": 1552384.0, "cpu_percent": 0.0, "memory_rss": 26.05, "pid": 9994640.0, "io_cycles_counter": 827875.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.26, "io_rw_counter": 1486848.0, "cpu_percent": 0.0, "memory_rss": 26.0, "pid": 9994711.0, "io_cycles_counter": 827621.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 27.46, "io_rw_counter": 56287232.0, "cpu_percent": 0.0, "memory_rss": 7.35, "pid": 9994713.0, "io_cycles_counter": 6117816.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 0.84, "io_rw_counter": 1024000.0, "cpu_percent": 0.0, "memory_rss": 24.09, "pid": 9994722.0, "io_cycles_counter": 1647.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 4.94, "io_rw_counter": 122593280.0, "cpu_percent": 0.0, "memory_rss": 7.94, "pid": 9994727.0, "io_cycles_counter": 1082968.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 1.79, "pid": 9995191.0, "io_cycles_counter": 37.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 6.35, "io_rw_counter": 3983491072.0, "cpu_percent": 0.0, "memory_rss": 2.4, "pid": 9995227.0, "io_cycles_counter": 1079383.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 45056.0, "cpu_percent": 0.0, "memory_rss": 2.17, "pid": 9995783.0, "io_cycles_counter": 34.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 325.47, "io_rw_counter": 18870820864.0, "cpu_percent": 0.0, "memory_rss": 2.07, "pid": 9995836.0, "io_cycles_counter": 25985956.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.02, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 5.33, "pid": 9995838.0, "io_cycles_counter": 0.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 0.1, "io_rw_counter": 221184.0, "cpu_percent": 0.0, "memory_rss": 8.04, "pid": 9995839.0, "io_cycles_counter": 1939.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.03, "cpu_time": 0.1, "io_rw_counter": 335872.0, "cpu_percent": 0.0, "memory_rss": 8.06, "pid": 9995841.0, "io_cycles_counter": 2881.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.03, "cpu_time": 0.11, "io_rw_counter": 622592.0, "cpu_percent": 0.0, "memory_rss": 8.07, "pid": 9995857.0, "io_cycles_counter": 4585.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 20480.0, "cpu_percent": 0.0, "memory_rss": 3.31, "pid": 9996133.0, "io_cycles_counter": 79.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.2, "cpu_time": 161.31, "io_rw_counter": 23740416.0, "cpu_percent": 0.0, "memory_rss": 49.26, "pid": 9996134.0, "io_cycles_counter": 3082235.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 1.26, "io_rw_counter": 186507264.0, "cpu_percent": 0.0, "memory_rss": 1.5, "pid": 9996136.0, "io_cycles_counter": 165880.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 13393920.0, "cpu_percent": 0.0, "memory_rss": 2.18, "pid": 9996262.0, "io_cycles_counter": 3783.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 2.14, "pid": 9996377.0, "io_cycles_counter": 43.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.0, "cpu_time": 0.0, "io_rw_counter": 0.0, "cpu_percent": 0.0, "memory_rss": 0.75, "pid": 9996446.0, "io_cycles_counter": 10.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.03, "io_rw_counter": 134668288.0, "cpu_percent": 0.0, "memory_rss": 2.23, "pid": 9996574.0, "io_cycles_counter": 39300.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.1, "cpu_time": 0.01, "io_rw_counter": 4096.0, "cpu_percent": 0.0, "memory_rss": 23.4, "pid": 9996585.0, "io_cycles_counter": 1359.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 0.85, "io_rw_counter": 451047424.0, "cpu_percent": 0.0, "memory_rss": 2.26, "pid": 9996744.0, "io_cycles_counter": 219843.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 0.13, "io_rw_counter": 1167360.0, "cpu_percent": 0.0, "memory_rss": 8.08, "pid": 9996780.0, "io_cycles_counter": 8234.0, "cpu_num_threads": 27.0}, {"memory_percent": 0.01, "cpu_time": 1784.02, "io_rw_counter": 35299729408.0, "cpu_percent": 0.0, "memory_rss": 2.35, "pid": 9996974.0, "io_cycles_counter": 102665369.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.13, "cpu_time": 3928.89, "io_rw_counter": 49985994752.0, "cpu_percent": 0.0, "memory_rss": 32.3, "pid": 9997041.0, "io_cycles_counter": 1079814594.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.03, "cpu_time": 32.01, "io_rw_counter": 19685376.0, "cpu_percent": 0.0, "memory_rss": 7.42, "pid": 9997044.0, "io_cycles_counter": 5805650.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.11, "cpu_time": 2.26, "io_rw_counter": 1699840.0, "cpu_percent": 0.0, "memory_rss": 25.99, "pid": 9997049.0, "io_cycles_counter": 827731.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 20.8, "io_rw_counter": 1871265792.0, "cpu_percent": 0.0, "memory_rss": 3.18, "pid": 9998972.0, "io_cycles_counter": 10988839.0, "cpu_num_threads": 1.0}, {"memory_percent": 0.01, "cpu_time": 2121.45, "io_rw_counter": 109117833216.0, "cpu_percent": 0.0, "memory_rss": 2.17, "pid": 9999926.0, "io_cycles_counter": 228280645.0, "cpu_num_threads": 1.0}]
\ No newline at end of file
{"cpu_time": 204815.91, "cpu_percent": 3.1, "memory_rss": 3642.55, "memory_percent": 15.1, "io_rw_counter": 3174929330176.0, "date": "2019-10-06 00:00:00", "total_process": 164, "disk_used": 0, "io_cycles_counter": 37490050852.0, "cpu_num_threads": 519.0}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, io rw counter, io cycles counter, disk used","2019-10-06 00:00:00, 3.17492933018e+12, 37490050852.0, 0"]}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, memory used percent, memory used","2019-10-06 00:00:00, 15.1, 3642.55"]}
\ No newline at end of file
{"date": 1570495649.501284, "data": ["date, total process, CPU percent, CPU time, CPU threads","2019-10-06 00:00:00, 164, 3.1, 204815.91, 519.0"]}
\ No newline at end of file
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
# #
############################################################################## ##############################################################################
from slapos.util import mkdir_p
import json
import time
import os import os
import glob import glob
import unittest import unittest
...@@ -33,11 +37,16 @@ import tarfile ...@@ -33,11 +37,16 @@ import tarfile
import tempfile import tempfile
import slapos.slap import slapos.slap
import psutil import psutil
import sqlite3
from time import strftime from time import strftime
from slapos.collect import entity, snapshot, db, reporter from slapos.collect import entity, snapshot, db, reporter
from slapos.cli.entry import SlapOSApp from slapos.cli.entry import SlapOSApp
from six.moves.configparser import ConfigParser from six.moves.configparser import ConfigParser
from lxml import etree as ElementTree
import slapos.tests.data
class FakeDatabase(object): class FakeDatabase(object):
def __init__(self): def __init__(self):
self.invoked_method_list = [] self.invoked_method_list = []
...@@ -231,18 +240,30 @@ class TestCollectDatabase(unittest.TestCase): ...@@ -231,18 +240,30 @@ class TestCollectDatabase(unittest.TestCase):
'/dev/sdx1', '10', '20', '/mnt', '1983-01-10', 'TIME') '/dev/sdx1', '10', '20', '/mnt', '1983-01-10', 'TIME')
database.insertComputerSnapshot( database.insertComputerSnapshot(
'1', '0', '0', '100', '0', '/dev/sdx1', '1983-01-10', 'TIME') '1', '0', '0', '100', '0', '/dev/sdx1', '1983-01-10', 'TIME')
database.insertUserSnapshot(
'fakeuser0', 10, '10-12345', '0.1', '10.0', '1',
'10.0', '10.0', '0.1', '0.1', '1983-01-10', 'TIME')
database.inserFolderSnapshot(
'fakeuser0', '0.1', '1983-01-10', 'TIME')
database.commit() database.commit()
database.markDayAsReported(date_scope="1983-01-10", database.markDayAsReported(date_scope="1983-01-10",
table_list=database.table_list) table_list=database.getTableList())
database.commit() database.commit()
self.assertEqual(len([x for x in database.select('system')]), 1) self.assertEqual(len([x for x in database.select('system')]), 1)
self.assertEqual(len([x for x in database.select('folder')]), 1)
self.assertEqual(len([x for x in database.select('user')]), 1)
#self.assertEqual(len([x for x in database.select('heating')]), 1)
#self.assertEqual(len([x for x in database.select('temperature')]), 1)
self.assertEqual(len([x for x in database.select('computer')]), 1) self.assertEqual(len([x for x in database.select('computer')]), 1)
self.assertEqual(len([x for x in database.select('disk')]), 1) self.assertEqual(len([x for x in database.select('disk')]), 1)
database.close() database.close()
database.garbageCollect() database.garbageCollect()
database.connect() database.connect()
self.assertEqual(len([x for x in database.select('folder')]), 0)
self.assertEqual(len([x for x in database.select('user')]), 0)
#self.assertEqual(len([x for x in database.select('heating')]), 0)
#self.assertEqual(len([x for x in database.select('temperature')]), 0)
self.assertEqual(len([x for x in database.select('system')]), 0) self.assertEqual(len([x for x in database.select('system')]), 0)
self.assertEqual(len([x for x in database.select('computer')]), 0) self.assertEqual(len([x for x in database.select('computer')]), 0)
self.assertEqual(len([x for x in database.select('disk')]), 0) self.assertEqual(len([x for x in database.select('disk')]), 0)
...@@ -286,59 +307,131 @@ class TestCollectReport(unittest.TestCase): ...@@ -286,59 +307,131 @@ class TestCollectReport(unittest.TestCase):
if os.path.exists(self.instance_root): if os.path.exists(self.instance_root):
shutil.rmtree(self.instance_root) shutil.rmtree(self.instance_root)
def test_raw_csv_report(self): def getPopulatedDB(self, day='1983-01-10', amount=1):
database = db.Database(self.instance_root) database = db.Database(self.instance_root)
database.connect() database.connect()
database.insertSystemSnapshot("0.1", '10.0', '100.0', '100.0', for i in range(0, amount):
'10.0', '1', '2', '12.0', '1', '1', '1983-01-10', 'TIME') database.insertSystemSnapshot("0.1", '10.0', '100.0', '100.0',
database.insertDiskPartitionSnapshot( '10.0', '1', '2', '12.0', '1', '1', day, 'TIME')
'/dev/sdx1', '10', '20', '/mnt', '1983-01-10', 'TIME') database.insertDiskPartitionSnapshot(
database.insertComputerSnapshot( '/dev/sdx1', '10', '20', '/mnt', day, 'TIME')
'1', '0', '0', '100', '0', '/dev/sdx1', '1983-01-10', 'TIME') database.insertComputerSnapshot(
'1', '0', '0', '100', '0', '/dev/sdx1', day, 'TIME')
database.insertUserSnapshot(
'fakeuser0', 10, '10-12345', '0.1', '10.0', '1',
'10.0', '10.0', '0.1', '0.1', day, 'TIME')
database.inserFolderSnapshot(
'fakeuser0', '0.1', day, 'TIME')
database.commit() database.commit()
database.close() database.close()
return database
def _get_file_content(self, f_path):
with open(f_path, "r") as f:
return f.readlines()
return []
def test_raw_csv_report(self):
database = self.getPopulatedDB(amount=1)
reporter.RawCSVDumper(database).dump(self.instance_root) reporter.RawCSVDumper(database).dump(self.instance_root)
self.assertTrue(os.path.exists("%s/1983-01-10" % self.instance_root)) self.assertTrue(os.path.exists("%s/1983-01-10" % self.instance_root))
csv_path_list = ['%s/1983-01-10/dump_disk.csv' % self.instance_root, csv_path_dict = {'%s/1983-01-10/dump_disk.csv' % self.instance_root :
'%s/1983-01-10/dump_computer.csv' % self.instance_root, ['/dev/sdx1,10,20,/mnt,1983-01-10,TIME,0\r\n'],
'%s/1983-01-10/dump_user.csv' % self.instance_root, '%s/1983-01-10/dump_computer.csv' % self.instance_root :
'%s/1983-01-10/dump_folder.csv' % self.instance_root, ['1.0,0.0,0,100.0,0,/dev/sdx1,1983-01-10,TIME,0\r\n'],
'%s/1983-01-10/dump_heating.csv' % self.instance_root, '%s/1983-01-10/dump_user.csv' % self.instance_root :
'%s/1983-01-10/dump_temperature.csv' % self.instance_root, ['fakeuser0,10.0,10-12345,0.1,10.0,1.0,10.0,10.0,0.1,0.1,1983-01-10,TIME,0\r\n'],
'%s/1983-01-10/dump_system.csv' % self.instance_root] '%s/1983-01-10/dump_folder.csv' % self.instance_root :
['fakeuser0,0.1,1983-01-10,TIME,0\r\n'],
'%s/1983-01-10/dump_heating.csv' % self.instance_root : [],
'%s/1983-01-10/dump_temperature.csv' % self.instance_root : [],
'%s/1983-01-10/dump_system.csv' % self.instance_root :
['0.1,10.0,100.0,100.0,10.0,1.0,2.0,12.0,1.0,1.0,1983-01-10,TIME,0\r\n']}
self.assertEqual(set(glob.glob("%s/1983-01-10/*.csv" % self.instance_root)), self.assertEqual(set(glob.glob("%s/1983-01-10/*.csv" % self.instance_root)),
set(csv_path_list)) set(csv_path_dict.keys()))
for f_path in list(set(glob.glob("%s/1983-01-10/*.csv" % self.instance_root))):
self.assertEqual(self._get_file_content(f_path), csv_path_dict[f_path],
"%s %s != %s" % (f_path, self._get_file_content(f_path), csv_path_dict[f_path]))
def test_system_json_report(self):
database = self.getPopulatedDB(strftime("%Y-%m-%d"), amount=2)
reporter.SystemJSONReporterDumper(database).dump(self.instance_root)
csv_path_dict = {'%s/system_memory_used.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0.09765625, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_cpu_percent.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 10.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_out_bytes.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_in_bytes.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_disk_memory_free__dev_sdx1.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }, \n',
' {\n', ' "entry": 0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_out_errors.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 1.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_disk_memory_used__dev_sdx1.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }, \n',
' {\n', ' "entry": 0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_out_dropped.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 1.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_memory_free.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0.09765625, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_in_errors.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 1.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_net_in_dropped.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 2.0, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']'],
'%s/system_loadavg.json' % self.instance_root:
['[\n', ' {\n', ' "entry": 0.1, \n', ' "time": "%s TIME"\n' % strftime("%Y-%m-%d"), ' }\n', ']']}
self.assertEqual(set(glob.glob("%s/*.json" % self.instance_root)),
set(csv_path_dict.keys()))
for f_path in list(set(glob.glob("%s/*.json" % self.instance_root))):
self.assertEqual(self._get_file_content(f_path), csv_path_dict[f_path],
"%s %s != %s" % (f_path, self._get_file_content(f_path), csv_path_dict[f_path]))
def test_system_csv_report(self):
database = db.Database(self.instance_root)
database.connect()
database.insertSystemSnapshot("0.1", '10.0', '100.0', '100.0',
'10.0', '1', '2', '12.0', '1', '1', strftime("%Y-%m-%d"), 'TIME')
database.insertDiskPartitionSnapshot(
'/dev/sdx1', '10', '20', '/mnt', strftime("%Y-%m-%d"), 'TIME')
database.insertComputerSnapshot(
'1', '0', '0', '100', '0', '/dev/sdx1', strftime("%Y-%m-%d"), 'TIME')
database.commit()
database.close()
def test_system_csv_report(self):
database = self.getPopulatedDB(strftime("%Y-%m-%d"), amount=2)
reporter.SystemCSVReporterDumper(database).dump(self.instance_root) reporter.SystemCSVReporterDumper(database).dump(self.instance_root)
csv_path_list = ['%s/system_memory_used.csv' % self.instance_root, csv_path_dict = {'%s/system_memory_used.csv' % self.instance_root:
'%s/system_cpu_percent.csv' % self.instance_root, ['time,entry\r\n', '%s TIME,0.09765625\r\n' % strftime("%Y-%m-%d")],
'%s/system_net_out_bytes.csv' % self.instance_root, '%s/system_cpu_percent.csv' % self.instance_root:
'%s/system_net_in_bytes.csv' % self.instance_root, ['time,entry\r\n', '%s TIME,10.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_disk_memory_free__dev_sdx1.csv' % self.instance_root, '%s/system_net_out_bytes.csv' % self.instance_root:
'%s/system_net_out_errors.csv' % self.instance_root, ['time,entry\r\n', '%s TIME,0.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_disk_memory_used__dev_sdx1.csv' % self.instance_root, '%s/system_net_in_bytes.csv' % self.instance_root:
'%s/system_net_out_dropped.csv' % self.instance_root, ['time,entry\r\n', '%s TIME,0.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_memory_free.csv' % self.instance_root, '%s/system_disk_memory_free__dev_sdx1.csv' % self.instance_root:
'%s/system_net_in_errors.csv' % self.instance_root, ['time,entry\r\n', '%s TIME,0\r\n' % strftime("%Y-%m-%d"),
'%s/system_net_in_dropped.csv' % self.instance_root, '%s TIME,0\r\n' % strftime("%Y-%m-%d")],
'%s/system_loadavg.csv' % self.instance_root] '%s/system_net_out_errors.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,1.0\r\n' % strftime("%Y-%m-%d")],
self.assertEqual(set(glob.glob("%s/*.csv" % self.instance_root)), set(csv_path_list)) '%s/system_disk_memory_used__dev_sdx1.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,0\r\n' % strftime("%Y-%m-%d"),
'%s TIME,0\r\n' % strftime("%Y-%m-%d")],
'%s/system_net_out_dropped.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,1.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_memory_free.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,0.09765625\r\n' % strftime("%Y-%m-%d")],
'%s/system_net_in_errors.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,1.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_net_in_dropped.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,2.0\r\n' % strftime("%Y-%m-%d")],
'%s/system_loadavg.csv' % self.instance_root:
['time,entry\r\n', '%s TIME,0.1\r\n' % strftime("%Y-%m-%d")]}
self.assertEqual(set(glob.glob("%s/*.csv" % self.instance_root)),
set(csv_path_dict.keys()))
for f_path in list(set(glob.glob("%s/*.csv" % self.instance_root))):
self.assertEqual(self._get_file_content(f_path), csv_path_dict[f_path],
"%s %s != %s" % (f_path, self._get_file_content(f_path), csv_path_dict[f_path]))
def test_compress_log_directory(self): def test_compress_log_directory(self):
log_directory = "%s/test_compress" % self.instance_root log_directory = "%s/test_compress" % self.instance_root
...@@ -366,6 +459,9 @@ class TestCollectReport(unittest.TestCase): ...@@ -366,6 +459,9 @@ class TestCollectReport(unittest.TestCase):
self.assertEqual(tf.getmembers()[1].name, "1990-01-01/test.txt") self.assertEqual(tf.getmembers()[1].name, "1990-01-01/test.txt")
self.assertEqual(tf.extractfile(tf.getmembers()[1]).read(), b'hi') self.assertEqual(tf.extractfile(tf.getmembers()[1]).read(), b'hi')
class TestCollectSnapshot(unittest.TestCase): class TestCollectSnapshot(unittest.TestCase):
def setUp(self): def setUp(self):
...@@ -605,3 +701,226 @@ class TestCollectEntity(unittest.TestCase): ...@@ -605,3 +701,226 @@ class TestCollectEntity(unittest.TestCase):
self.assertEqual(database.invoked_method_list[-2], ("commit", "")) self.assertEqual(database.invoked_method_list[-2], ("commit", ""))
self.assertEqual(database.invoked_method_list[-1], ("close", "")) self.assertEqual(database.invoked_method_list[-1], ("close", ""))
class TestJournal(unittest.TestCase):
def test_journal(self):
journal = reporter.Journal()
self.assertEqual(journal.getXML(),
"<?xml version='1.0' encoding='utf-8'?><journal/>")
transaction = journal.newTransaction()
journal.setProperty(transaction, "title", "TestJournal")
journal.setProperty(transaction, "reference", "reference-of-testjournal")
arrow = ElementTree.SubElement(transaction, "arrow")
arrow.set("type", "Destination")
journal.newMovement(transaction,
resource="ee",
title="ZZ",
quantity="10",
reference="BB",
category="")
self.assertEqual(journal.getXML(),
'<?xml version=\'1.0\' encoding=\'utf-8\'?><journal><transaction type="Sale Packing List"><title>TestJournal</title><reference>reference-of-testjournal</reference><arrow type="Destination"/><movement><resource>ee</resource><title>ZZ</title><reference>BB</reference><quantity>10</quantity><price>0.0</price><VAT></VAT><category></category></movement></transaction></journal>')
class TestConsumptionReportBase(unittest.TestCase):
base_path, = slapos.tests.data.__path__
def _get_file_content(self, f_path):
with open(f_path, "r") as f:
return f.readlines()
return []
def loadPredefinedDB(self):
# populate db
conn = sqlite3.connect(
os.path.join(self.instance_root, 'collector.db'))
with open(os.path.join(self.base_path, "monitor_collect.sql")) as f:
sql = f.read()
conn.executescript(sql)
conn.close()
def get_fake_user_list(self, partition_amount=3):
config = ConfigParser()
config.add_section('slapformat')
config.set('slapformat', 'partition_amount', str(partition_amount))
config.set('slapformat', 'user_base_name', 'slapuser')
config.set('slapformat', 'partition_base_name', 'slappart')
config.add_section('slapos')
config.set('slapos', 'instance_root', self.instance_root)
return entity.get_user_list(config)
def _getReport(self):
return reporter.ConsumptionReportBase(self.database)
def setUp(self):
self.instance_root = tempfile.mkdtemp()
# inititalise
self.loadPredefinedDB()
self.database = db.Database(self.instance_root)
self.temp_dir = tempfile.mkdtemp()
os.environ["HOME"] = self.temp_dir
self.software_root = tempfile.mkdtemp()
self.report = self._getReport()
def test_getPartitionUsedMemoryAverage(self):
self.assertEqual(None,
self.report.getPartitionUsedMemoryAverage('slapuser19', '2019-10-04'))
self.assertEqual(None,
self.report.getPartitionUsedMemoryAverage('slapuser15', '2019-10-05'))
self.assertEqual(3868924121.87234,
self.report.getPartitionUsedMemoryAverage('slapuser19', '2019-10-05'))
def test_getPartitionCPULoadAverage(self):
self.assertEqual(7.08297872340419,
self.report.getPartitionCPULoadAverage('slapuser19', '2019-10-05'))
self.assertEqual(None,
self.report.getPartitionCPULoadAverage('slapuser15', '2019-10-05'))
self.assertEqual(None,
self.report.getPartitionCPULoadAverage('slapuser19', '2019-10-04'))
def test_getPartitionDiskUsedAverage(self):
self.assertEqual(7693240.0,
self.report.getPartitionDiskUsedAverage('slapuser19', '2019-10-05'))
self.assertEqual(None,
self.report.getPartitionDiskUsedAverage('slapuser99', '2019-10-05'))
def test_getPartitionProcessConsumptionList(self):
data = self.report.getPartitionProcessConsumptionList(
'slapuser19', date_scope='2019-10-05',
min_time='00:01:00', max_time='00:13:00')
self.assertEqual(1784.02, data[-1]['cpu_time'])
self.assertEqual(56974.0, data[-1]['pid'])
self.assertEqual(102665369.0, data[-1]['io_cycles_counter'])
self.assertEqual(2.35, data[-1]['memory_rss'])
self.assertEqual(35299729408.0, data[-1]['io_rw_counter'])
def test_getPartitionConsumptionStatusList(self):
data = self.report.getPartitionConsumptionStatusList('slapuser19', date_scope='2019-10-05',
min_time='00:01:00', max_time='00:13:00')
self.assertEqual(14.6, data[0]['cpu_percent'])
self.assertEqual(3173278887936.0, data[2]['io_rw_counter'])
class TestConsumptionReport(TestConsumptionReportBase):
def _getReport(self):
return reporter.ConsumptionReport(database=self.database,
computer_id="COMP-192938",
location=self.temp_dir,
user_list=self.get_fake_user_list(15))
def test_get_average_from_list(self):
self.assertEqual(2, self.report._getAverageFromList([2, 2]))
self.assertEqual(0, self.report._getAverageFromList([]))
self.assertEqual(10, self.report._getAverageFromList(range(1, 20)))
def test_getCpuLoadAverageConsumption(self):
self.assertEqual(self.report._getCpuLoadAverageConsumption('2019-10-05'), 74.44468085106385)
self.assertEqual(self.report._getCpuLoadAverageConsumption('2019-10-06'), 74.99183673469388)
self.assertEqual(self.report._getCpuLoadAverageConsumption('2019-10-07'), 76.43714285714287)
self.assertEqual(self.report._getCpuLoadAverageConsumption('2019-10-08'), None)
self.assertEqual(self.report._getCpuLoadAverageConsumption('2019-NO(d'), None)
def test_getMemoryAverageConsumption(self):
self.assertEqual(self.report._getMemoryAverageConsumption('2019-10-05'), 14185032159.319149)
self.assertEqual(self.report._getMemoryAverageConsumption('2019-10-06'), 14149247895.510204)
self.assertEqual(self.report._getMemoryAverageConsumption('2019-10-07'), 14211174517.028572)
self.assertEqual(self.report._getMemoryAverageConsumption('2019-10-08'), None)
self.assertEqual(self.report._getMemoryAverageConsumption('2019-NO(d'), None)
def test_buildXMLReport(self):
with open(os.path.join(self.temp_dir, "2019-10-07.xml.uploaded"), "w+") as f:
f.write("")
report_path = self.report.buildXMLReport('2019-10-07')
self.assertEqual(report_path, None)
os.unlink(os.path.join(self.temp_dir, "2019-10-07.xml.uploaded"))
report_path = self.report.buildXMLReport('2019-10-07')
self.assertEqual(report_path, os.path.join(self.temp_dir, "2019-10-07.xml"))
expected_file_path = "%s/%s" % (self.base_path, "2019-10-07.xml")
self.assertEqual(self._get_file_content(report_path),
self._get_file_content(expected_file_path),
"%s %s != %s" % (report_path, self._get_file_content(report_path),
self._get_file_content(expected_file_path)))
class TestPartitionReport(TestConsumptionReportBase):
def _getReport(self):
return reporter.PartitionReport(self.database,
user_list=self.get_fake_user_list(20))
def test_initDataFile(self):
now = time.time()
self.report._initDataFile(
os.path.join(self.temp_dir, "testfile.json"), ["my", "colums", "goes", "here"])
with open(os.path.join(self.temp_dir, "testfile.json")) as f:
_json = json.loads(f.read())
self.assertLessEqual(_json["date"], time.time())
self.assertLessEqual(now , _json["date"])
self.assertEqual(["my", "colums", "goes", "here"], _json["data"])
self.assertEqual(["date", "data"], _json.keys())
def test_buildJSONMonitorReport(self):
def mock_time():
return 1570495649.501284
original_time = time.time
try:
time.time = mock_time
self.report.buildJSONMonitorReport()
for user in self.report.user_list.values():
location = os.path.join(user.path, ".slapgrid")
self.assertEqual(set(glob.glob("%s/*.json" % location)), set([]))
for user in self.report.user_list.values():
location = os.path.join(user.path, ".slapgrid")
if not os.path.exists(location):
if user.name in ["slapuser19", "slapuser12"]:
mkdir_p(location, 0o755)
else:
if user.name not in ["slapuser19", "slapuser12"]:
shutil.rmtree(location)
self.report.buildJSONMonitorReport(date_scope="2019-10-06",
min_time="00:00:00",
max_time="00:10:00")
for user in self.report.user_list.values():
if user.name not in ["slapuser19", "slapuser12"]:
continue
csv_path_list = ['%s/.slapgrid/monitor/monitor_resource.status.json' % user.path,
'%s/.slapgrid/monitor/monitor_resource_memory.data.json' % user.path,
'%s/.slapgrid/monitor/monitor_process_resource.status.json' % user.path,
'%s/.slapgrid/monitor/monitor_resource_process.data.json' % user.path,
'%s/.slapgrid/monitor/monitor_resource_io.data.json' % user.path]
self.assertEqual(set(glob.glob("%s/.slapgrid/monitor/*.json" % user.path)),
set(csv_path_list))
for f_path in list(set(glob.glob("%s/.slapgrid/monitor/*.json" % user.path))):
expected_file_path = "%s/%s/%s" % (self.base_path, user.name, f_path.split("/")[-1])
#mkdir_p("%s/%s" % (self.base_path, user.name))
#with open(f_path) as f:
# with open(expected_file_path, "w") as z:
# z.write(f.read())
self.assertEqual(self._get_file_content(f_path), self._get_file_content(expected_file_path),
"%s %s != %s" % (f_path, self._get_file_content(f_path),
self._get_file_content(expected_file_path)))
finally:
time.time = original_time
...@@ -361,6 +361,7 @@ class MasterMixin(BasicMixin, unittest.TestCase): ...@@ -361,6 +361,7 @@ class MasterMixin(BasicMixin, unittest.TestCase):
Return response by server (a computer partition or an error) Return response by server (a computer partition or an error)
""" """
rv = self._requestComputerPartition(*args, **kw) rv = self._requestComputerPartition(*args, **kw)
time.sleep(0.01)
requested_at = time.time() requested_at = time.time()
self.assertEqual(rv._status_code, 200) self.assertEqual(rv._status_code, 200)
xml = rv.data xml = rv.data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment