summaryrefslogtreecommitdiffstats
path: root/usr/local/bin
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-05-23 20:07:26 +0200
committersmos <seth.mos@dds.nl>2012-05-23 20:08:40 +0200
commit5e13bc843eda003cf1fc307b719ad040c419b673 (patch)
treee4fc7f9c396461823b7efa8abd03e9de95c6ed53 /usr/local/bin
parent062676f880878f788315991de861a71ccb86a478 (diff)
downloadpfsense-5e13bc843eda003cf1fc307b719ad040c419b673.zip
pfsense-5e13bc843eda003cf1fc307b719ad040c419b673.tar.gz
Convert the Bytes per Second into kilobits per second like the status page says
Diffstat (limited to 'usr/local/bin')
-rwxr-xr-xusr/local/bin/3gstats.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/bin/3gstats.php b/usr/local/bin/3gstats.php
index 30ec953..8e4e226 100755
--- a/usr/local/bin/3gstats.php
+++ b/usr/local/bin/3gstats.php
@@ -59,12 +59,12 @@ while(true) {
$items = array();
$items = split(",", $elements[1]);
$record['time'] = hexdec($items[0]);
- $record['upstream'] = hexdec($items[1]);
- $record['downstream'] = hexdec($items[2]);
+ $record['upstream'] = ((hexdec($items[1])) * 8) / 1024;
+ $record['downstream'] = ((hexdec($items[2])) * 8) / 1024;
$record['sent'] = hexdec($items[3]);
$record['received'] = hexdec($items[4]);
- $record['bwupstream'] = hexdec($items[5]);
- $record['bwdownstream'] = hexdec($items[6]);
+ $record['bwupstream'] = ((hexdec($items[5])) * 8) / 1024;
+ $record['bwdownstream'] = ((hexdec($items[6])) * 8) / 1024;
break;
}
OpenPOWER on IntegriCloud