swap to 100%
swap to 100%
I've noted that the swap usage on my NEMS server regularly builds up to 100%. Memory usage at the same time is only around 50%...
I have not been able to figure out what might be going on.
Rebooting 'solves' this of course, but some days later it is back at 100%...
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: swap to 100%
Hi baggins,
Not really a "bug" per se, though I could improve the Monitorix reports so it's not so "confusing".
NEMS 1.2.2+ had a focus on reducing SD card writes. As part of this, the swap file was disabled. So, the reports and any memory reporting tool will therefore show your swap as being 100% full... because your swap is essentially 0 bytes capacity.
Hope that helps shed some light on the issue. I'll make some changes to Monitorix so your reports aren't so misleading.
Thanks
Robbie
Not really a "bug" per se, though I could improve the Monitorix reports so it's not so "confusing".
NEMS 1.2.2+ had a focus on reducing SD card writes. As part of this, the swap file was disabled. So, the reports and any memory reporting tool will therefore show your swap as being 100% full... because your swap is essentially 0 bytes capacity.
Hope that helps shed some light on the issue. I'll make some changes to Monitorix so your reports aren't so misleading.
Thanks
Robbie
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: swap to 100%
Hi Robbie,
It's not only the Monitorix reports.
On my NEMS server, the NEMS server itself is monitored with the default profile as provided during the installation.
This means that I get notifications each time swap gets exhausted (even though there is no swap!).
What I don't understand is the fact that since the swap file is disabled, it starts at 0% usage and then gradually increases to 100% as can be seen on the graph...
I take it that I better switch of swap monitoring on the NEMS server then?
It's not only the Monitorix reports.
On my NEMS server, the NEMS server itself is monitored with the default profile as provided during the installation.
This means that I get notifications each time swap gets exhausted (even though there is no swap!).
What I don't understand is the fact that since the swap file is disabled, it starts at 0% usage and then gradually increases to 100% as can be seen on the graph...
I take it that I better switch of swap monitoring on the NEMS server then?
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: swap to 100%
Yes; that host & service was added as a sample to help get folks started. Now that Swap is disabled though, it will report that swap is full.
In NEMS 1.3 this is already "resolved" for you - but since you know NEMS does not have swap, you should remove that check from the Linux Servers host group in NEMS nCONF.
Have fun!
In NEMS 1.3 this is already "resolved" for you - but since you know NEMS does not have swap, you should remove that check from the Linux Servers host group in NEMS nCONF.
Have fun!
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: swap to 100%
Is swap really off in 1.3?
kd4pyr@NEMS:~ $ swapon -s
Filename Type Size Used Priority
/var/swap file 102396 4 -1
kd4pyr@NEMS:~ $ free
total used free shared buff/cache available
Mem: 1000312 293904 182088 36912 524320 615768
Swap: 102396 4 102392
kd4pyr@NEMS:~ $
kd4pyr@NEMS:~ $ swapon -s
Filename Type Size Used Priority
/var/swap file 102396 4 -1
kd4pyr@NEMS:~ $ free
total used free shared buff/cache available
Mem: 1000312 293904 182088 36912 524320 615768
Swap: 102396 4 102392
kd4pyr@NEMS:~ $
Rick
- Robbie Ferguson
- Posting Freak
- Posts: 835
- Joined: Wed Mar 07, 2012 3:23 pm
- Location: Ontario, Canada
- Contact:
RE: swap to 100%
It's supposed to be... did it get re-enabled somehow?
Robbie Ferguson // The Bald Nerd
Did I help you out? Appreciate what I do? Please consider saying thanks:
Did I help you out? Appreciate what I do? Please consider saying thanks:
- Throw something in the tip jar: https://donate.category5.tv
- Support Category5 TV on Patreon: https://patreon.com/category5
- Support NEMS Linux on Patreon: https://patreon.com/nems
RE: swap to 100%
Maybe. But I did not do it. I just copied v. 1.3 to a SD card and booted on a backup PI. See attached image 1.
Then I ran the INIT and rebooted. See image 2.
Then I ran the INIT and rebooted. See image 2.
Rick
RE: swap to 100%
I can confirm this.
Brand new install of 1.3, swap at 100%
Brand new install of 1.3, swap at 100%
RE: swap to 100%
I put a temporary workaround on my NEMS. I added "sudo swapoff -a" in the /etc/rc.local file so the change is in place across reboot.
====================
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo swapoff -a
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0
====================
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo swapoff -a
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0
Rick