#!/usr/bin/perl

#
$Z=open LOG, ">>", "/var/lib/zabbix/log00.txt";
#
$A="sudo du -bs -B1 ".@ARGV[0]."/* | tr '\\t' ',' > lista.csv";
$B=system($A);

open(my $data, '<', "lista.csv") or die "Could not open '$file' $!\n";
$HSTN=`hostname -f`;
chomp $HSTN;
while (my $line = <$data>) {
  chomp $line;

  my @fields = split "," , $line;

$STR = "zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -s ".$HSTN." -k vfs.dir.size[".$fields[1]."] -o ".$fields[0];
print LOG "$STR\n";
$C=system($STR);
}

