我一直在使用谷歌云平台为客户提供服务。前几天发现VM的CPU使用率不断增加的问题。为了找出这个问题的原因,我制作了空的(或新的)虚拟机来观察它们的状态,这些新的虚拟机也不断增加它们的 CPU 使用率。
我用“top”命令知道哪个进程占用CPU资源,结果让我震惊。 “google_osconfig”不断消耗CPU资源,吃得越来越像 pig 。
什么是“google_osconfig”,有没有人知道解决这个问题?
我重新启动了 google-osconfig-agent 以使其释放 CPU 使用率。使用“service google-osconfig-agent restart”后,CPU使用率下降。
最佳答案
google_osconfig
它是VM Manager的一部分,这个定义在documentation中
VM Manager is a suite of tools that can be used to manage operating systems for large virtual machine (VM) fleets running Windows and Linux on Compute Engine.
以下服务作为 VM Manager 套件的一部分提供:
osinventory
tasks
guestpolicies
OS Config 代理默认安装在构建日期为 v20200114 或更高版本的 Red Hat Enterprise Linux (RHEL)、Debian、CentOS 和 Windows 镜像上。
您可以使用以下命令检查此服务的状态:
sudo systemctl status google-osconfig-agent
如果某些启动 CPU 消耗的子进程有问题,您进行的重新启动将修复它。但是可能是服务有问题,可能是你使用的版本有问题,可以考虑updating the OS Config agent .
要在 CentOS 和 RHEL 操作系统上更新代理,请运行以下命令:
sudo yum update google-osconfig-agent
要在 Debian 和 Ubuntu 操作系统上更新代理,请运行以下命令:sudo apt update
sudo apt install google-osconfig-agent
sudo service google-osconfig-agent restart
关于google-cloud-platform - google_osconfig 在 Google Cloud Platform 上对 VM 的 CPU 使用率稳步上升,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64345022/