Page 1 of 2
Swap Usage
Posted: Mon Dec 09, 2019 6:59 am
by dbcummings
Hello,
I am running the NCPA on my Nagios XI servers. Our swap usage on one of our servers has move to warning yesterday. I noticed that our swap usage is slow creeping up on our servers. However, I believe we have enough memory to accommodate the servers' needs. See the output of free -g below:
total used free shared buff/cache available
Mem: 125 3 2 3 118 117
Swap: 7 0 7
We restarted one server last week and it has not been consuming any swap since. Should we be doing something to manage the swap usage on these servers?
Re: Swap Usage
Posted: Mon Dec 09, 2019 7:28 am
by dbcummings
Just ran "vmstat -w 1". I am only seeing 0s in si and so columns. So, it doesn't appear like anything is currently being swapped in our out.
Re: Swap Usage
Posted: Mon Dec 09, 2019 9:36 am
by lmiltchev
Can you show us the actual check run from the command line, along with the output of it?
Re: Swap Usage
Posted: Mon Dec 09, 2019 9:59 am
by dbcummings
I have sent you a PM.
Re: Swap Usage
Posted: Mon Dec 09, 2019 10:18 am
by lmiltchev
Your swap usage is greater than 5 % (5.10%), and since you are using "-w 5 -c 10" thresholds, you get a WARNING. When using the "-u" flag, this only sets the "display unit". It it NOT used in calculations. NCPA uses the "%", not the "gb". You can adjust your thresholds, keeping this fact in mind. Let us know if this helped. Thank you!
Re: Swap Usage
Posted: Mon Dec 09, 2019 10:21 am
by dbcummings
I guess my question is whether we can regularly purge our SWAP space since it seems to incrementally grown and not shrink unless a service is restarted or the server is rebooted. We have plenty of memory. So, I don't think that Nagios is regularly/actively using swap space.
Re: Swap Usage
Posted: Mon Dec 09, 2019 10:52 am
by lmiltchev
Perhaps you could use:
Read more on clearing swap space in Linux here:
https://www.tecmint.com/clear-ram-memor ... -on-linux/
Is this what you were looking for?
Re: Swap Usage
Posted: Mon Dec 09, 2019 11:25 am
by dbcummings
Partly. I came across this article as well. I am mainly look at if there are any guidelines around Nagios XI and swap. If I manage it and clear it using a post like this, will there be any negative impact.
Re: Swap Usage
Posted: Mon Dec 09, 2019 11:39 am
by lmiltchev
The swap is managed by the operating system, not by Nagios XI. We do not know what the exact impact of removing the swap on your system is going to be. This is "operating system related" and not specifically related to Nagios XI. Also, we don't have any guides/documents in regards to this topic.
Re: Swap Usage
Posted: Mon Dec 09, 2019 11:44 am
by dbcummings
<facepalm>sigh</facepalm>
Ok. We can close this post.