SPOTDELAY.CIFS.SERVER(1)SPOTDELAY.CIFS.SERVER(1)NAMEspotdelay.cifs.server - A Perl script utility that reads through a CIFS
Server debug output file, checking for delays and therefore bottlenecks
in its running.
SYNOPSISspotdelay.cifs.server [-h] [-NNNN] <cifs server log file>
DESCRIPTION
This tool is part of the CIFS WTEC Support Tools suite.
spotdelay.cifs.server is a Perl script that runs through the user pro‐
vided CIFS Server debug file looking at the time stamps for each line
in the trace. It will issue a warning when the following condition
holds:
Delays occur greater than a specified time (NN seconds) between
sequential lines in the trace.
Last MAXCNT lines that take longer than MAXCNTDIFF time to com‐
plete.
The script was designed to be short, but still readable, with the aim
that it will be easy to cut and paste onto a customer's system. Be‐
cause of this, it takes only two command line arguments. (See Options
below)
You will have to examine the lines that spotdelay.cifs.server warns
about to see if there are actual bottlenecks, and what specific SMB re‐
quest/reply pairs are involved. But I would not expect to see sequen‐
tial lines in a trace file to take longer than 1 second. If 1 second
intervals is not granular enough, spotdelay.cifs will work with trace
files taken with microdebug=yes.
LIMITATIONSspotdelay.cifs.server will get confused by traces that run over mid‐
night, since it assumes that the time shown is from the beginning of
the day.
spotdelay.cifs.server may also misreport delays near the end of trun‐
cated trace files.
OPTIONS-h Print a summary of command line options.
-NN Sets the maximum time (in seconds)between debug lines above
which spotdelay.cifs.client will issue a warning. For example
to see if there are any lines with 1 second or more between
them, set this to 1.
MAXCNT
MAXCNTDIFF
These 2 parameters work together, and can be set by editing the
first couple of lines in the script itself. MAXCNT sets the
minimum number of sequential lines than need to be seen within
MAXCNTDIFF time. So for example with MAXCNT at 10, and MAXCNTD‐
IFF at 1, spotdelay.cifs.server will issue a warning if it sees
the CIFS Server taking 1 second or more to produce 10 or less
lines. Be careful not to set MAXCNT too high, as the script has
to remember the times from the previous MAXCNT lines.
OUTPUTspotdelay.cifs.server prints out any line where the current timestamp
is NNNN milliseconds greater than the timestamp from the previous line.
The output is of the form:
NFS Command [XXXXXXXX] took YYYYY ms to return
Armed with this information, you can view the log file itself to deter‐
mine WHAT the events surrounding the delay were.
DEPENDENCIES
spotdelay.cifs.client works best with a debug file input that was cap‐
tured with a log level = 10 in the /etc/opt/samba/smb.conf file.
This script was developed and tested under perl(1) version 5.005_02
built for PA-RISC1.1 . While it may run under previous versions it is
recommended that you install 5.005_02 or higher for best results. You
may need to modify the first line to point to whatever location YOUR
environment has perl installed.
SEE ALSOcifs_diag(1)spotdelay.cifs.client(1)AUTHOR
Ian Jespersen, HP WTEC NOS Support Team, with revisions by Don McCall,
also of the HP WTEC NOS Support Team.
SPOTDELAY.CIFS.SERVER(1)