Correct Disk Usage Monitor to show openvz simfs filesystem usage

Discussion in 'Feature Requests' started by iNet Specialists, May 15, 2017.

  1. iNet Specialists

    iNet Specialists New Member

    I have always wondered why a number of my OpenVZ containers did not show the disk usage in ISPConfig.
    In a previous version, the command used to monitor the server disk usage was modified to "exclude" the simfs file system from the list of reported mount points. Ref
    I believe that "simfs" was incorrectly confused with "tmpfs" when making the change.
    The addition of the "-x simfs" to the "df" command prevents an OpenVZ container with ISPConfig from reporting Disk Usage correctly if it is using the 'simfs' filesystem.
    One other recent example of this is shown here:
    Also, of note, the use of "awk" to filter the results line by line prevents the command from showing any further lines that begin with the same "Filesystem" field value.
    Example: This Proposed command shows the actual state of the container...
    # df -hT -x tmpfs
    Filesystem  Type  Size  Used Avail Use% Mounted on
    /dev/simfs  simfs  4.0G  1.2G  2.9G  29% /
    devtmpfs  devtmpfs  256M  0  256M  0% /dev
    ... while, the current code does not.
    # df -hT -x simfs | awk '!x[$1]++'
    Filesystem  Type  Size  Used Avail Use% Mounted on
    devtmpfs  devtmpfs  256M  0  256M  0% /dev
    tmpfs  tmpfs  256M  0  256M  0% /dev/shm

Share This Page