Print transfer times for read, write, & overall independently.
Round up calculated values for iops and average time per io to avoid a shifting display if there are 1000+ (or even 10000+) iops, or if an average time per io column is 1000+ ms. Reviewed by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1089947 on 2014/09/26 1093625 on 2014/09/29 1093650 on 2014/09/29 1095662 on 2014/10/09
This commit is contained in:
parent
128236c022
commit
abf607ed8f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277566
@ -726,15 +726,17 @@ static void
|
|||||||
devstats(int perf_select, long double etime, int havelast)
|
devstats(int perf_select, long double etime, int havelast)
|
||||||
{
|
{
|
||||||
int dn;
|
int dn;
|
||||||
long double transfers_per_second, transfers_per_second_read, transfers_per_second_write;
|
long double transfers_per_second, transfers_per_second_read;
|
||||||
long double kb_per_transfer, mb_per_second, mb_per_second_read, mb_per_second_write;
|
long double transfers_per_second_write;
|
||||||
|
long double kb_per_transfer, mb_per_second, mb_per_second_read;
|
||||||
|
long double mb_per_second_write;
|
||||||
u_int64_t total_bytes, total_transfers, total_blocks;
|
u_int64_t total_bytes, total_transfers, total_blocks;
|
||||||
u_int64_t total_bytes_read, total_transfers_read;
|
u_int64_t total_bytes_read, total_transfers_read;
|
||||||
u_int64_t total_bytes_write, total_transfers_write;
|
u_int64_t total_bytes_write, total_transfers_write;
|
||||||
long double busy_pct, busy_time;
|
long double busy_pct, busy_time;
|
||||||
u_int64_t queue_len;
|
u_int64_t queue_len;
|
||||||
long double total_mb;
|
long double total_mb, blocks_per_second, total_duration;
|
||||||
long double blocks_per_second, ms_per_transaction, total_duration;
|
long double ms_per_other, ms_per_read, ms_per_write, ms_per_transaction;
|
||||||
int firstline = 1;
|
int firstline = 1;
|
||||||
char *devname;
|
char *devname;
|
||||||
|
|
||||||
@ -746,8 +748,8 @@ devstats(int perf_select, long double etime, int havelast)
|
|||||||
printf(" cpu ");
|
printf(" cpu ");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
if (Iflag == 0) {
|
if (Iflag == 0) {
|
||||||
printf("device r/s w/s kr/s kw/s qlen "
|
printf("device r/s w/s kr/s kw/s "
|
||||||
"svc_t %%b ");
|
" ms/r ms/w ms/o ms/t qlen %%b ");
|
||||||
} else {
|
} else {
|
||||||
printf("device r/i w/i kr/i"
|
printf("device r/i w/i kr/i"
|
||||||
" kw/i qlen tsvc_t/i sb/i ");
|
" kw/i qlen tsvc_t/i sb/i ");
|
||||||
@ -786,6 +788,9 @@ devstats(int perf_select, long double etime, int havelast)
|
|||||||
DSM_MB_PER_SECOND_WRITE, &mb_per_second_write,
|
DSM_MB_PER_SECOND_WRITE, &mb_per_second_write,
|
||||||
DSM_BLOCKS_PER_SECOND, &blocks_per_second,
|
DSM_BLOCKS_PER_SECOND, &blocks_per_second,
|
||||||
DSM_MS_PER_TRANSACTION, &ms_per_transaction,
|
DSM_MS_PER_TRANSACTION, &ms_per_transaction,
|
||||||
|
DSM_MS_PER_TRANSACTION_READ, &ms_per_read,
|
||||||
|
DSM_MS_PER_TRANSACTION_WRITE, &ms_per_write,
|
||||||
|
DSM_MS_PER_TRANSACTION_OTHER, &ms_per_other,
|
||||||
DSM_BUSY_PCT, &busy_pct,
|
DSM_BUSY_PCT, &busy_pct,
|
||||||
DSM_QUEUE_LENGTH, &queue_len,
|
DSM_QUEUE_LENGTH, &queue_len,
|
||||||
DSM_TOTAL_DURATION, &total_duration,
|
DSM_TOTAL_DURATION, &total_duration,
|
||||||
@ -820,13 +825,18 @@ devstats(int perf_select, long double etime, int havelast)
|
|||||||
mb_per_second_write > ((long double).0005)/1024 ||
|
mb_per_second_write > ((long double).0005)/1024 ||
|
||||||
busy_pct > 0.5) {
|
busy_pct > 0.5) {
|
||||||
if (Iflag == 0)
|
if (Iflag == 0)
|
||||||
printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ",
|
printf("%-8.8s %5d %5d %8.1Lf "
|
||||||
devname, transfers_per_second_read,
|
"%8.1Lf %5d %5d %5d %5d "
|
||||||
transfers_per_second_write,
|
"%4" PRIu64 " %3.0Lf ",
|
||||||
|
devname,
|
||||||
|
(int)transfers_per_second_read,
|
||||||
|
(int)transfers_per_second_write,
|
||||||
mb_per_second_read * 1024,
|
mb_per_second_read * 1024,
|
||||||
mb_per_second_write * 1024,
|
mb_per_second_write * 1024,
|
||||||
queue_len,
|
(int)ms_per_read, (int)ms_per_write,
|
||||||
ms_per_transaction, busy_pct);
|
(int)ms_per_other,
|
||||||
|
(int)ms_per_transaction,
|
||||||
|
queue_len, busy_pct);
|
||||||
else
|
else
|
||||||
printf("%-8.8s %11.1Lf %11.1Lf "
|
printf("%-8.8s %11.1Lf %11.1Lf "
|
||||||
"%12.1Lf %12.1Lf %4" PRIu64
|
"%12.1Lf %12.1Lf %4" PRIu64
|
||||||
|
Loading…
Reference in New Issue
Block a user