mc admin profile 命令生成用于调试的分析数据。语法如下:
C:\>mc admin profile -h NAME: mc admin profile - generate profile data for debugging purposes USAGE: mc admin profile COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: start start recording profile data stop stop and download profile data FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
mc admin profile 生成一个 ZIP 存档 profile.zip,其中包含一个或多个 .pprof 文件。使用 pprof go 实用程序读取配置文件数据。
命令用来开始记录配置文件数据,语法如下:
C:\>mc admin profile start -h NAME: mc admin profile start - start recording profile data USAGE: mc admin profile start [FLAGS] TARGET FLAGS: --type value start profiler type, possible values are 'cpu', 'mem', 'block', 'mutex', 'trace', 'threads' and 'goroutines' (default: "cpu,mem,block,goroutines") --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)仅启动 CPU 分析
C:\> mc admin profile start --type cpu myminio/
(2)同时启动 CPU、内存和块分析
C:\> mc admin profile start --type cpu,mem,block myminio/
命令用来停止并下载配置文件数据,语法如下:
C:\>mc admin profile stop -h NAME: mc admin profile stop - stop and download profile data USAGE: mc admin profile stop [FLAGS] TARGET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
(1)下载当前目录中的最新配置文件数据
C:\> mc admin profile stop myminio/