From: Sebastien Godard Date: Tue, 24 May 2011 09:43:25 +0000 (+0200) Subject: sar: Decrease column width for sensor device name (temperature, X-Git-Tag: v10.0.1~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5318884e247790f5c36abfe82afc1db075887780;p=sysstat sar: Decrease column width for sensor device name (temperature, voltage inputs and fans statistics). There were several unncessary spaces between the last column of statistics and the device name in the report displayed by sar for temperature, voltage inputs and fans statistics. These spaces have been removed. --- diff --git a/CHANGES b/CHANGES index 21c439a..c22137a 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,8 @@ Changes: xxxx/xx/xx: Version 10.0.1 - Sebastien Godard (sysstat orange.fr) * sadf -p now displays the sensor device name for temperature, voltage inputs and fans statistics. + * sar: Decrease column width for sensor device name (temperature, + voltage inputs and fans statistics). * [Ivana Varekova]: Added option -h to iostat. This option makes the device utilization report easier to read with long device names. diff --git a/pr_stats.c b/pr_stats.c index 44ac00a..9101419 100644 --- a/pr_stats.c +++ b/pr_stats.c @@ -1817,7 +1817,7 @@ void stub_print_pwr_fan_stats(struct activity *a, int prev, int curr, int dispav } if (dis) { - printf("\n%-11s FAN rpm drpm %*s\n", + printf("\n%-11s FAN rpm drpm %*s\n", timestamp[!curr], MAX_SENSORS_DEV_LEN, "DEVICE"); } @@ -1841,7 +1841,7 @@ void stub_print_pwr_fan_stats(struct activity *a, int prev, int curr, int dispav avg_fan_min[i] += spc->rpm_min; } - printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); + printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); } if (dispavg) { @@ -1933,7 +1933,7 @@ void stub_print_pwr_temp_stats(struct activity *a, int prev, int curr, int dispa } if (dis) { - printf("\n%-11s TEMP degC %%temp %*s\n", + printf("\n%-11s TEMP degC %%temp %*s\n", timestamp[!curr], MAX_SENSORS_DEV_LEN, "DEVICE"); } @@ -1963,7 +1963,7 @@ void stub_print_pwr_temp_stats(struct activity *a, int prev, int curr, int dispa avg_temp_max[i] = spc->temp_max; } - printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); + printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); } if (dispavg) { @@ -2059,7 +2059,7 @@ void stub_print_pwr_in_stats(struct activity *a, int prev, int curr, int dispavg } if (dis) { - printf("\n%-11s IN inV %%in %*s\n", + printf("\n%-11s IN inV %%in %*s\n", timestamp[!curr], MAX_SENSORS_DEV_LEN, "DEVICE"); } @@ -2089,7 +2089,7 @@ void stub_print_pwr_in_stats(struct activity *a, int prev, int curr, int dispavg avg_in_max[i] = spc->in_max; } - printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); + printf(" %*s\n", MAX_SENSORS_DEV_LEN, spc->device); } if (dispavg) {