diff options
author | Eric Wong <normlaperson@yhbt.net> | 2012-02-10 08:55:40 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-02-10 04:13:52 -0800 |
commit | 49629c28490dd1895560c12929137d2e12f3cb03 (patch) | |
tree | a70f4ffd581cc6fe4c05a4fe4352a267c16d1bf1 | |
parent | 43aa81fe7676c4adc8e3c5204779e34a3ef5bfcc (diff) | |
download | cmogstored-49629c28490dd1895560c12929137d2e12f3cb03.tar.gz |
Oops, there is a trailing space in the output.
-rw-r--r-- | iostat_parser.rl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/iostat_parser.rl b/iostat_parser.rl index 7e6dc00..fd52dfb 100644 --- a/iostat_parser.rl +++ b/iostat_parser.rl @@ -18,10 +18,11 @@ if (iostat->dev_tip < (sizeof(iostat->dev)-1)) iostat->dev[iostat->dev_tip++] = fc; }; - utilization = ([0-9\.]+){1,7} $ { + utilization = ([0-9\.]+){1,7} > { iostat->util_tip = 0; } + $ { if (iostat->util_tip < (sizeof(iostat->util)-1)) iostat->util[iostat->util_tip++] = fc; - }; + }; lws = (' '|'\t'); stats = lws* ( @@ -33,9 +34,10 @@ # await/svctm here. Not sure how standardized those # fields are on non-Linux platforms... (any - '\n')* - lws+ > { iostat->util_tip = 0; } + lws+ utilization + lws* eor > { mog_iostat_line_done(iostat); iostat->ready = true; |