## procstat
tools to stat processes
Purpose: This software traces running status of application and reports any abnormal metrics. It continuously monitors key performance indicators, alerts users the potential issues.
### Copyright
Copyright (c) 2024 Liu Hua Jun
All rights reserved.
### Platform
Platform: Linux
Supported OS: CentOS Stream 8+、Redhat 8+、Fedora 36+.
Other OS will test later.
### Dependency
1. procstat depends on eBPF and CORE features.
2. libelf is need to run procstat.
3. procstat needs to access internet, it must get authorize from server before working.
4. readelf, cppfilt must be installed in your OS.
### Limitation
Before start this program, please set up below settings.
ulimit -n 65536
ulimit -s 16384
Note: Script start.sh will do it for you.
### Usage
Run "sh start.sh -h" to get the usage.
### Configurations:
1. block_stat
Block io latency stat.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) duration
>=0, if block io duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
Example:
"block_stat": {
"enable": true,
"duration": 1000000
}
2. vmscan_stat
Virtual memory exception stat.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) direct_reclaim_duration
>=0, if direct reclaim memory duration >= this value(nanosecond), will report it to log file.
-1, never report.
default value is 0.
(3) compact_duration
>=0, if direct compact memory duration >= this value(nanosecond), will report it to log file.
-1, never report.
default value is 0.
Example:
"vmscan_stat": {
"enable": true,
"direct_reclaim_duration": 1000,
"compact_duration": 100000
}
3. schedule_stat
OS schedule stat. Every 50ms, report off cpu statistics information to log file if exists off cpu events.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) offcpu_duration
>=0, if off cpu duration >= this value(nanosecond), will report details to log file, contains stacks.
-1, never report detail information, default value.
Example:
"schedule_stat": {
"enable": true,
"offcpu_duration": 1000
}
4. workqueue_stat
OS workqueue stat. Every 50ms, report workqueue statistics information to log file if exists workqueue events.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) duration
>=0, if workqueue duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
Example:
"workqueue_stat": {
"enable": true,
"duration": 1000000
}
5. profile_stat
Profile a program. Must use command line parameter -p or -t to specify a running process.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) frequency
>0, profile frequency, how many times to sample in 1 second.
-1, never sample.
Example:
"profile_stat": {
"enable": true,
"frequency": 1000
}
6. proc_info_stat
Proccess info from /proc/pid/stat. Every 50ms, stat user time, system time, memory used, and so on.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
Example:
"proc_info_stat": {
"enable": true
}
7. cputime_stat
Every 50ms, stat user cpu time and kernel cpu time.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
Example:
"cputime_stat": {
"enable": true
}
8. lock_stat
Stat lock info. Every 10s, stat deadlock informations and report to log file if exists.
Stat lock duration and wait log duration.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) lock_duration
>=0, if lock duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
(3) wait_lock_duration
>=0, if wait lock duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
Example:
"lock_stat": {
"enable": true,
"lock_duration": 1000000,
"wait_lock_duration": 1000000
}
9. stl_realloc_stat
Stat C++ STL realloc info.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) vector_realloc_duration
>=0, if std::vector realloc's duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
(3) unordered_map_realloc_duration
>=0, if std::unordered_map realloc's duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
(4) unordered_set_realloc_duration
>=0, if std::unordered_set realloc's duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
(5) vector_realloc_symbol
don't need to configure, procstat will configure it automatically.
(6) unordered_map_realloc_symbol
don't need to configure, procstat will configure it automatically.
(7) unordered_set_realloc_symbol
don't need to configure, procstat will configure it automatically.
Example:
"stl_realloc_stat": {
"enable": true,
"vector_realloc_symbol": "",
"vector_realloc_duration": 0,
"unordered_map_realloc_symbol": "",
"unordered_map_realloc_duration": 0,
"unordered_set_realloc_symbol": "",
"unordered_set_realloc_duration": 0,
"desc": "stl realloc stat"
}
10. gc_stat
Stat gc info for golang or jvm program.
Configuration items:
(1) enable
true, enable this stat, default value.
false, disable this stat.
(2) gc_duration
>=0, if gc duration >= this value(nanosecond), will report it to log file.
-1, never report, default value.
(3) jvm_path
jvm install path, such as /usr/local/jdk. If stats program which running on jvm, Option 1. Specify jvm path. Option 2. Remove this item, will use Linux environment variable "JAVA_HOME".
"", never report jvm gc info.
(4) jvm_gc_symbol
symbol, jvm gc symbol is in jvm. If stats program which running on jvm, Option 1. Specify jvm path. Option 2. Remove this item, will use default one.
"", never report jvm gc info.
Example:
"gc_stat": {
"enable": true,
"gc_duration": 0,
"jvm_path": "/usr/local/jdk"
}
procstat-0.0.9.20240911-beta-x64
需积分: 0 136 浏览量
更新于2024-09-11
收藏 17.07MB TGZ 举报
软件名称 : procstat
版本号 : 0.0.9.20240911_beta
功能: 此软件是一个性能追踪工具,基于ebpf技术实现,能够跟踪目标程序的运行状态,并报告异常指标,是分析程序性能的一大利器
运行平台:Linux
内核版本要支持ebpf、CORE
支持的操作系统:CentOS Stream 8+、Redhat 8+、Fedora 36+
其他操作系统,后续会进行测试。
依赖的库:libelf
changelog: 1. 支持监控gc
Copyright (c) 2024 Liu Hua Jun
All rights reserved.
自带授权码,一个月内有效。欢迎试用,并提出宝贵意见!
PerfMan
- 粉丝: 568
- 资源: 4
最新资源
- 5G SRM815模组原理框图.jpg
- T型3电平逆变器,lcl滤波器滤波器参数计算,半导体损耗计算,逆变电感参数设计损耗计算 mathcad格式输出,方便修改 同时支持plecs损耗仿真,基于plecs的闭环仿真,电压外环,电流内环
- 毒舌(解锁版).apk
- 显示HEX、S19、Bin、VBF等其他汽车制造商特定的文件格式
- 8bit逐次逼近型SAR ADC电路设计成品 入门时期的第三款sarADC,适合新手学习等 包括电路文件和详细设计文档 smic0.18工艺,单端结构,3.3V供电 整体采样率500k,可实现基
- 操作系统实验 ucorelab4内核线程管理
- 脉冲注入法,持续注入,启动低速运行过程中注入,电感法,ipd,力矩保持,无霍尔无感方案,媲美有霍尔效果 bldc控制器方案,无刷电机 提供源码,原理图
- Matlab Simulink#直驱永磁风电机组并网仿真模型 基于永磁直驱式风机并网仿真模型 采用背靠背双PWM变流器,先整流,再逆变 不仅实现电机侧的有功、无功功率的解耦控制和转速调节,而且能实
- 157389节奏盒子地狱模式第三阶段7.apk
- 操作系统实验ucore lab3