pcp
[Top] [All Lists]

bug in /proc/stat parsing on linux 2.4...

To: <pcp@xxxxxxxxxxx>
Subject: bug in /proc/stat parsing on linux 2.4...
From: "gilly" <gilly@xxxxxxxxxx>
Date: Tue, 28 Aug 2001 11:33:08 +0200
Importance: Normal
Reply-to: <gilly@xxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
In the linux PMDA, in proc_stat.c file (parsing of /proc/stat file) there's
a different parsing for 2.4 kernels and 2.2 ones. I'm running on 2.4.6 linux
kernel and in /proc/stat the line says:
"disk_io:............." (disk io stats for all devices) includes 5
parameters, and not 4 as expected in proc_stat.c:
instead of - (X,Y):(RIO,RBLK,WIO,WBLK),
the line is - (X,Y):(TOTALIO*,RIO,RBLK,WIO,WBLK)
*(TOTALIO = RIO + WIO)
Attached is an example for /proc/stat file in 2.4.6 linux kernel & a fix for
this bug.
Thanks, gilly

Attachment: stat.example
Description: Binary data

Attachment: proc_stat.c.patch
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>