Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

smbstat(8)

Name

smbstat - Show Solaris SMB file server statistics

Synopsis

smbstat [-r [-n [-a | -z] -v ]] [-t] [-u] [-c] [interval [count]

Description

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.

Options

The smbstat command includes the following options:

–c

Display counters.

–r

Display the statistics of the requests. You can combine –r with the following options.

–a

Display statistics for all the types of server requests, whether valid or not. The –a and –z options are mutually exclusive.

–n

Display in alphabetic order.

–z

Display statistics for requests actually received. The –a and –z options are mutually exclusive.

–v version

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.

–t

Display the throughput of the SMB server.

–u

Display the utilization of the SMB server.

Extended Description

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.

Counters

nbt

Number of SMB NetBIOS-over-TCP (NBT) sessions.

tcp

Number of SMB TCP sessions.

users

Number of users logged in.

trees

Number of trees connected.

files

Number of open files.

pipes

Number of open pipes.

Throughput

rbytes/s

Number of bytes received per second.

tbytes/s

Number of bytes transmitted per second.

reqs/s

Number of requests handled per second.

reads/s

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.

writes/s

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.

Utilization

wcnt

Average number of requests received but waiting for an SMB worker thread to execute them.

rcnt

Average number of requests being simultaneously executed by an SMB worker thread.

wtime

Average time a request waits before an SMB worker thread starts executing it.

rtime

Average execution time of a request.

w%

Percentage of the time during which at least one request was waiting.

r%

Percentage of the time during which at least one request was being executed.

u%

Percentage of utilization of the SMB server. This number is defined as: rcnt / (max_worker_threads).

sat

Flag indicating if the server has been saturated in the past. Saturation is defined as: u% == 100%.

usr%

Percentage of the time the processor(s) spent in user space.

sys%

Percentage of the time the processor(s) spent in kernel space.

idle%

Percentage of the time the processor(s) was(were) idle.

Requests

The following headings are displayed for each type of request.

code

Code of the request, in hexadecimal.

%

Percentage of a given type of request.

count

Number of requests received.

rbytes/s

Number of bytes received per second.

tbytes/s

Number of bytes received per second.

req/s

Number of requests handled per second.

rt-mean

Average response time in seconds.

rt-stddev

Standard deviation of the response time.

Operands

The following operand is supported

count

Number of times statistics are printed.

interval

Report once each interval seconds.

Examples

Example 1 Combining Options

The following command combines the –c, –t, and –u options.

% smbstat -ctu
nbt   tcp users trees files pipes
0     1     1     2    20     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   24
Example 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 

Exit Status

EXIT STATUS

The following exit values are returned:

0

Successful completion.

>0

An error occurred.

Attributes

See the attributes(7) man page for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
service/file-system/smb
Interface Stability
Uncommitted
Utility Output Format
Not-an-Interface

See Also

attributes(7), sharectl(8), smbadm(8), smbd(8)