vmstat: do not scale si/so just like bi/bo
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>
This commit is contained in:
parent
3cea313cf3
commit
04ce4db830
@ -647,7 +647,7 @@ void meminfo(void){
|
|||||||
);
|
);
|
||||||
head = tail+1;
|
head = tail+1;
|
||||||
if(!found) goto nextline;
|
if(!found) goto nextline;
|
||||||
*(found->slot) = strtoul(head,&tail,10);
|
*(found->slot) = (unsigned long)strtoull(head,&tail,10);
|
||||||
nextline:
|
nextline:
|
||||||
tail = strchr(head, '\n');
|
tail = strchr(head, '\n');
|
||||||
if(!tail) break;
|
if(!tail) break;
|
||||||
|
4
vmstat.8
4
vmstat.8
@ -67,7 +67,9 @@ The \fB-D\fP reports some summary statistics about disk activity.
|
|||||||
.PP
|
.PP
|
||||||
The \fB\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required)
|
The \fB\-p\fP followed by some partition name for detailed statistics (2.5.70 or above required)
|
||||||
.PP
|
.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
|
.PP
|
||||||
The \fB\-V\fP switch results in displaying version information.
|
The \fB\-V\fP switch results in displaying version information.
|
||||||
.PP
|
.PP
|
||||||
|
Loading…
Reference in New Issue
Block a user