eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject eagle git commit: [MINOR] fix system-metric-collector collect disk info bug
Date Thu, 16 Mar 2017 10:19:45 GMT
Repository: eagle
Updated Branches:
  refs/heads/master 877d3e77b -> c96c1927e


[MINOR] fix system-metric-collector collect disk info bug

`df -k` result line may be folded into two lines if filesystem is to long , add `P` can avoid
this problem

Author: koone <luokun1028@126.com>

Closes #880 from koone/fix-system-metrix-collector.


Project: http://git-wip-us.apache.org/repos/asf/eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/eagle/commit/c96c1927
Tree: http://git-wip-us.apache.org/repos/asf/eagle/tree/c96c1927
Diff: http://git-wip-us.apache.org/repos/asf/eagle/diff/c96c1927

Branch: refs/heads/master
Commit: c96c1927ecb59b670cf7461841b30cc41e9b27ec
Parents: 877d3e7
Author: koone <luokun1028@126.com>
Authored: Thu Mar 16 18:19:33 2017 +0800
Committer: Hao Chen <hao@apache.org>
Committed: Thu Mar 16 18:19:33 2017 +0800

----------------------------------------------------------------------
 eagle-external/hadoop_jmx_collector/system_metric_collector.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/eagle/blob/c96c1927/eagle-external/hadoop_jmx_collector/system_metric_collector.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/system_metric_collector.py b/eagle-external/hadoop_jmx_collector/system_metric_collector.py
index 4c95a6c..fba06f2 100644
--- a/eagle-external/hadoop_jmx_collector/system_metric_collector.py
+++ b/eagle-external/hadoop_jmx_collector/system_metric_collector.py
@@ -296,7 +296,7 @@ class SystemMetricCollector(MetricCollector):
             filtered_items = [items[5], items[6], items[9], items[11]]
             iostat_dict[items[0]] = filtered_items
 
-        disk_output = os.popen("df -k | grep ^/dev").readlines()
+        disk_output = os.popen("df -Pk | grep ^/dev").readlines()
         for item in disk_output:
             items = re.split('\s+', item.strip())
             disks = re.split('^\/dev\/(\w+)\d+$', items[0])


Mime
View raw message