ClusterLabs / ClusterLabs/resource-agents

ocf:pacemaker:SysInfo shows incorrect value of ram_free for centos 5

Open
#755 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
519
Forks
608
Avg merge
6d 1h
Merged PRs (30d)
7

Description

On Investigating the code we see that the the value shown to be ram_free is the following
`mem=``grep "Inactive" /proc/meminfo | awk '{print $2"k"}'``
mem_total=``grep "MemTotal" /proc/meminfo | awk '{print $2"k"}'``
`

As per centos 5 documentation https://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-proc-meminfo.html
The attribute _Inactive_ means the following

> Inactive — The total amount of buffer or page cache memory, in kilobytes, that are free and available. This is memory that has not been recently used and can be reclaimed for other purposes.

The actual value that the resource should be showing corresponds to

> MemFree — The amount of physical RAM, in kilobytes, left unused by the system.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the ocf:pacemaker:SysInfo implementation that computes ram_free and inspect the commands shown in the issue. Compare the Inactive and MemFree fields in /proc/meminfo using the linked CentOS documentation; done when ram_free reports the intended MemFree value.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.