Home | My New Hugo Project

High cpu use Google cloud

2021-05-13

Run a top command

user@ iowa-1$ top
top - 14:18:43 up 160 days, 12:15,  1 user,  load average: 0.25, 0.23, 0.14
Tasks:  68 total,   1 running,  67 sleeping,   0 stopped,   0 zombie
%Cpu(s):  3.5 us,  4.6 sy,  0.0 ni, 91.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    583.3 total,     86.6 free,    191.5 used,    305.2 buff/cache
MiB Swap:   1024.0 total,    997.7 free,     26.2 used.    274.5 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 363 root 20 0 119740 19892 2896 S 10.7 3.3 13612:31 google_os+ 1 root 20 0 170544 6656 4216 S 0.0 1.1 3:54.77 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.18 kthreadd 3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp 4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp 6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0+ 8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu+ 9 root 20 0 0 0 0 S 0.0 0.0 0:40.55 ksoftirqd+ 10 root 20 0 0 0 0 I 0.0 0.0 0:35.94 rcu_sched 11 root 20 0 0 0 0 I 0.0 0.0 0:00.00 rcu_bh 12 root rt 0 0 0 0 S 0.0 0.0 0:17.08 migration+ 14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0 15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 16 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 netns 17 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kauditd 18 root 20 0 0 0 0 S 0.0 0.0 0:03.46 khungtaskd 19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper user@iowa-1$ ps -ef | grep google root 363 1 5 2020 ? 9-10:52:31 /usr/bin/google_osconfig_agent root 365 1 0 2020 ? 00:16:53 /usr/bin/google_guest_agent user 30646 29679 0 14:18 pts/1 00:00:00 grep google

If you see google_osconfig_agent - need to upgrade the agent

 

user@iowa-1$  sudo apt-get install google-osconfig-agent
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  google-osconfig-agent
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 10.8 MB of archives.
After this operation, 582 kB of additional disk space will be used.
Get:1 http://packages.cloud.google.com/apt google-compute-engine-buster-stable/m                                                                             ain amd64 google-osconfig-agent amd64 1:20210217.00-g1 [10.8 MB]
Fetched 10.8 MB in 1s (9434 kB/s)
(Reading database ... 53306 files and directories currently installed.)
Preparing to unpack .../google-osconfig-agent_1%3a20210217.00-g1_amd64.deb ...
Unpacking google-osconfig-agent (1:20210217.00-g1) over (1:20201109.00-g1) ...
Setting up google-osconfig-agent (1:20210217.00-g1) ...
user@iowa-1$  sudo service google-osconfig-agent restart

Hopefully cpu much better and Google will stop telling you need to upgrade.

This apparently is some issue that developed in December 2020