google_osconfig在Google Cloud Platform上的VM的CPU使用率稳步上升 [英] google_osconfig's CPU usage of VM on Google Cloud Platform increases steadily
问题描述
我曾经使用过谷歌云平台来为客户提供服务.几天前,我发现虚拟机的CPU使用率持续增长的问题.为了揭示此问题的原因,我制作了空的(或新的)VM来观察它们的状态,并且这些新的VM还在不断增加其CPU使用率.
I have been used google cloud platform to offer the services to clients. A few days ago, I found the problem that the CPU usage of VM keeps increasing continuously. For uncovering the reason of this problem, I made the empty(or new) VMs to watch their status, and these new VMs also keeps increasing their CPU usages.
我用"top"表示命令知道哪个进程占用了CPU资源,结果令我震惊." google_osconfig"一直在消耗CPU资源,而且它的饮食越来越像猪.
I used "top" command to know which process takes CPU resources, and the result makes me shocked. "google_osconfig" keeps consuming CPU resources, and it is eating more and more like pigs.
什么是"google_osconfig",并且有人知道可以解决此问题吗?
what is "google_osconfig", and is there anyone who know to solve this problem?
我重新启动了google-osconfig-agent以使其释放CPU使用率.使用"service google-osconfig-agent restart"后,CPU使用率降低了.
I restarted google-osconfig-agent to make it release its CPU usage. After using "service google-osconfig-agent restart", the CPU usage decreased.
推荐答案
google_osconfig
它是VM Manager的一部分,该定义位于
google_osconfig
It is part of the VM Manager, this definition is in the documentation
VM Manager是一套工具,可用于管理在Compute Engine上运行Windows和Linux的大型虚拟机(VM)舰队的操作系统.
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套件的一部分:
The following services are available as part of the VM Manager suite:
- 操作系统库存管理:
osinventory
- 操作系统补丁管理:
任务
- 操作系统配置管理:
guestpolicies
默认情况下,OS Config代理安装在构建日期为v20200114或更高版本的Red Hat Enterprise Linux(RHEL),Debian,CentOS和Windows映像上.
The OS Config agent is installed by default on Red Hat Enterprise Linux (RHEL), Debian, CentOS, and Windows images that have a build date of v20200114 or later.
您可以使用以下命令检查此服务的状态:
You could check the status of this service with the following command:
sudo systemctl status google-osconfig-agent
如果某个子进程启动了CPU消耗问题,那么您进行的重新启动将解决该问题.
If it was a problem with some subprocess that started the CPU consumptions the restart you made will fix it.
但是服务可能有问题,也许您使用的版本有问题,您可以考虑更新OS Config代理.
But it might a problem with the service, maybe the version you are using has a problem, you could consider updating the OS Config agent.
要在CentOS和RHEL操作系统上更新代理,请运行以下命令:
To update the agent on CentOS and RHEL operating systems, run the following command:
sudo yum update google-osconfig-agent
要在Debian和Ubuntu操作系统上更新代理,请运行以下命令:
To update the agent on Debian and Ubuntu operating systems, run the following commands:
sudo apt update
sudo apt install google-osconfig-agent
sudo service google-osconfig-agent restart
这篇关于google_osconfig在Google Cloud Platform上的VM的CPU使用率稳步上升的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!