auth/credentials: don't ignore "client use kerberos" and --use-kerberos for machine...
[samba.git] / docs-xml / manpages / smbstatus.1.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="smbstatus.1">
4
5 <refmeta>
6         <refentrytitle>smbstatus</refentrytitle>
7         <manvolnum>1</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">User Commands</refmiscinfo>
10         <refmiscinfo class="version">&doc.version;</refmiscinfo>
11 </refmeta>
12
13
14 <refnamediv>
15         <refname>smbstatus</refname>
16         <refpurpose>report on current Samba connections</refpurpose>
17 </refnamediv>
18
19 <refsynopsisdiv>
20         <cmdsynopsis>
21                 <command>smbstatus</command>
22                 <arg choice="opt">-p|--processes</arg>
23                 <arg choice="opt">-v|--verbose</arg>
24                 <arg choice="opt">-L|--locks</arg>
25                 <arg choice="opt">-S|--shares</arg>
26                 <arg choice="opt">-N|--notify</arg>
27                 <arg choice="opt">-u|--user=STRING</arg>
28                 <arg choice="opt">-b|--brief</arg>
29                 <arg choice="opt">-P|--profile</arg>
30                 <arg choice="opt">-R|--profile-rates</arg>
31                 <arg choice="opt">-B|--byterange</arg>
32                 <arg choice="opt">-n|--numeric</arg>
33                 <arg choice="opt">-f|--fast</arg>
34                 <arg choice="opt">-j|--json</arg>
35                 <arg choice="opt">--resolve-uids</arg>
36                 <arg choice="opt">-?|--help</arg>
37                 <arg choice="opt">--usage</arg>
38                 <arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
39                 <arg choice="opt">--debug-stdout</arg>
40                 <arg choice="opt">--configfile=CONFIGFILE</arg>
41                 <arg choice="opt">--option=name=value</arg>
42                 <arg choice="opt">-l|--log-basename=LOGFILEBASE</arg>
43                 <arg choice="opt">--leak-report</arg>
44                 <arg choice="opt">--leak-report-full</arg>
45         </cmdsynopsis>
46 </refsynopsisdiv>
47
48 <refsect1>
49         <title>DESCRIPTION</title>
50
51         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
52         <manvolnum>7</manvolnum></citerefentry> suite.</para>
53
54         <para><command>smbstatus</command> is a very simple program to 
55         list the current Samba connections.</para>
56 </refsect1>
57
58 <refsect1>
59         <title>OPTIONS</title>
60
61         <variablelist>
62                 <varlistentry>
63                 <term>-P|--profile</term>
64                 <listitem><para>If samba has been compiled with the
65                 profiling option, print only the contents of the profiling
66                 shared memory area.</para></listitem>
67                 </varlistentry>
68
69                 <varlistentry>
70                 <term>-R|--profile-rates</term>
71                 <listitem><para>If samba has been compiled with the
72                 profiling option, print the contents of the profiling
73                 shared memory area and the call rates.</para></listitem>
74                 </varlistentry>
75
76                 <varlistentry>
77                 <term>-b|--brief</term>
78                 <listitem><para>gives brief output.</para></listitem>
79                 </varlistentry>
80
81                 <varlistentry>
82                 <term>-v|--verbose</term>
83                 <listitem><para>gives verbose output.</para></listitem>
84                 </varlistentry>
85
86                 <varlistentry>
87                 <term>-L|--locks</term>
88                 <listitem><para>causes smbstatus to only list locks.</para>
89                 </listitem>
90                 </varlistentry>
91
92                 <varlistentry>
93                 <term>-B|--byterange</term>
94                 <listitem><para>causes smbstatus to include byte range locks.
95                 </para></listitem>
96                 </varlistentry>
97
98                 <varlistentry>
99                 <term>-p|--processes</term>
100                 <listitem><para>print a list of <citerefentry><refentrytitle>smbd</refentrytitle>
101                 <manvolnum>8</manvolnum></citerefentry> processes and exit. 
102                 Useful for scripting.</para></listitem>
103                 </varlistentry>
104
105                 <varlistentry>
106                 <term>-S|--shares</term>
107                 <listitem><para>causes smbstatus to only list shares.</para>
108                 </listitem>
109                 </varlistentry>
110
111                 <varlistentry>
112                 <term>-N|--notify</term>
113                 <listitem><para>causes smbstatus to display registered file
114                 notifications</para>
115                 </listitem>
116                 </varlistentry>
117
118                 <varlistentry>
119                 <term>-f|--fast</term>
120                 <listitem><para>causes smbstatus to not check if the status data
121                 is valid by checking if the processes that the status data refer to all still
122                 exist. This speeds up execution on busy systems and clusters but
123                 might display stale data of processes that died without cleaning up properly.</para>
124                 </listitem>
125                 </varlistentry>
126
127                 <varlistentry>
128                 <term>-u|--user=&lt;username&gt;</term>
129                 <listitem><para>selects information relevant to <parameter>username</parameter> only.</para>
130                 </listitem>
131                 </varlistentry>
132
133                 <varlistentry>
134                 <term>-n|--numeric</term>
135                 <listitem><para>causes smbstatus to display numeric UIDs and GIDs instead of
136                                 resolving them to names.</para>
137                 </listitem>
138                 </varlistentry>
139
140                 <varlistentry>
141                 <term>-j|--json</term>
142                 <listitem><para>Output more detailed information in JSON format instead
143                                 of human readable.
144                                 The output has the following format:
145                                 <programlisting>
146 {
147   "timestamp": "2022-04-15T18:25:15.364891+0200",
148   "version": "4.17.0pre1-GIT-a0f12b9c80b",
149   "smb_conf": "/opt/samba/etc/smb.conf",
150   "sessions": {
151     "3639217376": {
152       "session_id": "3639217376",
153       "server_id": {
154         "pid": "69650",
155         "task_id": "0",
156         "vnn": "4294967295",
157         "unique_id": "10756714984493602300"
158       },
159       "uid": 1000,
160       "gid": 1000,
161       "username": "johndoe",
162       "groupname": "johndoe",
163       "remote_machine": "127.0.0.1",
164       "hostname": "ipv4:127.0.0.1:59944",
165       "session_dialect": "SMB3_11",
166       "encryption": {
167         "cipher": "",
168         "degree": "none"
169       },
170       "signing": {
171         "cipher": "AES-128-GMAC",
172         "degree": "partial"
173       }
174     }
175   },
176   "tcons": {
177     "3813255619": {
178       "service": "sharename",
179       "server_id": {
180         "pid": "69650",
181         "task_id": "0",
182         "vnn": "4294967295",
183         "unique_id": "10756714984493602300"
184       },
185       "tcon_id": "3813255619",
186       "session_id": "3639217376",
187       "machine": "127.0.0.1",
188       "connected_at": "2022-04-15T17:30:37+0200",
189       "encryption": {
190         "cipher": "AES-128-GMAC",
191         "degree": "full"
192       },
193       "signing": {
194         "cipher": "",
195         "degree": "none"
196       }
197     }
198   },
199   "open_files": {
200     "/home/johndoe/testfolder/sample": {
201       "service_path": "/home/johndoe/testfolder",
202       "filename": "sample",
203       "fileid": {
204         "devid": 59,
205         "inode": 11404245,
206         "extid": 0
207       },
208       "num_pending_deletes": 0,
209       "opens": {
210         "56839/2": {
211           "server_id": {
212             "pid": "69650",
213             "task_id": "0",
214             "vnn": "4294967295",
215             "unique_id": "10756714984493602300"
216           },
217           "uid": 1000,
218           "share_file_id": 2,
219           "sharemode": {
220             "hex": "0x00000003",
221             "NONE": false,
222             "READ": true,
223             "WRITE": true,
224             "DELETE": false,
225             "text": "RW"
226           },
227           "access_mask": {
228             "hex": "0x00000003",
229             "READ_DATA": true,
230             "WRITE_DATA": true,
231             "APPEND_DATA": false,
232             "READ_EA": false,
233             "WRITE_EA": false,
234             "EXECUTE": false,
235             "READ_ATTRIBUTES": false,
236             "WRITE_ATTRIBUTES": false,
237             "DELETE_CHILD": false,
238             "DELETE": false,
239             "READ_CONTROL": false,
240             "WRITE_DAC": false,
241             "SYNCHRONIZE": false,
242             "ACCESS_SYSTEM_SECURITY": false,
243             "text": "RW"
244           },
245           "caching": {
246             "READ": false,
247             "WRITE": false,
248             "HANDLE": false,
249             "hex": "0x00000000",
250             "text": ""
251           },
252           "oplock": {},
253           "lease": {},
254           "opened_at": "2022-04-15T17:30:38+0200"
255         }
256       }
257     }
258   }
259 }
260                                 </programlisting> </para>
261
262                         <para>If oplocks are used:
263                                 <programlisting>
264           "oplock": {
265             "EXCLUSIVE": false,
266             "BATCH": false,
267             "LEVEL_II": true,
268             "LEASE": false,
269             "text": "LEVEL_II"
270           }
271                                 </programlisting> </para>
272
273                         <para>If leases are used:
274
275                                 <programlisting>
276           "lease": {
277             "lease_key": "29316055-f55c-de10-c813-af7bf5a430bb",
278             "hex": "0x00000005",
279             "READ": true,
280             "WRITE": true,
281             "HANDLE": false,
282             "text": "RW"
283           }
284                         </programlisting> </para>
285
286                         <para>With byte-range locks (-B, --byterange):
287                                 <programlisting>
288   "byte_range_locks": {
289     "/home/johndoe/testfolder/sample": {
290       "fileid": {
291         "devid": 59,
292         "inode": 11404245,
293         "extid": 0
294       },
295       "file_name": "sample",
296       "share_path": "/home/johndoe/testfolder",
297       "locks": [
298         {
299           "server_id": {
300             "pid": "69650",
301             "task_id": "0",
302             "vnn": "4294967295",
303             "unique_id": "10756714984493602300"
304           },
305           "type": "R",
306           "flavour": "Posix",
307           "start": 0,
308           "size": 16
309         }
310       ]
311     }
312                         </programlisting> </para>
313
314                         <para> With notifies (-N, --notify):
315                                 <programlisting>
316   "notify": {
317     "77247": {
318       "server_id": {
319         "pid": "69650",
320         "task_id": "0",
321         "vnn": "4294967295",
322         "unique_id": "10756714984493602300"
323       },
324       "path": "/home/johndoe/testfolder/testdir",
325       "filter": 4095,
326       "subdir_filter": 4095,
327       "creation_time": "1970-01-01T01:00:14.326582+01:00"
328     }
329   }
330                         </programlisting> </para>
331
332                         <para> For profiling (-P, --profile):
333                                 <programlisting>
334 {
335   "timestamp": "2022-04-15T18:40:43.112216+0200",
336   "version": "4.17.0pre1-GIT-a0f12b9c80b",
337   "smb_conf": "/opt/samba/etc/smb.conf",
338   "SMBD loop": {
339     "connect": {
340       "count": 2
341     },
342     "disconnect": {
343       "count": 1
344     },
345     ...
346   },
347   "System Calls": {
348     "syscall_opendir": {
349       "count": 0,
350       "time": 0
351     },
352     ...
353   },
354   "ACL Calls": {
355     "get_nt_acl": {
356       "count": 0,
357       "time": 0
358     },
359     ...
360   },
361   "Stat Cache": {
362     "statcache_lookups": {
363       "count": 2
364     },
365     ...
366   },
367   "SMB Calls": {
368     "SMBmkdir": {
369       "count": 0,
370       "time": 0
371     },
372     ...
373   },
374   "Trans2 Calls": {
375     "Trans2_open": {
376       "count": 0,
377       "time": 0
378     },
379     ...
380   },
381   "NT Transact Calls": {
382     "NT_transact_create": {
383       "count": 0,
384       "time": 0
385     },
386     ...
387   },
388   "SMB2 Calls": {
389     "smb2_negprot": {
390       "count": 2,
391       "time": 3060,
392       "idle": 0,
393       "inbytes": 452,
394       "outbytes": 568
395     },
396     ...
397   }
398 }
399                         </programlisting> </para>
400                 </listitem>
401                 </varlistentry>
402
403                 &popt.autohelp;
404                 &cmdline.common.samba.client;
405         </variablelist>
406 </refsect1>
407
408 <refsect1>
409         <title>VERSION</title>
410
411         <para>This man page is part of version &doc.version; of
412         the Samba suite.</para>
413 </refsect1>
414
415 <refsect1>
416         <title>SEE ALSO</title>
417         <para><citerefentry><refentrytitle>smbd</refentrytitle>
418         <manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>smb.conf</refentrytitle>
419         <manvolnum>5</manvolnum></citerefentry>.</para>
420 </refsect1>
421
422 <refsect1>
423         <title>AUTHOR</title>
424         
425         <para>The original Samba software and related utilities 
426         were created by Andrew Tridgell. Samba is now developed
427         by the Samba Team as an Open Source project similar 
428         to the way the Linux kernel is developed.</para>
429 </refsect1>
430
431 </refentry>