CDM Alert showing 100% swap memory used on Linux
search cancel

CDM Alert showing 100% swap memory used on Linux

book

Article ID: 212465

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

We have an alert on 100% swap usage but our Linux administrator says it is not true and that there is no issue with swap memory. 

 

 

How is Swap Memory calculated by the CDM probe? 

 

 

Environment

Release : UIM 9.x / 20.x

Component : UIM - CDM Any version

Cause

Probe working as designed. 

 

 

Resolution

As per the KB below:

UIM - Monitoring CDM memory usage on Linux

https://knowledge.broadcom.com/external/article?articleId=118534

 

CDM reads the proc/meminfo file to obtain the memory usage qos data.

For example:

Proc-meminfo:

 

MemTotal:       65799664 kB
MemFree:          353572 kB
MemAvailable:     878784 kB
Buffers:           75020 kB
[...]
Active(anon):   58038964 kB
Inactive(anon):  5578888 kB
Active(file):     433240 kB
Inactive(file):   439508 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8191996 kB
SwapFree:              0 kB
Dirty:              2552 kB
Writeback:             0 kB

[..]

 

Looking at CDM.log:

In the CDM.logs we are seeing:

 

CDM-log we can see:

Apr  8 06:37:30:913 [140646738540352] cdm: (GetMemoryInfo) - swap total: 7999
Apr  8 06:37:30:913 [140646738540352] cdm: (GetMemoryInfo) - swap used: 7999

Apr  8 06:37:30:913 [140646738540352] cdm: (GetMemoryInfo) - Total: 72256 Physical: 64257 Swap: 7999
Apr  8 06:37:30:913 [140646738540352] cdm: (GetMemoryInfo) - Used : 68155 Physical: 60156 Swap: 7999

Apr  8 06:37:30:913 [140646738540352] cdm: CheckSwapAlarms
Apr  8 06:37:30:913 [140646738540352] cdm: Swap         [04] - val=7999MB avg=100%
Apr  8 06:37:30:913 [140646738540352] cdm: Swap         [04] - val=7999MB avg=100%,perc[100.000000]

 

Therefore the calulcation for Swap memory will be as below: 

QOS_MEMORY_SWAP (SwapUsed MB) = (SwapTotal - SwapFree) / 1024

 

In the case above:

SwapTotal:       8191996 kB - SwapFree:              0 kB = 100% used. 

 

 

In the above conditions, the CDM probe will create the alarm message correctly stating swap memory is 100%

 

 

Additional Information

Article title: How does CDM calculate memory usage on Linux

Article title: How does CDM calculate Memory Usage in Solaris?

Article title: How is Memory information calculated by cdm probe for HP-UX based systems

Article title: How Is "Swap Usage" activity calculated by the cdm probe in Solaris

Article title: How Is "memory paging" activity calculated by the cdm probe?

Article Title: Monitoring Total Processor / CPU utilization on Windows with UIM