Logging
Fusion File Share Server generates logs that allow you to monitor the server's activity and troubleshoot issues. This section describes the configuration and management of the Fusion File Share Server logs.
Log Destination
Fusion File Share Server can write logs to one of the following destinations:
- Console (stdout and stderr):
This option is commonly used when preparing a Fusion File Share Server deployment and initially testing the configuration. - System log (syslog):
This option is commonly used when the Fusion File Share Server server is part of a larger system that includes other components that generate system logs, and there are mechanisms in place to collect and process those logs. - A file:
This option is commonly used when you want to have a dedicated log file for Fusion File Share Server.
- Configuration file's
[global]
section:log_destination
tsmb-cfg global update
:--log-destination
tsmb-cfg global add
andtsmb-cfg global del
: Not supported
Value type: string
Value format: <destination>
Where <destination>
can be one of the following:
console
: Logs are written to the standard output and standard error.syslog
: Logs are written to the system log (syslog).file
: Logs are written to a file.
Default value: console
Log Parameters
Each log line consists of a metadata section and the log content. The log metadata may include the following fields:
- Timestamp in the ISO 8601 format.
- The ID of the thread that generated the log message.
- The log level.
- The name of the module (topic) that generated the log message. These include:
audit
: Audit serviceauthn
: Authenticationauthz
: Authorizationcli
: Related command line interface toolscluster_heartbeat
: RTT handling in clustercompression
: SMB compressionconn_db
: DB for connectionscore
: Core threadext_db
: External database interactionsfsa
: File System Algorithms (MS-FSA) layer, has the following sub-topics:fsa_cluster
: FSA threadfsa_db
: FSA open databasefsa_rstr
: Restore of FSA data functionality
idmap
: Idmapper table operationskeepalive
: Keepalive messages between internal threadsmetrics
: Metric collectors, has the following sub-topics:metrics_collector
: Metrics collectorsmetrics_orchestrator
: Metrics orchestrator service daemonmetrics_reader
: Metrics readers
notify
: Notification service daemon, has the following sub-topics:inotify
: File change notification based on inotifynotify_subscriber
: Notification subscriptionssmb_notify
: SMB change-notify events
open_db
: DB for persistent openspkt
: Special topic for logging high level network packetsposix
-acl: POSIX ACL backendprocess
: External process and libraries handlingproto
: SMB protocol processingquota
: VFS quota controlraw
: Special topic for logging raw network packetsrdma
: RDMA related operationsrestore
: SMB Open restore functionalityrpc
: RPC processingsmb_replay
: SMB2 replay tablesrv
: Server thread, has the following sub-topics:srv_app
: IPC$ share operations
sys
: Generic operating system interactionstransport
: Transport (network) threadvfs
: VFS (file system) operations, has the following sub-topics:vfs_module
: External modules for VFSvfs_xattr
: Xattr handling in VFS
You can further configure the log metadata and content format, and the log file path by specifying the following parameters:
- Configuration file's
[global]
section:log_params
tsmb-cfg global update
:--log-params
tsmb-cfg global add
andtsmb-cfg global del
: Not supported
Value type: string
Value format: [path=<path>][,long][,timestamp][,time_usec=<true|false>][,tid][,trace][,sensitive_data=<sensitive_data>]
Where <parameter>
can be one of the following:
path=<path>
: (required) if thelog_destination
parameter is set tofile
. The path to the log file.long
: (optional) Disables truncation of log messages, allowing the entire message to be printed. By default, log messages are truncated:- 'Log-metadata' is truncated to a maximum of 80 characters.
- 'Log-content' is truncated to a maximum of 256 characters, plus any bytes unused by the 'log-metadata' component.
- The total message is limited to 337 bytes (80 + 256 + 1 newline character). Enabling this option prints the full log message, which may improve debugging but can incur a performance penalty.
timestamp
: (optional) Includes timestamps in the ISO 8601 format format in the log messages (YYYY-MM-DD HH:MM:SS[.uuuuuu]
).time_usec=<true|false>
: (optional) Includes microsecond resolution timestamps in the log messages. Enabled by default whentimestamp
is enabled.tid
: (optional) Includes thread identifiers in the log messages.trace
: (optional) Includes trace identifiers in the log messages, specifically the function name and a line number.sensitive_data=<sensitive_data>
: (optional) How sensitive data should be handled in the log messages. Data deemed "sensitive" includes domain names, IP addresses, user names and IDs, and file paths. Possible values:allow
: All data appears as-is in the log messages.strip
: Sensitive data is stripped from the log messages, and instead appears as***
.hash
: Sensitive data is hashed in the log messages. This is useful in order to differentiate between different sensitive data (e.g., distinguishing one IP address from another), yet cannot be used to recover the original values. Default value:allow
.
Default value: none. None of the formatting options are enabled.
Log Level
In order to control the verbosity of the logs, and the minimum severity of the logged events, set the following parameter:
- Configuration file's
[global]
section:log_level
tsmb-cfg global update
:--log-level
tsmb-cfg global add
andtsmb-cfg global del
: Not supported
Value type: integer
Value format: <level>
Where <level>
can be one of the following:
0
: No logging1
: Critical2
: Error3
: Warning4
: Info5
: Debug10
to15
: Authentication events- User authentication failures
- User authorization failures
- Successful user logins
20
to25
: Network level events- Client handled SMB protocol errors
- Received SMB packets names
30
to35
: VFS operations- File and directory opening/closing
readdir
with dumped contents- File reads/writes
- Other operations
80
to89
: Raw network packet information- Raw network packets: complete TCP data stream dumped as is (can be used to reconstruct a packet capture)
- Packets after decryption
- Packets as seen on network
90
to100
: function traces
Default value: 4
Example Configuration
The following example configuration writes logs to a file, and includes detailed information in the logs, such as timestamps, thread identifiers, and trace information.
[global]
. . .
log_destination = file
log_level = 40
log_params = path=/var/log/tsmb.log,long,timestamp,time_usec=false,tid,trace,sensitive_data=strip
. . .
[/global]
This will produce logs similar to the following in the /var/log/tsmb.log
file:
2024-09-17 02:09:10 <124844> [INFO] process: tsmb-server version 3024.3.22.1.evaluation starting...
2024-09-17 02:09:10 <124844> [INFO] process: Waiting for METRICS to initialize ...
2024-09-17 02:09:10 <124844> [INFO] process: METRICS initialized.
2024-09-17 02:09:10 <124844> [INFO] process: Waiting for CORE to initialize ...
2024-09-17 02:09:10 <124844> [INFO] process: CORE initialized.
2024-09-17 02:09:10 <124844> [INFO] process: Waiting for AUTHD to initialize ...
2024-09-17 02:09:10 <124859> [12] idmap: loading userDB backends by list 'text'
2024-09-17 02:09:10 <124859> [12] idmap: initializing 'static' userDB backend
2024-09-17 02:09:10 <124859> [12] idmap: successfully initialized 'static' userDB backend
2024-09-17 02:09:10 <124859> [12] idmap: initializing 'text' userDB backend
2024-09-17 02:09:10 <124859> [INFO]: Using workgroup 'ACME'
. . .