Debian Codegraph @

upstream/opensuse-tumbleweed/man1/smbstatus.1

raw
1 '\" t
2 .\" Title: smbstatus
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: User Commands
7 .\" Source: Samba 4.23.8-git.477.f78166bceedSUSE-oS16.9-x86_64
8 .\" Language: English
9 .\"
10 .TH "SMBSTATUS" "1" "05/26/2026" "Samba 4\&.23\&.8\-git\&.477\&.f78166bcee" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 smbstatus \- report on current Samba connections
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 smbstatus [\-p|\-\-processes] [\-v|\-\-verbose] [\-L|\-\-locks] [\-S|\-\-shares] [\-N|\-\-notify] [\-u|\-\-user=STRING] [\-b|\-\-brief] [\-P|\-\-profile] [\-R|\-\-profile\-rates] [\-B|\-\-byterange] [\-n|\-\-numeric] [\-f|\-\-fast] [\-j|\-\-json] [\-\-resolve\-uids] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full]
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 smbstatus
42 is a very simple program to list the current Samba connections\&.
43 .SH "OPTIONS"
44 .PP
45 \-P|\-\-profile
46 .RS 4
47 If samba has been compiled with the profiling option, print only the contents of the profiling shared memory area\&.
48 .RE
49 .PP
50 \-R|\-\-profile\-rates
51 .RS 4
52 If samba has been compiled with the profiling option, print the contents of the profiling shared memory area and the call rates\&.
53 .RE
54 .PP
55 \-b|\-\-brief
56 .RS 4
57 gives brief output\&.
58 .RE
59 .PP
60 \-v|\-\-verbose
61 .RS 4
62 gives verbose output\&.
63 .RE
64 .PP
65 \-L|\-\-locks
66 .RS 4
67 causes smbstatus to only list locks\&.
68 .RE
69 .PP
70 \-B|\-\-byterange
71 .RS 4
72 causes smbstatus to include byte range locks\&.
73 .RE
74 .PP
75 \-p|\-\-processes
76 .RS 4
77 print a list of
78 \fBsmbd\fR(8)
79 processes and exit\&. Useful for scripting\&.
80 .RE
81 .PP
82 \-S|\-\-shares
83 .RS 4
84 causes smbstatus to only list shares\&.
85 .RE
86 .PP
87 \-N|\-\-notify
88 .RS 4
89 causes smbstatus to display registered file notifications
90 .RE
91 .PP
92 \-f|\-\-fast
93 .RS 4
94 causes smbstatus to not check if the status data is valid by checking if the processes that the status data refer to all still exist\&. This speeds up execution on busy systems and clusters but might display stale data of processes that died without cleaning up properly\&.
95 .RE
96 .PP
97 \-u|\-\-user=<username>
98 .RS 4
99 selects information relevant to
100 \fIusername\fR
101 only\&.
102 .RE
103 .PP
104 \-n|\-\-numeric
105 .RS 4
106 causes smbstatus to display numeric UIDs and GIDs instead of resolving them to names\&.
107 .RE
108 .PP
109 \-j|\-\-json
110 .RS 4
111 Output more detailed information in JSON format instead of human readable\&. The output has the following format:
112 .sp
113 .if n \{\
114 .RS 4
115 .\}
116 .nf
117 {
118 "timestamp": "2022\-04\-15T18:25:15\&.364891+0200",
119 "version": "4\&.17\&.0pre1\-GIT\-a0f12b9c80b",
120 "smb_conf": "/opt/samba/etc/smb\&.conf",
121 "sessions": {
122 "3639217376": {
123 "session_id": "3639217376",
124 "server_id": {
125 "pid": "69650",
126 "task_id": "0",
127 "vnn": "4294967295",
128 "unique_id": "10756714984493602300"
129 },
130 "uid": 1000,
131 "gid": 1000,
132 "username": "johndoe",
133 "groupname": "johndoe",
134 "remote_machine": "127\&.0\&.0\&.1",
135 "hostname": "ipv4:127\&.0\&.0\&.1:59944",
136 "session_dialect": "SMB3_11",
137 "encryption": {
138 "cipher": "",
139 "degree": "none"
140 },
141 "signing": {
142 "cipher": "AES\-128\-GMAC",
143 "degree": "partial"
144 }
145 }
146 },
147 "tcons": {
148 "3813255619": {
149 "service": "sharename",
150 "server_id": {
151 "pid": "69650",
152 "task_id": "0",
153 "vnn": "4294967295",
154 "unique_id": "10756714984493602300"
155 },
156 "tcon_id": "3813255619",
157 "session_id": "3639217376",
158 "machine": "127\&.0\&.0\&.1",
159 "connected_at": "2022\-04\-15T17:30:37+0200",
160 "encryption": {
161 "cipher": "AES\-128\-GMAC",
162 "degree": "full"
163 },
164 "signing": {
165 "cipher": "",
166 "degree": "none"
167 }
168 }
169 },
170 "open_files": {
171 "/home/johndoe/testfolder/sample": {
172 "service_path": "/home/johndoe/testfolder",
173 "filename": "sample",
174 "fileid": {
175 "devid": 59,
176 "inode": 11404245,
177 "extid": 0
178 },
179 "num_pending_deletes": 0,
180 "opens": {
181 "56839/2": {
182 "server_id": {
183 "pid": "69650",
184 "task_id": "0",
185 "vnn": "4294967295",
186 "unique_id": "10756714984493602300"
187 },
188 "uid": 1000,
189 "share_file_id": 2,
190 "sharemode": {
191 "hex": "0x00000003",
192 "NONE": false,
193 "READ": true,
194 "WRITE": true,
195 "DELETE": false,
196 "text": "RW"
197 },
198 "access_mask": {
199 "hex": "0x00000003",
200 "READ_DATA": true,
201 "WRITE_DATA": true,
202 "APPEND_DATA": false,
203 "READ_EA": false,
204 "WRITE_EA": false,
205 "EXECUTE": false,
206 "READ_ATTRIBUTES": false,
207 "WRITE_ATTRIBUTES": false,
208 "DELETE_CHILD": false,
209 "DELETE": false,
210 "READ_CONTROL": false,
211 "WRITE_DAC": false,
212 "SYNCHRONIZE": false,
213 "ACCESS_SYSTEM_SECURITY": false,
214 "text": "RW"
215 },
216 "caching": {
217 "READ": false,
218 "WRITE": false,
219 "HANDLE": false,
220 "hex": "0x00000000",
221 "text": ""
222 },
223 "oplock": {},
224 "lease": {},
225 "opened_at": "2022\-04\-15T17:30:38+0200"
226 }
227 }
228 }
229 }
230 }
231 .fi
232 .if n \{\
233 .RE
234 .\}
235 .sp
236 If oplocks are used:
237 .sp
238 .if n \{\
239 .RS 4
240 .\}
241 .nf
242 "oplock": {
243 "EXCLUSIVE": false,
244 "BATCH": false,
245 "LEVEL_II": true,
246 "LEASE": false,
247 "text": "LEVEL_II"
248 }
249 .fi
250 .if n \{\
251 .RE
252 .\}
253 .sp
254 If leases are used:
255 .sp
256 .if n \{\
257 .RS 4
258 .\}
259 .nf
260 "lease": {
261 "lease_key": "29316055\-f55c\-de10\-c813\-af7bf5a430bb",
262 "hex": "0x00000005",
263 "READ": true,
264 "WRITE": true,
265 "HANDLE": false,
266 "text": "RW"
267 }
268 .fi
269 .if n \{\
270 .RE
271 .\}
272 .sp
273 With byte\-range locks (\-B, \-\-byterange):
274 .sp
275 .if n \{\
276 .RS 4
277 .\}
278 .nf
279 "byte_range_locks": {
280 "/home/johndoe/testfolder/sample": {
281 "fileid": {
282 "devid": 59,
283 "inode": 11404245,
284 "extid": 0
285 },
286 "file_name": "sample",
287 "share_path": "/home/johndoe/testfolder",
288 "locks": [
289 {
290 "server_id": {
291 "pid": "69650",
292 "task_id": "0",
293 "vnn": "4294967295",
294 "unique_id": "10756714984493602300"
295 },
296 "type": "R",
297 "flavour": "Posix",
298 "start": 0,
299 "size": 16
300 }
301 ]
302 }
303 .fi
304 .if n \{\
305 .RE
306 .\}
307 .sp
308 With notifies (\-N, \-\-notify):
309 .sp
310 .if n \{\
311 .RS 4
312 .\}
313 .nf
314 "notify": {
315 "77247": {
316 "server_id": {
317 "pid": "69650",
318 "task_id": "0",
319 "vnn": "4294967295",
320 "unique_id": "10756714984493602300"
321 },
322 "path": "/home/johndoe/testfolder/testdir",
323 "filter": 4095,
324 "subdir_filter": 4095,
325 "creation_time": "1970\-01\-01T01:00:14\&.326582+01:00"
326 }
327 }
328 .fi
329 .if n \{\
330 .RE
331 .\}
332 .sp
333 For profiling (\-P, \-\-profile):
334 .sp
335 .if n \{\
336 .RS 4
337 .\}
338 .nf
339 {
340 "timestamp": "2022\-04\-15T18:40:43\&.112216+0200",
341 "version": "4\&.17\&.0pre1\-GIT\-a0f12b9c80b",
342 "smb_conf": "/opt/samba/etc/smb\&.conf",
343 "SMBD loop": {
344 "connect": {
345 "count": 2
346 },
347 "disconnect": {
348 "count": 1
349 },
350 \&.\&.\&.
351 },
352 "System Calls": {
353 "syscall_opendir": {
354 "count": 0,
355 "time": 0
356 },
357 \&.\&.\&.
358 },
359 "ACL Calls": {
360 "get_nt_acl": {
361 "count": 0,
362 "time": 0
363 },
364 \&.\&.\&.
365 },
366 "Stat Cache": {
367 "statcache_lookups": {
368 "count": 2
369 },
370 \&.\&.\&.
371 },
372 "SMB Calls": {
373 "SMBmkdir": {
374 "count": 0,
375 "time": 0
376 },
377 \&.\&.\&.
378 },
379 "Trans2 Calls": {
380 "Trans2_open": {
381 "count": 0,
382 "time": 0
383 },
384 \&.\&.\&.
385 },
386 "NT Transact Calls": {
387 "NT_transact_create": {
388 "count": 0,
389 "time": 0
390 },
391 \&.\&.\&.
392 },
393 "SMB2 Calls": {
394 "smb2_negprot": {
395 "count": 2,
396 "time": 3060,
397 "idle": 0,
398 "inbytes": 452,
399 "outbytes": 568
400 },
401 \&.\&.\&.
402 }
403 }
404 .fi
405 .if n \{\
406 .RE
407 .\}
408 .sp
409 .RE
410 .PP
411 \-?|\-\-help
412 .RS 4
413 Print a summary of command line options\&.
414 .RE
415 .PP
416 \-\-usage
417 .RS 4
418 Display brief usage message\&.
419 .RE
420 .PP
421 \-d|\-\-debuglevel=level
422 .RS 4
423 \fIlevel\fR
424 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
425 .sp
426 The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
427 .sp
428 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
429 .sp
430 Note that specifying this parameter here will override the
431 \m[blue]\fBlog level\fR\m[]
432 parameter in the
433 /etc/samba/smb\&.conf
434 file\&.
435 .RE
436 .PP
437 \-\-debug\-stdout
438 .RS 4
439 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
440 .RE
441 .PP
442 \-\-configfile=<configuration file>
443 .RS 4
444 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
445 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
446 /etc/samba/smb\&.conf
447 for more information\&. The default configuration file name is determined at compile time\&.
448 .RE
449 .PP
450 \-\-option=<name>=<value>
451 .RS 4
452 Set the
453 \fBsmb.conf\fR(5)
454 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
455 .RE
456 .PP
457 \-l|\-\-log\-basename=logdirectory
458 .RS 4
459 Base directory name for log/debug files\&. The extension
460 \fB"\&.progname"\fR
461 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
462 .RE
463 .PP
464 \-\-leak\-report
465 .RS 4
466 Enable talloc leak reporting on exit\&.
467 .RE
468 .PP
469 \-\-leak\-report\-full
470 .RS 4
471 Enable full talloc leak reporting on exit\&.
472 .RE
473 .PP
474 \-V|\-\-version
475 .RS 4
476 Prints the program version number\&.
477 .RE
478 .SH "VERSION"
479 .PP
480 This man page is part of version 4\&.23\&.8\-git\&.477\&.f78166bceedSUSE\-oS16\&.9\-x86_64 of the Samba suite\&.
481 .SH "SEE ALSO"
482 .PP
483 \fBsmbd\fR(8)
484 and
485 \fBsmb.conf\fR(5)\&.
486 .SH "AUTHOR"
487 .PP
488 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.