SMBSTATUS(1)
π smbstatus π
okay bestie, welcome to smbstatus(1) β that's User Commands, section 1 of the manual, and she is that girl. π Let's get into it. π¦
β¨ NAME β¨
smbstatus β report on current Samba connections π
β¨ SYNOPSIS β¨
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]
like, that's the whole vibe in one block π
β¨ DESCRIPTION β¨
This tool is part of the samba(7) suite. π«Ά
smbstatus is a very simple program to list the current Samba connections. no cap, that is literally the whole job. she's simple, she's effective, she's booked and busy. β¨
β¨ OPTIONS β¨
-P,--profileβ if Samba was compiled with the profiling option, this prints only the contents of the profiling shared memory area. nothing else, just the profile tea. π₯-R,--profile-ratesβ same deal (Samba had to be compiled with the profiling option), but this one prints the contents of the profiling shared memory area and the call rates. rates included, bestie. π-b,--briefβ gives you brief output. short, sweet, to the point. π-v,--verboseβ gives you verbose output. she talks. a lot. but lovingly. π¬-L,--locksβ makessmbstatuslist only locks. that's it, that's the whole task. π-B,--byterangeβ makessmbstatusinclude byte range locks in the output. π-p,--processesβ prints a list ofsmbd(8)processes and then exits. super useful for scripting, iykyk. π€-S,--sharesβ makessmbstatuslist only shares. π-N,--notifyβ makessmbstatusdisplay registered file notifications. π-f,--fastβ makessmbstatusskip checking whether the status data is actually valid, i.e. it doesn't verify that all the processes the status data refers to still exist. this speeds things up on busy systems and clusters, but it might display stale data of processes that died without cleaning up properly. fast and sketchy, we love a risky queen. π-u,--user=<username>β selects information relevant to username only. one user, one spotlight. π-n,--numericβ makessmbstatusdisplay numeric UIDs and GIDs instead of resolving them to names. numbers stay numbers. π’-j,--jsonβ outputs more detailed information in JSON format instead of human readable. the output has the following format:
{
"timestamp": "2022-04-15T18:25:15.364891+0200",
"version": "4.17.0pre1-GIT-a0f12b9c80b",
"smb_conf": "/opt/samba/etc/smb.conf",
"sessions": {
"3639217376": {
"session_id": "3639217376",
"server_id": {
"pid": "69650",
"task_id": "0",
"vnn": "4294967295",
"unique_id": "10756714984493602300"
},
"uid": 1000,
"gid": 1000,
"username": "johndoe",
"groupname": "johndoe",
"remote_machine": "127.0.0.1",
"hostname": "ipv4:127.0.0.1:59944",
"session_dialect": "SMB3_11",
"encryption": {
"cipher": "",
"degree": "none"
},
"signing": {
"cipher": "AES-128-GMAC",
"degree": "partial"
}
}
},
"tcons": {
"3813255619": {
"service": "sharename",
"server_id": {
"pid": "69650",
"task_id": "0",
"vnn": "4294967295",
"unique_id": "10756714984493602300"
},
"tcon_id": "3813255619",
"session_id": "3639217376",
"machine": "127.0.0.1",
"connected_at": "2022-04-15T17:30:37+0200",
"encryption": {
"cipher": "AES-128-GMAC",
"degree": "full"
},
"signing": {
"cipher": "",
"degree": "none"
}
}
},
"open_files": {
"/home/johndoe/testfolder/sample": {
"service_path": "/home/johndoe/testfolder",
"filename": "sample",
"fileid": {
"devid": 59,
"inode": 11404245,
"extid": 0
},
"num_pending_deletes": 0,
"opens": {
"56839/2": {
"server_id": {
"pid": "69650",
"task_id": "0",
"vnn": "4294967295",
"unique_id": "10756714984493602300"
},
"uid": 1000,
"share_file_id": 2,
"sharemode": {
"hex": "0x00000003",
"NONE": false,
"READ": true,
"WRITE": true,
"DELETE": false,
"text": "RW"
},
"access_mask": {
"hex": "0x00000003",
"READ_DATA": true,
"WRITE_DATA": true,
"APPEND_DATA": false,
"READ_EA": false,
"WRITE_EA": false,
"EXECUTE": false,
"READ_ATTRIBUTES": false,
"WRITE_ATTRIBUTES": false,
"DELETE_CHILD": false,
"DELETE": false,
"READ_CONTROL": false,
"WRITE_DAC": false,
"SYNCHRONIZE": false,
"ACCESS_SYSTEM_SECURITY": false,
"text": "RW"
},
"caching": {
"READ": false,
"WRITE": false,
"HANDLE": false,
"hex": "0x00000000",
"text": ""
},
"oplock": {},
"lease": {},
"opened_at": "2022-04-15T17:30:38+0200"
}
}
}
}
}
if oplocks are used, you get this instead of the empty "oplock": {}:
"oplock": {
"EXCLUSIVE": false,
"BATCH": false,
"LEVEL_II": true,
"LEASE": false,
"text": "LEVEL_II"
}
if leases are used, same deal:
"lease": {
"lease_key": "29316055-f55c-de10-c813-af7bf5a430bb",
"hex": "0x00000005",
"READ": true,
"WRITE": true,
"HANDLE": false,
"text": "RW"
}
with byte-range locks (-B, --byterange) it's giving:
"byte_range_locks": {
"/home/johndoe/testfolder/sample": {
"fileid": {
"devid": 59,
"inode": 11404245,
"extid": 0
},
"file_name": "sample",
"share_path": "/home/johndoe/testfolder",
"locks": [
{
"server_id": {
"pid": "69650",
"task_id": "0",
"vnn": "4294967295",
"unique_id": "10756714984493602300"
},
"type": "R",
"flavour": "Posix",
"start": 0,
"size": 16
}
]
}
with notifies (-N, --notify) you get:
"notify": {
"77247": {
"server_id": {
"pid": "69650",
"task_id": "0",
"vnn": "4294967295",
"unique_id": "10756714984493602300"
},
"path": "/home/johndoe/testfolder/testdir",
"filter": 4095,
"subdir_filter": 4095,
"creation_time": "1970-01-01T01:00:14.326582+01:00"
}
}
and for profiling (-P, --profile) the floor is yours:
{
"timestamp": "2022-04-15T18:40:43.112216+0200",
"version": "4.17.0pre1-GIT-a0f12b9c80b",
"smb_conf": "/opt/samba/etc/smb.conf",
"SMBD loop": {
"connect": {
"count": 2
},
"disconnect": {
"count": 1
},
...
},
"System Calls": {
"syscall_opendir": {
"count": 0,
"time": 0
},
...
},
"ACL Calls": {
"get_nt_acl": {
"count": 0,
"time": 0
},
...
},
"Stat Cache": {
"statcache_lookups": {
"count": 2
},
...
},
"SMB Calls": {
"SMBmkdir": {
"count": 0,
"time": 0
},
...
},
"Trans2 Calls": {
"Trans2_open": {
"count": 0,
"time": 0
},
...
},
"NT Transact Calls": {
"NT_transact_create": {
"count": 0,
"time": 0
},
...
},
"SMB2 Calls": {
"smb2_negprot": {
"count": 2,
"time": 3060,
"idle": 0,
"inbytes": 452,
"outbytes": 568
},
...
}
}
-?,--helpβ prints a summary of the command line options. your girl is always here to explain herself. π«Ά--usageβ displays a brief usage message. tiny little reminder of how to hold her. π-d,--debuglevel=levelβ level is an integer from 0 to 10. the default value if this parameter is not specified is 1 for client applications.
the higher this value, the more detail gets logged to the log files about what the server is doing. at level 0, only critical errors and serious warnings get logged. level 1 is a reasonable level for day-to-day running β it generates a small amount of information about operations carried out.
Quick vibe check before we go on: levels above 1 are gonna generate considerable amounts of log data, so bestie, only reach for those when you're actually investigating a problem, okay? And levels above 3? Those are designed for use only by developers and they generate HUGE amounts of log data, most of which is extremely cryptic. You have been warned. π
Also note: if you specify this parameter here, it will override thelog levelparameter in the/etc/samba/smb.conffile. Command line said it first, so command line wins. Periodt.
--debug-stdoutβ this redirects debug output to STDOUT. By default all clients are logging to STDERR. So if you're like "where r my logs bestie", they're on STDERR unless you say otherwise. π«Ά--configfile=<configuration file>β the file you name here contains the configuration details required by the client. The info in this file can be general for both client and server, or it can be client-specific only β stuff like options such asclient smb encrypt. Check out/etc/samba/smb.conffor more deets. The default configuration file name is determined at compile time, so it's giving "it depends on your build" energy. β¨--option=<name>=<value>β sets thesmb.conf(5)option<name>to value<value>straight from the command line. This overrides compiled-in defaults and options read from the configuration file. And if a name or a value includes a space? Wrap the whole--option=name=valueinto quotes. No cap. π-l|--log-basename=logdirectoryβ base directory name for log/debug files. The extension.prognamegets appended (e.g.log.smbclient,log.smbd, etc...). And heads up: the log file is never removed by the client. She's a keeper, she stays. π--leak-reportβ enable talloc leak reporting on exit. Catch those leaks on the way out the door. π--leak-report-fullβ enable full talloc leak reporting on exit. The deluxe version, the director's cut. π-V|--versionβ prints the program version number. Iconic, brief, flawless. β
π VERSION π
Ok so this man page is part of version 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1 of the Samba suite. It's giving very specific and we love her for it.
π SEE ALSO π
Go read those too bestie, they're literally right there. π¦
π AUTHOR π
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. Community-built, community-loved, main character energy fr fr. πΈ
And that's a wrap on SMBSTATUS(1)! This page ships as part of Samba 4.24.7-Ubuntu-4.24.7+dfsg-1ubuntu1, dated 09/13/2026 β so if you're reading this way later, maybe go check for a fresh version. Now go forth and slay those SMB statuses, bestie. π«Άβ¨π
π¦ where this page comes from
- ubuntu stonking: samba 2:4.24.7+dfsg-1ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms