diff options
author | Kamran Amini <kam.cpp@gmail.com> | 2019-02-13 11:05:15 +0100 |
---|---|---|
committer | Vladimir Kobal <vlad@prokk.net> | 2019-02-13 12:05:15 +0200 |
commit | 81ff6e7308efa897fc37b61460e697f9fa76e32e (patch) | |
tree | 18a3cbe4df074d712d8d9861c6fc369d8337322e /collectors/proc.plugin | |
parent | ea0e0f8f5ea44c0f5f5b4aadffede1c1b43b7d1e (diff) |
Add support for tera-byte size for Linux bcache. (#4719) (#5373)
Diffstat (limited to 'collectors/proc.plugin')
-rw-r--r-- | collectors/proc.plugin/proc_diskstats.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/collectors/proc.plugin/proc_diskstats.c b/collectors/proc.plugin/proc_diskstats.c index 51fe7f4616..7e8bee1e72 100644 --- a/collectors/proc.plugin/proc_diskstats.c +++ b/collectors/proc.plugin/proc_diskstats.c @@ -180,6 +180,8 @@ static unsigned long long int bcache_read_number_with_units(const char *filename return (unsigned long long int)(value * 1024.0 * 1024.0); else if(*end == 'G') return (unsigned long long int)(value * 1024.0 * 1024.0 * 1024.0); + else if(*end == 'T') + return (unsigned long long int)(value * 1024.0 * 1024.0 * 1024.0 * 1024.0); else if(unknown_units_error > 0) { error("bcache file '%s' provides value '%s' with unknown units '%s'", filename, buffer, end); unknown_units_error--; |