Skip to main content

module-sizes

Print sizes of each module in the database. This diagnostic tool provides detailed analysis of storage usage by different blockchain modules, helping operators understand disk usage patterns, optimize storage allocation, and plan capacity requirements.

Overview

The module-sizes command analyzes the node's database and reports the storage footprint of each application module. This information is crucial for performance monitoring, storage optimization, and identifying modules that consume the most disk space.

babylond module-sizes [path-to-db] [flags]

Prerequisites

Before using this command, ensure you have:

  • Node database access - The database should be accessible and not corrupted
  • Sufficient permissions - Read access to the database directory
  • Node stopped - For accurate analysis, stop the node before running (recommended)
  • Backup considerations - Ensure database integrity before analysis

Arguments

ArgumentDescription
path-to-dbPath to the database directory (optional - defaults to home/data)

Flags

Analysis Configuration

FlagTypeDefaultDescription
--print-intervalint100000Interval between printing database stats during analysis
-h, --helpHelp for module-sizes

Global Flags

FlagTypeDefaultDescription
--homestring~/.babylondDirectory for config and data
--log_formatstringplainThe logging format (json|plain)
--log_levelstringinfoThe logging level
--log_no_colorDisable colored logs
--tracePrint full stack trace on errors