首页 > 其他分享 >第四十八章 使用 ^SystemPerformance 监视性能 - 生成配置文件

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

时间:2023-01-18 07:44:05浏览次数:40  
标签:set 配置文件 300 间隔 SystemPerformance rc 第四十八章

第四十八章 使用 ^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

标签:set,配置文件,300,间隔,SystemPerformance,rc,第四十八章
From: https://www.cnblogs.com/yaoxin521123/p/17059088.html

相关文章

  • JavaWeb项目中web.xml配置文件<servlet-class>…</servlet-class>中的路径出现问题以及服
    问题如图 原因:1.改变了WEB-INF文件夹下lib文件夹下servlet-api.jar的路径2.缺失lib文件夹下的servlet-api.jar,没有添加到库中解决办法:不要改动lib文件的路......
  • Spring Boot 配置文件
    SpringBoot配置文件SpringBoot官方提供了两种常用的配置文件格式,分别是properties、yml格式。相比于properties来说,yml更加年轻,层级也是更加分明。properties和yml......
  • nginx 配置文件解析
    #usernobody;#工作进程数,一般设置为cpu核心数worker_processes4;worker_rlimit_nofile65535;#error_loglogs/error.log;#error_loglogs/error.lognotice......
  • MyRadio_1.0.90\assets的JSON配置文件。
    [{"stationuuid":"9616a843-0601-11e8-ae97-52543be04c82","name":"NHKFM","url":"https://nhkradioakfm-i.akamaihd.net/hls/live/512290/1-fm/1-f......
  • uni-app 加入打包后可修改的配置文件config.js
    在static目录下新建一个 config.js配置文件  在config.js文件中写入config={//webSocketUrlwebSocketUrl:"ws://192.168.1.5:5011/chat/",......
  • springboot之json/yml配置文件的读取
    配置文件读取项目根目录的config目录下person.yml,文件夹如下person:name:qinjiangage:3happy:falsebirth:2000/01/01maps:{k1:v1,k2:v2}lis......
  • Net 6 控制台配置文件读取
    原文网址:https://blog.csdn.net/shuikanshui/article/details/122809945一、使用App.Config作为配置文件1、项目增加应用程序配置文件App.config2、文件设置为“如果较......
  • [VueJsDev] 快速入门 - vue项目根目录配置文件
    vue项目根目录配置文件:::details目录目录​vue项目根目录配置文件​​​Part.1:package.json-入口文件​​​​Part.2:jsconfig.json-舒适度文件​​​​Part.3......
  • Spring获取配置文件常量
    1.配置文件#policyFilepolicyFile.es.host=1.1.1.1policyFile.es.port=9200policyFile.es.hostname=xxxxpolicyFile.es.password=1234562.常量实体类importorg.springfra......
  • nginx.conf配置文件
    userwwwwww;worker_processesauto;#cat/proc/cpuinfo|grep^processor|wc-l#查看cpu核数worker_cpu_affinityauto;error_log/www/wwwlogs/nginx_error......