<?php

function collect_networkUsage($debug, $log) {
    $usage = shell_exec('ifstat -S 0.1 1');

    $usage = explode(" ", $usage);

    if ($debug == TRUE) {
        debug("[DEBUG_COLLECT] Network Usage collected: IN:" . $usage[0] . " | OUT: " . $usage[1] . "\n", $log);
    }

    $return = $usage[0] . ',' . $usage[1];

    return $return;

}
?>
<?php

function collect_networkUsage($debug, $log) {
    $usage = trim(exec('ifstat -S 0.1 1'));

    $usage = explode(" ", $usage);

    if ($debug == TRUE) {
        debug("[DEBUG_COLLECT] Network Usage collected: IN:" . $usage[0] . " | OUT: " . $usage[1] . "\n", $log);
    }

    $return = $usage[0] . ',' . $usage[1];

    return $return;

}
?>
Revert "Change to shell_exec for debugging"
Revert "Change to shell_exec for debugging"

This reverts commit 1c358fa4f4b0bb1168fa614f0d7d9409668c18c9.
