]> granicus.if.org Git - procps-ng/commitdiff
vmstat: do not scale si/so just like bi/bo
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 26 Nov 2009 16:55:22 +0000 (19:55 +0300)
committerCraig Small <csmall@enc.com.au>
Sun, 18 Dec 2011 11:54:20 +0000 (22:54 +1100)
Use strtoull insteadof strtoul for some counters.

A patch from Debian.

Bug-Debian: http://bugs.debian.org/558361
Bug-Debian: http://bugs.debian.org/558134
Backported-by: Sami Kerola <kerolasa@iki.fi>
proc/sysinfo.c
vmstat.8

index 5d17cefa684cbaccbb7d3286e0eabb7b74c3c579..1d7b797ee6baed8a3916bf4f6a8ad41c717b948c 100644 (file)
@@ -647,7 +647,7 @@ void meminfo(void){
     );
     head = tail+1;
     if(!found) goto nextline;
-    *(found->slot) = strtoul(head,&tail,10);
+    *(found->slot) = (unsigned long)strtoull(head,&tail,10);
 nextline:
     tail = strchr(head, '\n');
     if(!tail) break;
index 127704dafde80a539bba5b5d0459c4390539ac29..499cf4e466a307bcebdd114a9037511aa89be531 100644 (file)
--- a/vmstat.8
+++ b/vmstat.8
@@ -67,7 +67,9 @@ The \fB-D\fP reports some summary statistics about disk activity.
 .PP
 The \fB\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required)
 .PP
-The \fB\-S\fP followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes
+The \fB\-S\fP followed by k or K or m or M switches outputs between
+1000, 1024, 1000000, or 1048576 bytes.  Note this does not change the
+swap (si/so) or block (bi/bo) fields.
 .PP
 The \fB\-V\fP switch results in displaying version information.
 .PP