Troubleshooting

In N2OS v25.6.0, and later, you can use command-line interface (CLI) commands to print the contents, statistics, and configuration parameters of the commit logs. This information helps monitor synchronization status and diagnose potential issues. Outputs are provided in JavaScript Object Notation (JSON) format for easier parsing and analysis.

Print the contents of the commit log

Product CMC, Guardian
Syntax ids commit_log_entries [{"limit": <number>}]
Output

Prints, in JavaScript Object Notation (JSON) format, the current contents of the commit log. Each commit description has the following layout:

  • operation: is the name of the committed operation:
    • NOP: no operation, used internally for commit log maintenance operations
    • CREATE: create a node
    • SET_SUBNET: set the subnet of a node
    • SET_BROADCAST_IP: set the broadcast internet protocol (IP) address of a node
    • RENAME: rename a node
    • REMOVE: remove a node
  • cid: also known as commit ID, is an integer value uniquely identifying a commit
  • timestamp: date and time, in ISO-8601 format, at which the operation was committed
  • diff: changes from the previous commit. It provides three fields: added, updated, and removed. They describe nodes that were respectively added, updated, or removed. The field uid (unique ID) is always part of the node description. The fields id (node ID) and subnet are also present in this description if the corresponding information is available
Parameters {"limit": <number>} where limit is an integer value specifying the number of most recent commits to display.
Where CLI

Print commit log statistics

Product CMC, Guardian
Syntax ids commit_log_stats
Output

Prints, in JSON format, a list of counter names and their corresponding values. These counters help understand if the parameters governing the behavior of the commit log are correctly tuned:

  • commit_log_size: is the current number of entries in the commit log
  • commit_log_changes: keeps track of the total number of commits and node snapshots. This quantity is used by the garbage collector to control the growth of the commit log
  • commit_log_stale_entries: keeps track of the number of commits that have not been processed by any synchronization context after a timeout expired
  • commit_log_compactions_since_1h: is the number of compactions that were performed by the garbage collector during the last hour
  • commit_log_prunings_since_1h: is the number of pruning operations that were performed during the last hour. A pruning operation occurs when attempting to add a snapshot to a node that has already reached its maximum allowed number of snapshots
Parameters None
Where CLI

Print the current values of the commit log configuration parameters

Product CMC, Guardian
Syntax ids commit_log_configuration
Output

Prints, in JSON format, the current value of each commit log configuration parameter:

  • enable_consistent_synchronization: is set to true if synchronization between Central Management Console (CMC)s and Guardians via the consume command is done consistently based on information from the commit log. If it is set to false, synchronization leverages information from the nodes of the system, which is the default behavior for all releases prior to Nozomi Networks Operating System (N2OS) v25.6.0. From N2OS v25.6.0 onwards, this parameter is set to true by default
  • commit_log_max_append_tries: specifies the maximum number of attempts that should be performed to append a entry to the commit log
  • max_snapshots_per_node: is the maximum allowed number of snapshots, for example, versioned data instances, per node
  • max_changes_to_nodes_ratio: is the maximum allowed ratio of commits and nodes snapshots to nodes. This parameter is used by the garbage collector to decide whether or not to compact the commit log
  • commit_log_sync_timeout: is the amount of time, expressed in minutes, after which a commit never accessed by synchronization since it was appended becomes a candidate for eviction by the garbage collector
Parameters None
Where CLI