Swap Usage
-
dbcummings
- Posts: 130
- Joined: Thu Dec 13, 2018 8:37 am
Swap Usage
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?
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?
-
dbcummings
- Posts: 130
- Joined: Thu Dec 13, 2018 8:37 am
Re: Swap Usage
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
Can you show us the actual check run from the command line, along with the output of it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Swap Usage
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
dbcummings
- Posts: 130
- Joined: Thu Dec 13, 2018 8:37 am
Re: Swap Usage
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
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?
Code: Select all
swapoff -a && swapon -ahttps://www.tecmint.com/clear-ram-memor ... -on-linux/
Is this what you were looking for?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
dbcummings
- Posts: 130
- Joined: Thu Dec 13, 2018 8:37 am
Re: Swap Usage
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
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
dbcummings
- Posts: 130
- Joined: Thu Dec 13, 2018 8:37 am
Re: Swap Usage
<facepalm>sigh</facepalm>
Ok. We can close this post.
Ok. We can close this post.