Replies: 1 comment
-
repeat with #3049 , hi, Can use cmd script commands to achieve the collection metrics of powershell? It is recommended to replace it with cmd or remove the corresponding collection of powershell first. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我现在遇到了一个问题,在使用HertzBeat的采集器时,发现每执行一条PowerShell命令就会占用大约5%的CPU,执行两条的话就会占用10%左右。进一步观察发现,频繁地创建和销毁PowerShell进程会导致CPU占用率居高不下。这个问题看起来挺严重的,特别是在配置较低的服务器且长期监控的情况下。
每次执行命令都需要启动一个新的PowerShell进程,而这个进程的启动和销毁过程本身就比较耗资源。或者,可能是命令本身的执行效率不高,导致每次运行时需要更多的资源。接下来,考虑如何优化这个过程?
此外,考虑使用其他更轻量的监控工具或者脚本语言,可能会比PowerShell更高效。
Beta Was this translation helpful? Give feedback.
All reactions