diff options
author | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2015-05-27 01:19:58 +0000 |
commit | 65145fa4c81da358fcbc3b650156dab705dfa34e (patch) | |
tree | 55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /usr.sbin/iostat | |
parent | 60ff4eb0dff94a04d75d0d52a3957aaaf5f8c693 (diff) | |
parent | e6b664c390af88d4a87208bc042ce503da664c3b (diff) | |
download | FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.zip FreeBSD-src-65145fa4c81da358fcbc3b650156dab705dfa34e.tar.gz |
Merge sync of head
Diffstat (limited to 'usr.sbin/iostat')
-rw-r--r-- | usr.sbin/iostat/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/iostat/iostat.8 | 3 | ||||
-rw-r--r-- | usr.sbin/iostat/iostat.c | 32 |
3 files changed, 24 insertions, 14 deletions
diff --git a/usr.sbin/iostat/Makefile b/usr.sbin/iostat/Makefile index 9fd4809..dfbf69d 100644 --- a/usr.sbin/iostat/Makefile +++ b/usr.sbin/iostat/Makefile @@ -4,8 +4,7 @@ PROG= iostat MAN= iostat.8 -DPADD= ${LIBDEVSTAT} ${LIBKVM} ${LIBM} -LDADD= -ldevstat -lkvm -lm +LIBADD= devstat kvm m WARNS?= 1 diff --git a/usr.sbin/iostat/iostat.8 b/usr.sbin/iostat/iostat.8 index 5223b72..2073679 100644 --- a/usr.sbin/iostat/iostat.8 +++ b/usr.sbin/iostat/iostat.8 @@ -56,7 +56,7 @@ .\" .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 .\" -.Dd December 15, 2012 +.Dd May 22, 2015 .Dt IOSTAT 8 .Os .Sh NAME @@ -494,6 +494,7 @@ flags are given, the TTY and CPU displays will be displayed. .Xr ps 1 , .Xr systat 1 , .Xr devstat 3 , +.Xr ctlstat 8 , .Xr gstat 8 , .Xr pstat 8 , .Xr vmstat 8 diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index f566f39..195e59c 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -726,15 +726,17 @@ static void devstats(int perf_select, long double etime, int havelast) { int dn; - long double transfers_per_second, transfers_per_second_read, transfers_per_second_write; - long double kb_per_transfer, mb_per_second, mb_per_second_read, mb_per_second_write; + long double transfers_per_second, transfers_per_second_read; + 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_read, total_transfers_read; u_int64_t total_bytes_write, total_transfers_write; long double busy_pct, busy_time; u_int64_t queue_len; - long double total_mb; - long double blocks_per_second, ms_per_transaction, total_duration; + long double total_mb, blocks_per_second, total_duration; + long double ms_per_other, ms_per_read, ms_per_write, ms_per_transaction; int firstline = 1; char *devname; @@ -746,8 +748,8 @@ devstats(int perf_select, long double etime, int havelast) printf(" cpu "); printf("\n"); if (Iflag == 0) { - printf("device r/s w/s kr/s kw/s qlen " - "svc_t %%b "); + printf("device r/s w/s kr/s kw/s " + " ms/r ms/w ms/o ms/t qlen %%b "); } else { printf("device r/i w/i kr/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_BLOCKS_PER_SECOND, &blocks_per_second, 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_QUEUE_LENGTH, &queue_len, 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 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ", - devname, transfers_per_second_read, - transfers_per_second_write, + printf("%-8.8s %5d %5d %8.1Lf " + "%8.1Lf %5d %5d %5d %5d " + "%4" PRIu64 " %3.0Lf ", + devname, + (int)transfers_per_second_read, + (int)transfers_per_second_write, mb_per_second_read * 1024, mb_per_second_write * 1024, - queue_len, - ms_per_transaction, busy_pct); + (int)ms_per_read, (int)ms_per_write, + (int)ms_per_other, + (int)ms_per_transaction, + queue_len, busy_pct); else printf("%-8.8s %11.1Lf %11.1Lf " "%12.1Lf %12.1Lf %4" PRIu64 |