2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

better way to do it

This commit is contained in:
tsaavik 2013-12-20 10:26:40 -08:00
parent 9d5a111982
commit 4682e4fee4

View File

@ -96,7 +96,7 @@ sub getCapacity {
}
sub getStatistics {
open(DFSADMIN, "su $hdfs_user -c 'hdfs dfsadmin -report'|") || die("Cannot open dfsadmin: $!");
open(DFSADMIN, "sudo -u $hdfs_user hdfs dfsadmin -report|") || die("Cannot open dfsadmin: $!");
while(defined(my $line = <DFSADMIN>)) {
chomp($line);