1.\" 2.\" This file and its contents are supplied under the terms of the 3.\" Common Development and Distribution License ("CDDL"), version 1.0. 4.\" You may only use this file in accordance with the terms of version 5.\" 1.0 of the CDDL. 6.\" 7.\" A full copy of the text of the CDDL should have accompanied this 8.\" source. A copy of the CDDL is also available via the Internet at 9.\" http://www.illumos.org/license/CDDL. 10.\" 11.\" 12.\" Copyright 2014 Nexenta Systems, Inc. 13.\" 14.Dd Nov 22, 2013 15.Dt SMBSTAT 8 16.Os 17.Sh NAME 18.Nm smbstat 19.Nd report SMB server statistics 20.Sh SYNOPSIS 21.Nm smbstat 22.Op Fl ctu 23.Op Fl r Op Fl anz 24.Op Ar interval 25.Sh DESCRIPTION 26The 27.Nm 28command shows statistical information for the SMB server, including any or all 29of the following four categories: 30.Sy counters , 31.Sy throughput , 32.Sy utilization , 33.Sy requests . 34By default, 35.Nm 36shows 37.Sy throughput 38and 39.Sy utilization . 40.Sh OPTIONS 41.Bl -tag -width Ds 42.It Fl c 43Display 44.Sy counters . 45The columns shown are: 46.Bl -tag -width "users" -compact 47.It Sy nbt 48NetBIOS connections 49.It Sy tcp 50TCP connections 51.It Sy users 52logged on users 53.It Sy trees 54share connections 55.It Sy files 56open files and directories 57.It Sy pipes 58open named pipes 59.El 60.It Fl r 61Display 62.Sy request 63data, one row for each SMB command. 64The columns shown are, for each request type: 65.Bl -tag -width "rt-stddev" -compact 66.It Pq name 67command name 68.It Sy code 69command code 70.It Sy % 71% of requests that fall in this row 72.It Sy rbytes/s 73received bytes per second 74.It Sy tbytes/s 75transmitted bytes per second 76.It Sy reqs/s 77requests per second 78.It Sy rt-mean 79response time average 80.It Sy rt-stddev 81response time standard deviation 82.El 83.It Fl t 84Display 85.Sy throughput . 86The columns shown are: 87.Bl -tag -width "rbytes/s" -compact 88.It Sy rbytes/s 89received bytes per second 90.It Sy tbytes/s 91transmitted bytes per second 92.It Sy reqs/s 93requests per second 94.It Sy reads/s 95number of read requests per second 96.It Sy writes/s 97number of write requests per second 98.El 99.It Fl u 100Display 101.Sy utilization . 102The columns shown are: 103.Bl -tag -width "wtime" -compact 104.It Sy wcnt 105average number of waiting requests 106.It Sy rcnt 107average number of running requests 108.It Sy wtime 109average wait time per request 110.It Sy rtime 111average run time per request 112.It Sy w% 113% of time there were waiting requests 114.It Sy r% 115% of time there were running requests 116.It Sy u% 117utilization, computed as 118.Sy rcnt Ns / Ns Sy max_workers 119.It Sy sat 120has the server been 121.Qq saturated 122.Pq u% at 100 123.It Sy usr% 124% of CPU time in user space 125.It Sy sys% 126% of CPU time in kernel 127.It Sy idle% 128% of CPU time spent idle 129.El 130.El 131.Pp 132The 133.Fl r 134option supports additional modifiers including: 135.Bl -tag -width Ds 136.It Fl a 137show 138.Qq all 139request types 140.Pq including unsupported ones 141.It Fl n 142.Qq name 143order 144.Pq sort by request name 145.It Fl z 146suppress 147.Qq zero 148count rows 149.Pq types for which none were received 150.El 151.Sh OPERANDS 152.Bl -tag -width Ds 153.It Ar interval 154When 155.Ar interval 156is specified, 157.Nm 158runs in a loop, printing the requested output every 159.Ar interval 160seconds. 161When no 162.Ar interval 163is specified, the statistics presented are based on running averages accumulated 164since the system started. 165The first output shows the same cumulative statistics one would see without the 166.Ar interval 167specified, and subsequent outputs represent the activity in the interval that 168just finished. 169.El 170.Sh INTERFACE STABILITY 171.Sy Uncommitted . 172Output format is 173.Sy Not-an-Interface. 174.Sh SEE ALSO 175.Xr sharectl 8 , 176.Xr sharemgr 8 , 177.Xr smbadm 8 , 178.Xr smbd 8 179