Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Feature Requests
  3. Major: NetXMS linux disk space check must know reserved blocks count

Major: NetXMS linux disk space check must know reserved blocks count

Scheduled Pinned Locked Moved Feature Requests
5 Posts 2 Posters 14.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    C
    CTXM
    wrote on last edited by
    #1

    extX partitions reserves some % of blocks (which can be freed most time, but no one does that 🙂 ).

    I have noticed, that free space reported by NetXMS agent differs from what is seen using "df".
    I see only one explanation - NetXMS check does not pay an attention to reserved block count.

    Detailed:

    NetXMS agent ver: 0.2.27
    Space check via DiskFreePerc

    [root@XXX ~]# df -kh
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda2              12G  8.7G  2.3G  80% /
    ...
    [root@XXX ~]# tune2fs -l /dev/sda2
    ...
    Block count:                  3072431
    Reserved block count:     153621
    ...

    * df shows 20% free space.
    * NetXMS reports 24% for this mountpoint (I have looked a bit later +/- 1%)
    * 4,99% approx reserved

    Repeated once again:

    [root@XXX ~]# df -kh
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda2              12G  8.3G  2.8G  76% /
    ...

    [root@XXX ~]# df -k
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda2             12096756   8642080   2840192  76% /
    ...

    * df shows 76% used space.
    * NetXMS shows 28% free space
    * 4,99% approx reserved

    Difference: 4%

    1 Reply Last reply
    0
    • C
      C
      CTXM
      wrote on last edited by
      #2

      Hmm.
      Nope, here is somthing else

      on an another machine, with almost same parameters, data differs:

      NetXMS agent: 0.2.19

      [root@YYY ~]# df -k
      Filesystem          1K-blocks      Used Available Use% Mounted on
      /dev/sda2            12096756  3191224  8291048  28% /

      [root@YYY ~]# df -kh
      Filesystem            Size  Used Avail Use% Mounted on
      /dev/sda2              12G  3.1G  8.0G  28% /
      ...

      [root@YYY ~]# tune2fs -l /dev/sda2
      ...
      Block count:                  3072431
      Reserved block count:    153621
      ...

      * df shows 28% used space
      * NetXMS shows 73% free disk space
      * 4,99% approx reserved

      Difference between df & NetXMS is 1% in this case. And 4% in previous case. WTF?

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        There are two parameters for disk space on UNIX: Disk.Free (or Disk.FreePerc) and Disk.Avail (or Disk.AvailPerc). First shows total amount of free space, including reserved blocks. Second shows free space available to non-root users - free space without reserved blocks. You should compare Disk.Avail results with df output.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • C
          C
          CTXM
          wrote on last edited by
          #4

          There are 2 situations described:

          1st with server XXX, which shows how bad is to do not read manual. Actually, I have seen Disk.Free & Disk.Avail, but didn`t udnerstand from an explanation that difference is about reserved blocks, so i throw it 😞 :$ Sorry. Looks stupid

          Everything okay with this server. Checks works fine.

          2nd situation is with server YYY.

          I have added Disk.Avail and got 5% difference with DiskFree.  
          But reported data still doesn`t fit together with DF produced one.
          With Disk.Avail - 1-4% misses (on different size partitions) !!!

          [root@YYY netxms-0.2.31]# df -kh
          Filesystem            Size  Used Avail Use% Mounted on
          /dev/sda2              12G  3.1G  7.9G  29% /
          ...
          /dev/sda5              48G   31G   15G  69% /export/stroage0
          /dev/sdb1             268G   73G  182G  29% /export/storage1

          While NetXMS reports free space:

          /                      - 68  ::: 100 - 29 = 71 : 3% missed
          /export/stroage0 - 30   ::: 100 - 69 = 31 : 1% missed
          /export/storage1 - 67   ::: 100 - 29 = 71 : 4% missed

          I did NetXMS agent ugrade from 0.2.19 to 0.2.31, but this didn`t changed situation.
          Someone lies - either DF, either NetXMS. 🙂

          Also, seems, it is specific to server environment, because on server XXX checks works as expected.
          Could it be so?

          1 Reply Last reply
          0
          • C
            C
            CTXM
            wrote on last edited by
            #5

            Also, feel free to move this topic to general support tree - to keep forum clean 🙂

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups