Support » Plugin: WP Server Health Stats » Ram Unknown / Negative Value

  • Resolved vmr907



    I have your plugin running on two different sites. It has helped me a great deal determining a number of things, namely the usage of Ram on my VPS. But as of the last plugin update the Ram usage is listed in the follow manner:

    RAM : Unknown of 5 GB (-1919% used)

    Is there anything that I can do to correct this to receive the correct reading? Or is this something that needs to be updated in the plugin?

    Thanks for the great plugin.



Viewing 13 replies - 1 through 13 (of 13 total)
  • I can confirm that this happened to me as well after I updated to the latest release. it worked great until that. Cheers!

    Plugin Author Saumya Majumder


    @vmr907, @tiotrom – Hi, thanks for reporting the issue. With every release, I’m just trying to make the plugin more accurate and fix bugs. Anyways, I just have three questions for you:
    1. If you have PHP Opcache and/or Redis object cache installed in your server, have you tried purging them out?
    2. Have you tried uninstalling then deleting and reinstalling the plugin?
    3. If you have already tried the above two mentioned things, can you pass me the output of the following command from your server: cat /proc/meminfo


    I tried 2. but it didn’t help. I don’t understand the other points to be honest, so I am not knowledgeable to test any of that. Sorry.

    Plugin Author Saumya Majumder


    @tiotrom Can you ask your host to provide the output of cat /proc/meminfo command?

    MemTotal:	 2560000 kB
    MemFree:	 1220044 kB
    MemAvailable:	104585252 kB
    Buffers:	       0 kB
    Cached: 	  952780 kB
    SwapCached:	   33920 kB
    Active: 	44525628 kB
    Inactive:	42088532 kB
    Active(anon):	 6487248 kB
    Inactive(anon):  9984644 kB
    Active(file):	38038380 kB
    Inactive(file): 32103888 kB
    Unevictable:	       0 kB
    Mlocked:	       0 kB
    SwapTotal:	       0 kB
    SwapFree:	       0 kB
    Dirty:		   26460 kB
    Writeback:	       0 kB
    AnonPages:	 8479912 kB
    Mapped: 	 9125892 kB
    Shmem:		 7958136 kB
    Slab:		36907592 kB
    SReclaimable:	33395284 kB
    SUnreclaim:	 3512308 kB
    KernelStack:	   27816 kB
    PageTables:	  607148 kB
    NFS_Unstable:	       0 kB
    Bounce: 	       0 kB
    WritebackTmp:	       0 kB
    CommitLimit:	74038152 kB
    Committed_AS:	43708708 kB
    VmallocTotal:	34359738367 kB
    VmallocUsed:	  282252 kB
    VmallocChunk:	34359290236 kB
    DirectMap4k:	    9536 kB
    DirectMap2M:	 2064384 kB
    DirectMap1G:	132120576 kB
    Plugin Author Saumya Majumder


    @tiotrom I do see the issue now. But I think it is only going to affect a very small percentage of users, whose servers have been configured weirdly. Let me explain you by what I meant by the server configured weirdly.

    The first thing you have to understand is looking at this file, the MemTotal says the total RAM you have in your system. MemFree says out of the total RAM, how much is free exactly. Now, if your RAM is being used by buffer or cache, this parameter will not consider that space as free, it considers a space free when it is literally free. Now come to MemAvailable. Unfortunately MemAvailable is not available for all system, only systems with ubuntu os or something like that have this parameter. In CentOS or RedHat systems, I haven’t seen it.

    Anyways coming to the point MemAvailable shows how much space it has left to initialize a new program. You can learn more about all these here:

    Initially, when I coded this plugin, I did so in a CentOS-based system, so I didn’t have access to that MemAvailable value, so instead I build my plugin based of MemFree which is much widely available across all Linux based systems. Then on Github I received an issue report stating using MemAvailable would be a more accurate value to be used.

    So, inside the plugin, I kept a check to know if MemAvailable parameter exists, if not go for MemFree. But in any case, the value of MemAvailable should be lower than MemTotal, but in your case, it is way higher, not sure why and that is why you are seeing that negative issue.

    I’m pushing a new update to plugin right now making sure it only uses MemFree and not go looking for MemAvailable as it is highly volatile across systems.

    I’ll let you know when the new version has been pushed.

    Plugin Author Saumya Majumder


    v1.6.4 released, fixing the above-mentioned issue and rolling back to MemFree.

    Thank you very much for the detailed explanation and for the update of the plugin – it works now! My hosting is Dreamhost, so they set up the server (VPS).

    Plugin Author Saumya Majumder


    @tiotrom Hi, it doesn’t matter who your host is, it’s just your VPS has been configured weirdly and it turns out you are not the only person whose server is weirdly configured as @vmr907 also reported the same issue.

    Ok, I was just wondering why would DH, one of the largest hosting provider, not know how to properly configure a VPS 🙂 – anyways, thank you for making the plugin work for such cases as well

    Plugin Author Saumya Majumder


    @tiotrom Not sure, maybe they have installed some sorts of a program in the server which is conflicting with this value. If you look closely at the output you have given me, you will see in many cases the values showing is more than the MemTotal value. Not sure though.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    It’s not ‘weird’ it’s just a philosophical difference. DreamHost doesn’t use CentOS (Ubuntu usually) so it comes with different levels of restrictions and likes to hide things from non root-y users. That said, it’s probably our process watcher tool that’s subverting it, so we can keep tabs on people using too much memory.

    Different linux flavours, different philosophies 🙂 Fun times!

    Plugin Author Saumya Majumder


    @ipstenu Thanks a lot for the explanation. So, it turns out MemAvailable value cannot be trusted in a plugin that runs in thousands of different servers. At least MemFree can be trusted. Thanks again for the explanation. 🙂

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Ram Unknown / Negative Value’ is closed to new replies.