[MCOL-1875] getsystemcpu & related commands always return 0 cpu usage Created: 2018-11-12  Updated: 2018-11-28  Resolved: 2018-11-28

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Type: Bug Priority: Minor
Reporter: Patrick LeBlanc (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos 7, DBS-like installation.



 Description   

It seems that OAM is parsing the wrong field somewhere when gathering CPU usage info. It affects the getsystemcpu command, and others that return overall CPU usage. Those commands always return 0% cpu usage even when I load them down with dummy processes (ex, some bash that does useless stuff in an infinite loop).

I suspect this is consistent across environments, but fwiw, the environment I found this in is a DBS-like installation. Centos 7 VMs. Originally installed 1.1.6 non-distributed and non-root. Then upgraded to 1.2.1 with non-root/non-sudo/non-distributed. 2 nodes, 1 um, and 1 pm.



 Comments   
Comment by David Hill (Inactive) [ 2018-11-16 ]

fixed with change in the serverMonitor. was not getting system cpu usage correctly

mcsadmin> getSystemResourceUsage
getsystemresourceusage Fri Nov 16 17:00:38 2018

System Resource Usage per Module

Module 'pm1' Resource Usage

CPU: 100% Usage
Mem: 1007532k total, 386248k used, 485004k cache, 38% Usage
Swap: 0 k total, 0k used, 0% Usage
Top CPU Process Users: dd 99%
Top Memory Process Users: mysqld 17%, DMLProc 3%, workernode 3%, ProcMon 3%, mcsadmin 3%
Disk Usage: / 8%

mcsadmin> getSystemCpu
getsystemcpu Fri Nov 16 17:01:00 2018

System CPU Usage per Module

Module 'pm1' CPU Usage % = 100
mcsadmin> getSystemCpuU
getsystemcpuusers Fri Nov 16 17:01:42 2018

System Process Top CPU Users per Module

Module 'pm1' Top CPU Users

Process CPU Usage %
----------------- -----------
dd 99

mcsadmin>

test by running this command in a script:

dd if=/dev/zero of=/dev/null

Comment by David Hill (Inactive) [ 2018-11-16 ]

https://github.com/mariadb-corporation/mariadb-columnstore-engine/pull/627

Comment by Daniel Lee (Inactive) [ 2018-11-28 ]

Build verified: 1.2.2-1

Generated at Thu Feb 08 02:32:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.