Your message dated Tue, 08 Aug 2006 22:53:00 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#379764: sysstat: iostat fails to show stats of one
partition
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: sysstat
Version: 6.1.3-1
Severity: normal
Tags: patch
Hi,
getting iostat of one partition fails.
eg.
<<<
[EMAIL PROTECTED]:~/work/m/tmp/sysstat-6.1.3$ ./iostat -p /dev/hda1
Linux 2.6.15-1-686 (sd033) 25/07/06
avg-cpu: %user %nice %system %iowait %steal %idle
10.86 0.64 35.55 0.72 0.00 52.23
Device: tps Blk_read/s Blk_wrtn/s Blk_read
Blk_wrtn
[EMAIL PROTECTED]:~/work/m/tmp/sysstat-6.1.3$
>>>
(but running 'iostat -p /dev/hda' gives full output).
A patch to fix this issue is attached.
Behaviour after the patch:
<<<
[EMAIL PROTECTED]:~/work/m/tmp/sysstat-6.1.3-patched$ ./iostat -p /dev/hda1
Linux 2.6.15-1-686 (sd033) 07/25/06
avg-cpu: %user %nice %system %iowait %steal %idle
10.86 0.64 35.55 0.72 0.00 52.23
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
hda1 0.00 0.00 0.00 7993 9460
[EMAIL PROTECTED]:~/work/m/tmp/sysstat-6.1.3-patched$
>>>
--
Toni Timonen
040-5111863,GPG 0x7984A4FD
--- sysstat-6.1.3/iostat.c 2006-05-24 16:24:07.000000000 +0300
+++ sysstat-6.1.3-patched/iostat.c 2006-07-25 15:14:22.000000000 +0300
@@ -577,6 +577,17 @@
if (ok && st_dev_list_i->disp_part)
/* Also read stats for its partitions */
read_sysfs_dlist_part_stat(curr, st_dev_list_i->dev_name);
+ else {
+ char *parent=strdup(st_dev_list_i->dev_name);
+ char *p=strpbrk(parent,DIGITS);
+ if(p) {
+ *p=0;
+ sprintf(filename,"%s/%s/%s/%s",
+ SYSFS_BLOCK,parent,st_dev_list_i->dev_name,S_STAT);
+
read_sysfs_file_stat(curr,filename,st_dev_list_i->dev_name,DT_PARTITION);
+ }
+ free(parent);
+ }
}
/* Free structures corresponding to unregistered devices */
--- End Message ---
--- Begin Message ---
Source-Version: 6.1.3-1
Sebastien Godard wrote:
>
> Toni Timonen wrote:
>>
>> getting iostat of one partition fails.
>> eg.
> The argument following option "-p" should be a device (like /dev/hda,
> /dev/sda, etc.), and not a partition (/dev/hda1, ...).
> If you want to display the stats only for hda1, just enter "iostat
> /dev/hda1" (and not "iostat -p /dev/hda1").
So, it's not a bug. I'm closing the report.
Best Regards,
robert
--- End Message ---