Skip to main content

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.
Global Parameter Configuring the Log Destination

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 service
    • authn: Authentication
    • authz: Authorization
    • cli: Related command line interface tools
    • cluster_heartbeat: RTT handling in cluster
    • compression: SMB compression
    • conn_db: DB for connections
    • core: Core thread
    • ext_db: External database interactions
    • fsa: File System Algorithms (MS-FSA) layer, has the following sub-topics:
      • fsa_cluster: FSA thread
      • fsa_db: FSA open database
      • fsa_rstr: Restore of FSA data functionality
    • idmap: Idmapper table operations
    • keepalive: Keepalive messages between internal threads
    • metrics: Metric collectors, has the following sub-topics:
      • metrics_collector: Metrics collectors
      • metrics_orchestrator: Metrics orchestrator service daemon
      • metrics_reader: Metrics readers
    • notify: Notification service daemon, has the following sub-topics:
      • inotify: File change notification based on inotify
      • notify_subscriber: Notification subscriptions
      • smb_notify: SMB change-notify events
    • open_db: DB for persistent opens
    • pkt: Special topic for logging high level network packets
    • posix-acl: POSIX ACL backend
    • process: External process and libraries handling
    • proto: SMB protocol processing
    • quota: VFS quota control
    • raw: Special topic for logging raw network packets
    • rdma: RDMA related operations
    • restore: SMB Open restore functionality
    • rpc: RPC processing
    • smb_replay: SMB2 replay table
    • srv: Server thread, has the following sub-topics:
      • srv_app: IPC$ share operations
    • sys: Generic operating system interactions
    • transport: Transport (network) thread
    • vfs: VFS (file system) operations, has the following sub-topics:
      • vfs_module: External modules for VFS
      • vfs_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:

Global Parameter Configuring the Log Parameters

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 the log_destination parameter is set to file. 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 when timestamp 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:

Global Parameter Configuring the Log Level

Value type: integer

Value format: <level>
Where <level> can be one of the following:

  • 0: No logging
  • 1: Critical
  • 2: Error
  • 3: Warning
  • 4: Info
  • 5: Debug
  • 10 to 15: Authentication events
    • User authentication failures
    • User authorization failures
    • Successful user logins
  • 20 to 25: Network level events
    • Client handled SMB protocol errors
    • Received SMB packets names
  • 30 to 35: VFS operations
    • File and directory opening/closing
    • readdir with dumped contents
    • File reads/writes
    • Other operations
  • 80 to 89: 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 to 100: 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'
. . .