第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件

简介: 第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件

第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件

生成配置文件

可以使用以下 API 命令快速生成新的配置文件(具有有意义的名称和描述):

set rc=$$genprofile^SystemPerformance("duration"[,interval])
  • duration - 配置文件应运行多长时间。有效格式为“hh:mm”、“hh:”或 mm
  • interval (optional) - 运行每个样本的频率,以秒为单位(在 1 秒到 300 秒的范围内)。仅当配置文件持续时间为一小时或更短时,才允许 1 秒的间隔。

如果成功,该函数返回 1。如果不成功,它返回一个 0 后跟一个 carat 和任何错误的原因。

注意:最长持续时间为 24 小时(86400 秒);如果指定更长的持续时间,^SystemPerformance 会将其减少到 24 小时。仅当持续时间包含冒号 (:) 时,才必须用双引号引起来;冒号表示小时。

最小间隔(如果指定)为 2 秒,除非持续时间(即间隔 * 计数)小于一小时,在这种情况下最小间隔为 1 秒。如果指定无效间隔,^SystemPerformance 会将其增加到所需的最小值。如果未指定间隔,则默认为 10 秒。

例如,要生成一个名为 12hours(具有生成的配置文件名称和描述)的配置文件,该配置文件在 12 小时内每 5 分钟(300 秒)运行一次样本,请输入以下内容:

set rc=$$genprofile^SystemPerformance("12:",300)

此外,要生成一个名为 90mins 的配置文件,该配置文件每 10 秒运行一次样本,持续 90 分钟,请输入以下内容:

set rc=$$genprofile^SystemPerformance(90)

下次运行 ^SystemPerformance 实用程序时,配置文件列表包括以下配置文件名称和说明:

12hours     A 12 hour run sampling every 300 seconds
90mins      A 90 minute run sampling every 10 seconds

编辑配置文件

可以使用以下 API 命令编辑现有配置文件(预定义的“测试”配置文件除外):

set rc=$$editprofile^SystemPerformance("profilename","description",[interval],[count])
  • profilename - 要编辑的现有配置文件的名称。
  • description - ^SystemPerformance 菜单中显示的配置文件的说明。
  • interval (optional) - 运行每个样本的频率,以秒为单位(在 1 秒到 300 秒的范围内)。仅当配置文件持续时间为一小时或更短时,才允许 1 秒的间隔。
  • count (optional) - 运行配置文件的次数。

如果成功,该函数返回 1,如果不成功,则返回 0。紧随其后的是克拉,然后是任何错误的原因。

注意:参数是位置的;例如,如果要编辑计数参数(并保留间隔参数中指定的值),则必须包括逗号分隔符,如下所示: set rc=$$editprofile^SystemPerformance("2minrun","A 5-minute run sampling every 30 seconds",,50)


如果持续时间超过 24 小时(86400 秒),它会自动减少到 24 小时。

例如,要修改 2minrun 配置文件以每 30 秒运行一次采样,直到运行 10 次采样(总共 300 秒或五分钟),请输入以下内容:

set rc=$$editprofile^SystemPerformance("2minrun","A 5-minute run sampling every 30 seconds",30,10)

下次运行 ^SystemPerformance 实用程序时,配置文件列表包括以下配置文件名称和说明:

2minrun     A 5-minute run sampling every 30 seconds

相关文章
|
30天前
|
缓存 监控
第四十三章 使用^TRACE跟踪进程性能
第四十三章 使用^TRACE跟踪进程性能
26 0
|
30天前
|
API
第四十七章 使用 ^SystemPerformance 监视性能 - 自定义 ^SystemPerformance 实用程序
第四十七章 使用 ^SystemPerformance 监视性能 - 自定义 ^SystemPerformance 实用程序
23 0
|
30天前
|
API
第四十九章 使用 ^SystemPerformance 监视性能 - 复制配置文件
第四十九章 使用 ^SystemPerformance 监视性能 - 复制配置文件
25 0
|
30天前
第四十六章 使用 ^SystemPerformance 监视性能 - 生成 ^SystemPerformance 性能报告
第四十六章 使用 ^SystemPerformance 监视性能 - 生成 ^SystemPerformance 性能报告
19 0
|
30天前
第四十五章 使用 ^SystemPerformance 监视性能 - Abort ^SystemPerformance
第四十五章 使用 ^SystemPerformance 监视性能 - Abort ^SystemPerformance
24 0
|
30天前
|
监控 程序员
第三十六章 使用 ^PROFILE 监控例程性能 - Using ^PROFILE
第三十六章 使用 ^PROFILE 监控例程性能 - Using ^PROFILE
21 0
|
30天前
|
监控
第三十七章 使用 ^PROFILE 监控例程性能 - ^PROFILE 示例
第三十七章 使用 ^PROFILE 监控例程性能 - ^PROFILE 示例
25 0
|
30天前
|
消息中间件 Linux 数据库
第五十三章 使用 ^SystemPerformance 监视性能 - InterSystems IRIS Linux 平台性能数据报告
第五十三章 使用 ^SystemPerformance 监视性能 - InterSystems IRIS Linux 平台性能数据报告
26 0
|
30天前
|
监控 数据库
第三十四章 使用 ^PERFMON 监控系统性能 - Start
第三十四章 使用 ^PERFMON 监控系统性能 - Start
22 0
|
7月前
|
安全 网络安全 开发工具
如何修改/etc/security/limits.conf 一个进程能打开的最大文件数 1024 为 自己期望的数字
如何修改/etc/security/limits.conf 一个进程能打开的最大文件数 1024 为 自己期望的数字