[MCOL-628] getSystemResourceUsage doesnt work on non-root install Created: 2017-03-20  Updated: 2023-10-26  Resolved: 2017-06-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.0.8
Fix Version/s: 1.1.0

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

google-cloud debian 8 non-root binary package, 2pm combo setup


Sprint: 2017-12

 Description   

getSystemResourceUsage - returns error

mcsadmin> getSystemResourceUsage
getsystemresourceusage Mon Mar 20 15:41:05 2017
System Resource Usage per Module
Failed to get Top CPU Users: API Failure return in getTopProcessCpuUsers API
mcsadmin>



 Comments   
Comment by David Hill (Inactive) [ 2017-06-05 ]

This was fixed by a change made as part of a fix for MCOL-628. Problem was that this file/ tmp/columnstore_tmp_files didn't exist which caused an error in gettint the cpu/memory users. It now exist after install the latest build and the command works for root and non-root users

Comment by David Hill (Inactive) [ 2017-06-07 ]

Daniel flagged where the disk usage isn't being displayed on non-root installs, which is related to this fix.

I reproduced the same issue

mcsadmin> getSystemDisk
getsystemdisk Wed Jun 7 18:37:37 2017

System Disk Usage per Module

Module 'pm1' Disk Usage (in 1K blocks)

Mount Point Total Blocks Used Blocks Usage %
----------------------------- ------------ ------------ -------

mcsadmin> getSystemResourceUsage
getsystemresourceusage Wed Jun 7 18:38:04 2017

System Resource Usage per Module

Module 'pm1' Resource Usage

CPU: 0% Usage
Mem: 3789000k total, 507408k used, 2550760k cache, 13% Usage
Swap: 0 k total, 0k used, 0% Usage
Top CPU Process Users: systemd 0%
Top Memory Process Users: mysqld 5%, workernode 1%, DMLProc 1%, glusterfsd 1%, ProcMon 1%
Disk Usage:

mcsadmin>

Comment by David Hill (Inactive) [ 2017-06-07 ]

Issue is a hardcoded path problem pointing to /usr/local/... where on non-root it should be home/....
Changed code to make it dynamical get install directory.

tested on root install

mcsadmin> getSystemDisk
getsystemdisk Wed Jun 7 20:03:05 2017

System Disk Usage per Module

Module 'pm1' Disk Usage (in 1K blocks)

Mount Point Total Blocks Used Blocks Usage %
----------------------------- ------------ ------------ -------
/ 104844988 6281068 6

mcsadmin> getSystemResourceUsage
getsystemresourceusage Wed Jun 7 20:03:22 2017

System Resource Usage per Module

Module 'pm1' Resource Usage

CPU: 0% Usage
Mem: 3789000k total, 499896k used, 1578840k cache, 13% Usage
Swap: 0 k total, 0k used, 0% Usage
Top CPU Process Users: systemd 0%
Top Memory Process Users: mysqld 5%, workernode 1%, DMLProc 1%, python 1%, PrimProc 1%
Disk Usage: / 6%

test non-root install - guest user

mcsadmin> getSystemDisk
getsystemdisk Wed Jun 7 20:07:13 2017

System Disk Usage per Module

Module 'pm1' Disk Usage (in 1K blocks)

Mount Point Total Blocks Used Blocks Usage %
----------------------------- ------------ ------------ -------
/ 104844988 5580716 6

mcsadmin> getSystemResourceUsage
getsystemresourceusage Wed Jun 7 20:07:17 2017

System Resource Usage per Module

Module 'pm1' Resource Usage

CPU: 0% Usage
Mem: 3789000k total, 570012k used, 2899088k cache, 15% Usage
Swap: 0 k total, 0k used, 0% Usage
Top CPU Process Users: systemd 0%
Top Memory Process Users: mysqld 5%, PrimProc 1%, workernode 1%, DMLProc 1%, python 1%
Disk Usage: / 6%

mcsadmin> exit
exit Wed Jun 7 20:07:43 2017
Exiting the MariaDB ColumnStore Admin Console
[guest@centos-7-pm1 ~]$

Comment by Daniel Lee (Inactive) [ 2017-06-08 ]

Build verified: Github source 1.1.0

[root@localhost mariadb-columnstore-server]# git show
commit 594ef1807a5d6cba45cf7c2bed03cccdc32f177a
Merge: a5f191d ce815f9
Author: David.Hall <david.hall@mariadb.com>
Date: Thu Jun 8 10:12:50 2017 -0500

[root@localhost mariadb-columnstore-engine]# git show
commit 3e1bdfb1e97490f3d66339eb11d1d1de1222487a
Author: david hill <david.hill@mariadb.com>
Date: Wed Jun 7 15:09:09 2017 -0500

MCOL-628 fix non-root disk, hardcoded path issue

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