AIX Process
AIX Process 采集器通过 ps 采集进程对象,按 DataKit host_processes 对象格式上报。
配置¶
[collectors.process]
# 是否启用进程对象采集器。
enabled = true
# 采集间隔。
interval = "300s"
# 忽略运行时间小于该值的短生命周期进程。
min_run_time = "10m"
min_run_time 用于过滤运行时间过短的进程。如果 ps 输出无法提供运行时长,且配置了 min_run_time,本轮采集会报错并不上报,避免短进程导致对象数据量过大。
命令依赖¶
| 命令 | 说明 |
|---|---|
ps -eo user,pid,ppid,pcpu,pmem,etime,time,state,args |
采集用户、PID、父 PID、CPU、内存、运行时长、CPU 时间、状态和命令行。 |
对象¶
host_processes¶
| Tags & Fields | Description |
|---|---|
| name ( tag) |
进程对象唯一名,格式为 <host>_<pid>。 |
| process_name ( tag) |
进程短名,由命令行第一个字段提取。 |
| state ( tag) |
进程状态首字母。 |
| username ( tag) |
进程用户。 |
| host ( tag) |
主机名。 |
| pid | 进程 PID。 Type: int |
| ppid | 父进程 PID。 Type: int |
| cmdline | 完整命令行。 Type: string |
| cpu_usage | ps 当前 CPU 使用率。Type: float Unit: percent |
| cpu_usage_top | 基于 CPU time delta 计算的 top 风格 CPU 使用率;首轮回退为 cpu_usage。Type: float Unit: percent |
| mem_used_percent | 进程内存使用率。 Type: float Unit: percent |
| started_duration | 进程已运行秒数。 Type: int Unit: time,s |
| start_time | 进程启动时间,Unix 毫秒。 Type: int Unit: time,ms |
| state_zombie | 是否僵尸进程。 Type: bool |
| message | 对象详情 JSON。 Type: string |