bit-inspect

Inspects test plugins and displays metadata, configuration, and execution details.

Environment Variables (with defaults)

  • BIT_TEST_PATH - Directory containing test plugins (default: /usr/local/lib/bit_manager)
  • BIT_CONFIG_PATH - Directory containing configuration files (default: /etc/bit)

Usage

# List all tests
bit-inspect

# Get details about a specific test
bit-inspect <test-name>

Listing All Tests

$ bit-inspect

cbit_cpu_usage: CPU utilization monitoring: Monitor CPU usage over 5 samples stays below 29%
cbit_disk_usage: Disk health monitoring: Continuous disk health monitoring
cbit_ethernet: Ethernet Monitoring: CBIT: Monitoring 2 network interfaces every 30s
cbit_memory_usage: Memory utilization test: Continuously monitor memory usage
pbit_cpu_usage: CPU utilization test: Check CPU usage is below 31% threshold
pbit_disk_usage: PBIT Disk Health Test: Comprehensive disk health test
pbit_ethernet: Ethernet Interface Status: PBIT: Auditing 2 network interfaces
pbit_memory_usage: Memory integrity test: Test memory availability, usage
...

Output Format:

test_name: Short description: Detailed description

Inspecting Specific Tests

$ bit-inspect cbit_disk_usage

Details:
  Long-Name              Disk utilization test
  Author                 Ross Newman <ross.newman@astutesys.com>
  Description            Check the disk is not nearing full
  Status                 NotRun

Plugin Details:
  Plugin Name            cbit_disk_usage
  Version                1.0.0
  Date Built             2025-12-08 01:42:11
  Module                 /usr/local/lib/bit_manager/libcbit_disk_usage.so
  Config File            /etc/bit/cbit_disk_usage.toml
  Run Frequency          Periodic(30s)

Config Details:
  disk
    +----(0) disk: "/dev/sda1"
    +----(0) threshold: 80
    +----(1) disk: "/dev/shm"
    +----(1) threshold: 80

  cbit_disk_usage
    +---- enabled: true
    +---- frequency: 30

Information Sections:

  • Details: Long-Name, Author, Description, Status
  • Plugin Details: Plugin Name, Version, Date Built, Module path, Config File path, Run Frequency
  • Config Details: All configuration values loaded from TOML

Common Use Cases

Verify Test Installation

Check if all expected tests are available:

# Should show 52+ tests (21 PBIT + 21 CBIT + 9 FBIT + custom)
bit-inspect | wc -l

# Check specific test exists
bit-inspect | grep pbit_ethernet || echo "Test not found"

Check Configuration Values

Before running tests, verify configuration is correct:

# Check CPU threshold
bit-inspect pbit_cpu_usage | grep threshold

# Check disk thresholds
bit-inspect cbit_disk_usage | grep -A 10 "Config Details"

# Check network interfaces
bit-inspect pbit_ethernet | grep -A 20 "Config Details"

Debug Test Loading Issues

If a test won't load, inspect shows the error:

# Check module path
bit-inspect problematic_test | grep "Module:"

# Check config path
bit-inspect problematic_test | grep "Config File:"

# Verify files exist
ls -l /usr/local/lib/bit_manager/libtest_name.so
ls -l /etc/bit/test_name.toml

Check CBIT Frequencies

# List CBIT monitoring intervals
for test in $(bit-inspect | grep "^cbit_" | cut -d: -f1); do
    freq=$(bit-inspect "$test" | grep "Run Frequency" | awk '{print $3}')
    printf "%-30s %s\n" "$test" "$freq"
done

Troubleshooting

See Troubleshooting Guide for common issues with bit-inspect.

Next Steps