media.cgi: Fix parsing output of iostat
Commit Message
Since the last update of sysstat, the output of iostat has changed and
the web user interface showed wrong values.
This is now being fixed in this patch.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
html/cgi-bin/media.cgi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Acked-by: Adolf Belka <adolf.belka@ipfire.org>
Sorry that I missed the change of output of iostat when I tested my
sysstat update patch.
Thanks for finding and fixing.
On 24/09/2021 11:14, Michael Tremer wrote:
> Since the last update of sysstat, the output of iostat has changed and
> the web user interface showed wrong values.
>
> This is now being fixed in this patch.
>
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
> html/cgi-bin/media.cgi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi
> index cc8f84d0a..af75d1bf3 100644
> --- a/html/cgi-bin/media.cgi
> +++ b/html/cgi-bin/media.cgi
> @@ -135,8 +135,8 @@ END
> }
> close DF;
> my @iostat1 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$1}');
> -my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$5}');
> -my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
> +my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
> +my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$7}');
> print "<tr><td colspan='3'> \n<tr><td colspan='3'><h3>transfers</h3></td></tr>";
> my $i=0;
>
Hello,
No problem :)
> On 25 Sep 2021, at 12:34, Adolf Belka <adolf.belka@ipfire.org> wrote:
>
> Acked-by: Adolf Belka <adolf.belka@ipfire.org>
>
> Sorry that I missed the change of output of iostat when I tested my sysstat update patch.
>
> Thanks for finding and fixing.
>
> On 24/09/2021 11:14, Michael Tremer wrote:
>> Since the last update of sysstat, the output of iostat has changed and
>> the web user interface showed wrong values.
>>
>> This is now being fixed in this patch.
>>
>> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
>> ---
>> html/cgi-bin/media.cgi | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/html/cgi-bin/media.cgi b/html/cgi-bin/media.cgi
>> index cc8f84d0a..af75d1bf3 100644
>> --- a/html/cgi-bin/media.cgi
>> +++ b/html/cgi-bin/media.cgi
>> @@ -135,8 +135,8 @@ END
>> }
>> close DF;
>> my @iostat1 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$1}');
>> -my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$5}');
>> -my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
>> +my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
>> +my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$7}');
>> print "<tr><td colspan='3'> \n<tr><td colspan='3'><h3>transfers</h3></td></tr>";
>> my $i=0;
>>
>
> --
> Sent from my laptop
@@ -135,8 +135,8 @@ END
}
close DF;
my @iostat1 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$1}');
-my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$5}');
-my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
+my @iostat2 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$6}');
+my @iostat3 = qx(/usr/bin/iostat -dm -p | grep -v "Linux" | awk '{print \$7}');
print "<tr><td colspan='3'> \n<tr><td colspan='3'><h3>transfers</h3></td></tr>";
my $i=0;