mc admin profile

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 实用程序读取配置文件数据。

mc admin profile start

命令用来开始记录配置文件数据,语法如下:

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/

mc admin profile stop

命令用来停止并下载配置文件数据,语法如下:

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/
说说我的看法
全部评论(
没有评论
关于
本网站属于个人的非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,请来信告知:hxstrive@outlook.com
公众号