Skip to main content
This document provides an overview of all available snctl commands, global options, and subcommands for managing SambaRack systems.

Command structure

The basic command structure is:
snctl [GLOBAL_OPTIONS] <SUBCOMMAND> [SUBCOMMAND_OPTIONS] [ARGUMENTS]

Global options

Global options can be used with any snctl command.

—log-level

Set the logging level for the current command execution.
ValueDescription
DEBUGDetailed debugging information
INFOGeneral information (default)
WARNINGWarning messages only
ERRORError messages only
CRITICALCritical errors only
Example:
snctl --log-level DEBUG node list

—snctl-dir

Override the base directory for configuration and logs. Default is ~/.snctl. Example:
snctl --snctl-dir /custom/path/.snctl node list

—version, -v

Display the CLI version and exit. Example:
snctl --version

Subcommands

config

Manage SambaRack Manager configuration.
CommandDescription
snctl config initInteractive wizard for initial setup
snctl config showDisplay current configuration
config init The config init command provides an interactive wizard to:
  • Set folder location for configuration files (default: ~/.snctl)
  • Generate a new encryption key
  • Create an empty inventory file
  • Set service account for GCS access (optional)
  • Configure logs directory (optional)
This command requires an empty directory. If configuration files already exist in the target directory, initialization aborts.
config show Displays the current configuration information. Example output:
                       Current Configuration
+---------------------+-------------------------------------------+
| Setting             | Value                                     |
+---------------------+-------------------------------------------+
| Folder Location     | /home/user1/.snctl                        |
| Encryption Key File | /home/user1/.snctl/encryption.key         |
| Inventory File      | /home/user1/.snctl/inventory.json         |
| Service Account     | None                                      |
| Logs Location       | /home/user1/.snctl/logs                   |
| Version             | 1.0                                       |
| Last Updated        | 2025-12-08T11:19:27.403696Z               |
+---------------------+-------------------------------------------+
See Initial Setup for detailed instructions.

doctor

Check system dependencies and environment configuration to ensure your system is ready to use SambaRack Manager.
snctl doctor
This command checks for required system binaries and tools. Example output (all dependencies met):
                                         System Dependencies
+-------------------+---------+----------------------------+------------------------------------------------+
| Dependency        | Status  | Path/Details               | Description                                    |
+-------------------+---------+----------------------------+------------------------------------------------+
| ipmitool          | OK      | /usr/bin/ipmitool          | Required for BMC power operations              |
| ssh               | OK      | /usr/bin/ssh               | Required for remote connections                |
| sshpass           | OK      | /usr/bin/sshpass           | Required for password-based SSH authentication |
| ping              | OK      | /usr/bin/ping              | Required for connectivity checks               |
| curl              | OK      | /usr/bin/curl              | Required for HTTP requests                     |
| jq                | OK      | /usr/bin/jq                | Required for JSON processing                   |
| sed               | OK      | /usr/bin/sed               | Required for text processing                   |
| grep              | OK      | /usr/bin/grep              | Required for text filtering                    |
| awk               | OK      | /usr/bin/awk               | Required for text processing                   |
| bc                | OK      | /usr/bin/bc                | Required for floating point arithmetic         |
| screen            | OK      | /usr/bin/screen            | Required for background tasks                  |
| gptipmitool-linux | MISSING | Not found                  | Required for specific IPMI operations          |
| in.tftpd          | OK      | /usr/sbin/in.tftpd         | Required for TFTP services                     |
+-------------------+---------+----------------------------+------------------------------------------------+

Some dependencies are missing. Please install them and try again.

secret

Manage encrypted device credentials.
CommandDescription
snctl secret set --device-type <type>Set a secret for a device type
snctl secret get --device-type <type>Get a secret (masked by default)
snctl secret get --device-type <type> --show-valueGet a secret (unmasked)
See Device Credentials for detailed instructions.

rack

Manage racks and rack-level devices.
Rack IDs can range from 001 to 255.
CommandDescription
snctl rack add <rack_id> --type <partnumber>Add a new rack to inventory
snctl rack listList all configured racks
snctl rack show <rack_id>Show detailed rack information
snctl rack delete <rack_id>Delete a rack
snctl rack add-device <device_path>Add or update a device in a rack
snctl rack delete-device <target_id>Remove a device from a rack
See Rack Administration for detailed instructions.

node

Manage nodes and perform power operations.
Nodes are added automatically to SambaRack Manager when a rack is added. There is no command to add a node directly.
CommandDescription
snctl node listList all configured nodes
snctl node show <node_name>Show detailed node information
snctl node rename <old_name> <new_name>Rename a node
snctl node powerstate --node <node_id> --type <type>Check power state
snctl node poweron --node <node_id> --type <type>Power on nodes or devices
snctl node poweroff --node <node_id> --type <type>Power off nodes or devices
snctl node powercycle --node <node_id> --type nodePower cycle nodes
See Node Administration for detailed instructions.

group

Manage groups of racks for batch operations.
CommandDescription
snctl group create <name> --description <desc>Create a new group
snctl group listList all groups
snctl group show <name>Show group details
snctl group delete <name>Delete a group
snctl group add-rack <name> --rack-id <id>Add racks to a group
snctl group remove-rack <name> --rack-id <id>Remove racks from a group
Group names should be alphanumeric.
See Group Administration for detailed instructions.

device

Manage device firmware and perform device-level operations.
CommandDescription
snctl device firmware-check --rack-id <id> --type <type>Check firmware versions on a rack
snctl device firmware-check --group <name> --type <type>Check firmware versions on a group
See Device Administration for detailed instructions.

Getting help

To get help for any command or subcommand:
# Show top-level help
snctl --help

# Show subcommand help
snctl <subcommand> --help

# Show command-specific help
snctl <subcommand> <command> --help