summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2012-06-23 17:40:39 +0200
committerPaul Buetow <paul@buetow.org>2012-06-23 17:40:39 +0200
commitf60cf3cbad59ac173f37d6a7d14132171590f25a (patch)
treee4277bc43a73ffc2507c2aa9bc976e5fde9ac99a
parent5687570b4c3dedd1913ac83c30f8e8ab18844871 (diff)
foo
-rw-r--r--lib/Loadbars/Constants.pm2
-rw-r--r--lib/Loadbars/Main.pm9
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/Loadbars/Constants.pm b/lib/Loadbars/Constants.pm
index f4db3c9..84f08dc 100644
--- a/lib/Loadbars/Constants.pm
+++ b/lib/Loadbars/Constants.pm
@@ -27,7 +27,7 @@ use constant {
SYSTEM_BLUE0 => 30,
USER_ORANGE => 70,
USER_YELLOW0 => 50,
- INTERVAL => 0.1,
+ INTERVAL => 0.14,
INTERVAL_WARN => 1.0,
SUCCESS => 0,
E_UNKNOWN => 1,
diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm
index 8a6555e..ce3f90c 100644
--- a/lib/Loadbars/Main.pm
+++ b/lib/Loadbars/Main.pm
@@ -109,7 +109,7 @@ sub stats_thread ($;$) {
use Time::HiRes qw(usleep);
my \\\$whitespace_re = qr/ +/;
- my \\\$usleep = $interval * 1000000;
+ my \\\$usleep = $interval * 100000;
sub cat {
my \\\$file = shift;
@@ -134,10 +134,9 @@ sub stats_thread ($;$) {
while (<FH>) {
s/://;
my (\\\$foo, \\\$int, \\\$bytes, \\\$packets, \\\$errs, \\\$drop, \\\$fifo, \\\$frame, \\\$compressed, \\\$multicast, \\\$tbytes, \\\$tpackets, \\\$terrs, \\\$tdrop, \\\$tfifo, \\\$tcolls, \\\$tcarrier, \\\$tcompressed) = split \\\$whitespace_re, \\\$_;
- printf qq(%s;b:%s\n), \\\$int, \\\$bytes;
- printf qq(%s;tb:%s\n), \\\$int, \\\$tbytes;
- printf qq(%s;p:%s\n), \\\$int, \\\$packets;
- printf qq(%s;tp:%s\n), \\\$int, \\\$tpackets;
+ printf qq(%s;int=%s;b=%d;tb=%d;p=%d;tp=%d\n),
+ \\\$int, \\\$bytes,
+ \\\$tbytes, \\\$packets, \\\$tpackets;
}
close FH;
}