Ad Widget

Collapse

Monitor folder size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grommir
    Senior Member
    • Mar 2013
    • 134

    #1

    Monitor folder size

    I have a server with folder and subfolders. Need to monitor the size of the subfolders.
    Monitor with "vfs.dir.size" is not an option due to large number of files in these subfolders.

    How it possible to monitor size of this folders without stressing system with the du command?
  • Alfista
    Senior Member
    • Mar 2017
    • 136

    #2
    Hi,

    for this is in zabbix agent v4 a command vfs.dir.count.
    I use it a longer time. Only its needed to have open enough instances of agent, longer timeout and some other parameters, while when you will use more this commands and will have there many files, you will see errors in zabbix.
    Its needed to play with it, but its work perfectly.

    Comment

    • grommir
      Senior Member
      • Mar 2013
      • 134

      #3
      At the moment I don't need to count files, but I need to calculate the size of the subfolders.

      Comment

      • Alfista
        Senior Member
        • Mar 2017
        • 136

        #4
        OK, then use the command vfs.dir.size, its also included.

        Comment

      • Alfista
        Senior Member
        • Mar 2017
        • 136

        #5
        Why not? It can count also subfolders in the deep you will.

        max_depth - maximum depth of subdirectories to traverse. -1 (default) - unlimited, 0 - no descending into subdirectories.
        I thing its the easiest way how to do it. It only need some tuning around.

        Comment

        • grommir
          Senior Member
          • Mar 2013
          • 134

          #6
          How will max_depth help if the folder contains about 3 million files?

          Comment

          Working...