云数据库 GAUSSDB-统计信息函数:gs_perf_start_detail(duration integer[, freq integer])

时间:2025-10-17 14:34:22

gs_perf_start_detail(duration integer[, freq integer])

描述:采集当前节点所在机器上所有cpu核心所有线程中on-cpu/off-cpu堆栈的调用栈详细信息,函数返回多核多线程原始数据压缩文件地址。每次运行该命令时,都会删除历史采集的多核多线程数据。查询该函数需要有SYSADMIN权限或者MONADMIN权限。

参数说明如下:

参数名称

描述

类型

范围

duration

采集堆栈时长(单位为毫秒,如果输入浮点型,会对浮点型小数点后第一位进行四舍五入后取整处理)。

integer

50~3000

freq

采集堆栈频率(可选参数,单位为HZ,默认为100,如果输入浮点型,会对浮点型小数点后第一位进行四舍五入后取整处理)。

integer

10~1000

返回值类型:text

示例:

采集2000ms的多核多线程火焰图数据。
1
2
3
4
5
6
7
8
9
gaussdb=# SELECT gs_perf_start_detail(2000);
                                       gs_perf_start_detail                                        
---------------------------------------------------------------------------------------------------
 Successfully collected perf detail data, the result filepath is :                                +
 $GAUSS LOG /gs_flamegraph/dn_6001/detail-2025-03-03_100929.lz4                                     +
 Please save the file locally, otherwise the file will be deleted during the next data collection.+
 Record 1965659 samples.                                                                          +

(1 row)
support.huaweicloud.com/centralized-devg-v8-gaussdb/gaussdb-42-2062.html
推荐文章