第四十七章 使用 ^SystemPerformance 监视性能 - 自定义 ^SystemPerformance 实用程序

简介: 第四十七章 使用 ^SystemPerformance 监视性能 - 自定义 ^SystemPerformance 实用程序

第四十七章 使用 ^SystemPerformance 监视性能 - 自定义 ^SystemPerformance 实用程序

本节介绍可以使用 API 完成的任务:

更改输出目录

日志文件和生成的 HTML 报告文件的默认输出目录是运行 ^SystemPerformance 实用程序的 IRIS 实例的安装install-dir\mgr。可以使用下表中描述的命令更改默认目录。

注意:这些命令不影响当前运行的配置文件,无论 HTML 报告文件是否已生成;也就是说,与当前运行的配置文件相关联的文件不会移动到新的输出目录。

  • do setlogdir^SystemPerformance("directory") - 将输出目录的路径名设置为目录;如果不存在,则创建它。

注意:如果没有指定绝对路径名(例如,C:\Reports),则假定该目录相对于 install-dir\mgr 目录。

  • set x = $$getlogdir^SystemPerformance() - 将变量 x 设置为等于输出目录路径名。
  • do clrlogdir^SystemPerformance() - 将输出目录路径名重置为默认目录 (install-dir\mgr)

获取版本信息

可以使用以下命令找到 ^SystemPerformance 实用程序的当前版本:

  • write $$version^SystemPerformance()
  • set ver=$$version^SystemPerformance()

操纵配置文件

可以使用以下部分中描述的 API 来操作配置文件定义。

Create New Profiles

可以使用以下 API 命令创建新的配置文件:

set rc=$$addprofile^SystemPerformance("profilename","description",interval,count)
  • profilename - 配置文件的名称,它必须是唯一的并且不能包含空格或空白字符。
  • description - 显示在 ^SystemPerformance 菜单中的配置文件的描述。
  • interval - 运行每个样本的频率,以秒为单位(在 1 秒到 300 秒的范围内)。仅当配置文件持续时间为一小时或更短时,才允许 1 秒的间隔。
  • count - 运行配置文件的次数。

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

例如,要创建一个名为 2minrun 的配置文件,它10 秒运行一次采样,直到运行 12 次采样(总共 120 秒或两分钟),请输入以下内容:

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

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

2minrun     A 2-minute run sampling every 10 seconds

相关文章
|
24天前
|
缓存 监控
第四十三章 使用^TRACE跟踪进程性能
第四十三章 使用^TRACE跟踪进程性能
24 0
|
24天前
|
API
第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件
第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件
20 0
|
1月前
|
存储 数据库
LabVIEW如何修复或重置NI MAX数据库文件
LabVIEW如何修复或重置NI MAX数据库文件
20 0
|
24天前
第四十六章 使用 ^SystemPerformance 监视性能 - 生成 ^SystemPerformance 性能报告
第四十六章 使用 ^SystemPerformance 监视性能 - 生成 ^SystemPerformance 性能报告
18 0
|
24天前
第四十五章 使用 ^SystemPerformance 监视性能 - Abort ^SystemPerformance
第四十五章 使用 ^SystemPerformance 监视性能 - Abort ^SystemPerformance
22 0
|
24天前
|
API
第四十九章 使用 ^SystemPerformance 监视性能 - 复制配置文件
第四十九章 使用 ^SystemPerformance 监视性能 - 复制配置文件
23 0
|
24天前
|
监控 程序员
第三十六章 使用 ^PROFILE 监控例程性能 - Using ^PROFILE
第三十六章 使用 ^PROFILE 监控例程性能 - Using ^PROFILE
20 0
|
24天前
|
监控
第三十七章 使用 ^PROFILE 监控例程性能 - ^PROFILE 示例
第三十七章 使用 ^PROFILE 监控例程性能 - ^PROFILE 示例
25 0
|
24天前
|
消息中间件 Linux 数据库
第五十三章 使用 ^SystemPerformance 监视性能 - InterSystems IRIS Linux 平台性能数据报告
第五十三章 使用 ^SystemPerformance 监视性能 - InterSystems IRIS Linux 平台性能数据报告
22 0
|
24天前
|
消息中间件 数据库 iOS开发
第五十一章 使用 ^SystemPerformance 监视性能 - Apple macOS 平台的 InterSystems IRIS 性能数据报告
第五十一章 使用 ^SystemPerformance 监视性能 - Apple macOS 平台的 InterSystems IRIS 性能数据报告
22 0

热门文章

最新文章