#3801 Selecting "Swap" for "Disk Space" failure


When creating a new monitor for "Disk Space" in "System and Server Status" module, changing the "File system to check", selecting "Swap", typing in 10 in "Minimum free space", ensuring "Absolute size" is bulleted, changing drop down to "MB", and saving results the service being down with: "Current status
Only 0 bytes space free".

/etc/fstab contains:
/dev/md1 swap swap defaults 0 0

# cat /proc/swaps
Filename Type Size Used Priority
/dev/md1 partition 4192888 150796 -1

Webmin is incorrectly reading the swap partition space (a system may also have multiple swap partitions -- both "partitions" and "file" based -- unsure if that is taken into consideration for the "Swap" setting in this module).

In my opinion, this is a worse problem: Changing the minimum free space to "Percentage of total" results in a divide by zero (and fails the webmin interface). Recovery from the Divide by Zero error is only possible if you manually delete the "/etc/webmin/status/services/##########.serv" file (where ####### is the generated numeric file name associated with this Disk Space monitor) since the webmin web interface does not complete the screen write.


  • Nobody/Anonymous

    The /etc/webmin/status/monitor.pl code will e-mail the following when you select the "Percentage of total" and the monitor cannot read the real Swap file storage (or, perhaps if the Swap file storage is actually at 0):

    Illegal division by zero at space-monitor.pl line 16.

  • Jamie Cameron

    Jamie Cameron - 2010-11-16
    • status: open --> closed-fixed
  • Jamie Cameron

    Jamie Cameron - 2010-11-16

    Yes, this is a known bug in Webmin 1.520 and below. The 1.530 release will fix it .. disk space monitoring for swap doesn't actually make sense at all.

  • Nobody/Anonymous

    Jamie... since Disk Space monitoring will be dropped (from what I'm reading in your comment). Will there be a new module for monitoring Swap? This is a good feature to monitor since you can report back that the Swap space is being over consumed and possibly it's time to up the RAM or fix the processes that are gobbling up physical RAM.

  • Jamie Cameron

    Jamie Cameron - 2010-11-16

    I will improve the existing "free memory" monitor type to be able to check swap space as well..

  • Nobody/Anonymous

    Jamie: "I will improve the existing 'free memory' monitor"... Thank you, much appreciated!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks