smbstat - Show Solaris SMB file server statistics
smbstat [-r [-n [-a | -z] -v ]] [-t] [-u] [-c] [interval [count]
The smbstat command shows statistical information for the smbd(8) server. smbstat has a number of options, described below, and two operands, interval and count. The first table summarizes the activity since the server started. Each subsequent table summarizes the activity for the preceding interval.
By default, the smbstat command shows all statistics.
The smbstat command includes the following options:
Display counters.
Display the statistics of the requests. You can combine –r with the following options.
Display statistics for all the types of server requests, whether valid or not. The –a and –z options are mutually exclusive.
Display in alphabetic order.
Display statistics for requests actually received. The –a and –z options are mutually exclusive.
Specify the SMB version for which to print statistics. The version argument, 1, 2, or 3 requests statistics for only that version. Without –v option, smbstat prints statistics for all versions.
Display the throughput of the SMB server.
Display the utilization of the SMB server.
The smbstat command displays the headings shown below. The headings displayed for a given command vary according to which option(s) are specified. There are four categories of headings, corresponding to categories of statistics: counters, throughput, utilization, and (server) requests.
Number of SMB NetBIOS-over-TCP (NBT) sessions.
Number of SMB TCP sessions.
Number of users logged in.
Number of trees connected.
Number of open files.
Number of open pipes.
Number of idle connections timed out and disconnected.
Number of bytes received per second.
Number of bytes transmitted per second.
Number of requests handled per second.
Number of read requests per second. This would be an aggregation of the following requests: SMB_COM_READ, SMB_COM_LOCK_AND_READ, SMB_COM_READ_ANDX and SMB2_READ.
Number of write requests per second. This would be an aggregation of the following requests: SMB_COM_WRITE, SMB_COM_WRITE_AND_UNLOCK, SMB_COM_WRITE_AND_CLOSE and SMB2_WRITE.
Average number of requests received but waiting for an SMB worker thread to execute them.
Average number of requests being simultaneously executed by an SMB worker thread.
Average time a request waits before an SMB worker thread starts executing it.
Average execution time of a request.
Percentage of the time during which at least one request was waiting.
Percentage of the time during which at least one request was being executed.
Percentage of utilization of the SMB server. This number is defined as: rcnt / (max_worker_threads).
Flag indicating if the server has been saturated in the past. Saturation is defined as: u% == 100%.
Percentage of the time the processor(s) spent in user space.
Percentage of the time the processor(s) spent in kernel space.
Percentage of the time the processor(s) was(were) idle.
The following headings are displayed for each type of request.
Code of the request, in hexadecimal.
Percentage of a given type of request.
Number of requests received.
Number of bytes received per second.
Number of bytes received per second.
Number of requests handled per second.
Average response time in seconds.
Standard deviation of the response time.
The following operand is supported
Number of times statistics are printed.
Report once each interval seconds.
The following command combines the –c, –t, and –u options.
% smbstat -ctu nbt tcp users trees files pipes idle 0 1 1 2 20 0 0 rbytes/s tbytes/s reqs/s reads/s writes/s 1.036e+02 1.298e+00 0.000e+00 0.000e+00 0.000e+00 wcnt rcnt wtime rtime w% r% u% sat usr% sys% idle% 4.317e-01 7.410e+00 2.461e-05 4.224e-04 31 100 0 no 0 76 24Example 2 Displaying SMB2 Requests
The following command displays sample output for displaying smb2 requests.
# smbstat -rv 2 SMB v2 Requests: . code % count rbytes/s tbytes/s req/s rt-mean rt-stddev Smb2Negotiate 00 0 70 0.000e+00 0.000e+00 0.000e+00 3.525e-03 2.450e-05 Smb2SessionSetup 01 0 140 0.000e+00 0.000e+00 0.000e+00 9.640e-03 7.446e-04 Smb2Logoff 02 0 3 0.000e+00 0.000e+00 0.000e+00 7.113e-05 1.766e-05 Smb2TreeConnect 03 0 70 0.000e+00 0.000e+00 0.000e+00 8.932e-05 2.867e-07 Smb2TreeDisconnect 04 0 2 0.000e+00 0.000e+00 0.000e+00 5.658e-06 1.036e-06 Smb2Create 05 0 622 0.000e+00 0.000e+00 0.000e+00 3.353e-02 1.342e-03 Smb2Close 06 0 345 0.000e+00 0.000e+00 0.000e+00 1.345e-05 7.645e-08 Smb2Flush 07 0 2 0.000e+00 0.000e+00 0.000e+00 1.647e-02 1.647e-02 Smb2Read 08 0 52 0.000e+00 0.000e+00 0.000e+00 3.547e-05 3.660e-06 Smb2Write 09 0 101 3.513e+00 0.000e+00 0.000e+00 5.088e-04 3.865e-06 Smb2Lock 0A 0 1 0.000e+00 0.000e+00 0.000e+00 1.528e-05 0.000e+00 Smb2Ioctl 0B 0 0 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 Smb2Cancel 0C 0 0 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 Smb2Echo 0D 0 1 0.000e+00 0.000e+00 0.000e+00 4.601e-06 0.000e+00 Smb2QueryDirectory 0E 0 38 0.000e+00 0.000e+00 0.000e+00 9.123e-05 1.154e-05 Smb2ChangeNotify 0F 0 0 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00 Smb2QueryInfo 10 0 55 0.000e+00 0.000e+00 0.000e+00 4.634e-05 6.007e-06 Smb2SetInfo 11 0 9 0.000e+00 0.000e+00 0.000e+00 9.772e-05 2.421e-05 Smb2OplockBreak 12 0 11 0.000e+00 0.000e+00 0.000e+00 9.808e-06 2.308e-07
The following exit values are returned:
Successful completion.
An error occurred.
See the attributes(7) man page for descriptions of the following attributes:
|