[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using monit to monitor hundreds of thousands of file system resource

From: Jan-Henrik Haukeland
Subject: Re: Using monit to monitor hundreds of thousands of file system resources?
Date: Fri, 31 Aug 2007 16:29:14 +0200

With this many files I think you would be better of using something like auditd, famd or some other file watching daemon, which I suspect there are many of, though they may also exhaust memory with this many file entries. Maybe the best is to write your own, your script could for instance take a md5 sum of each file it finds, store it in a database and the next time the script runs check if the sum has changed etc.

monit parse and cache its control file in memory as a list of service structs. This means that monit will probably use several hundred MB of memory. Not sure if this is recommended. However there are no hard limits in monit AFAIK that will prevent you from trying.

On 31. aug. 2007, at 15.17, Sergio Trejo wrote:

I am writing a script that will dynamically create a monit rc configuration file. This script will recursively walk a relatively deep and entangled nest of directories and collect information about all of the resources it finds in those directories ( e.g., files, symbolic links, subdirectories). It will then create an entry in the monit rc file for each resource it finds.

A preliminary walk of the tree reports to me that it has discovered a whopping 277,924 resource files. I anticipate that the corresponding monit configuration file will total in the tens of megabytes in size once it is created by this script. This is a security requirement and I need to know if anything changes state in this deep and entangled section of my file system (I expect it to be static almost always).

I will be running an instance of a monit daemon to monitor these file system resources with this very large monit configuration file that is dynamically generated by my script. It will run on a cycle of once per day (so the daemon will then go into sleep mode most of the day).

I am wondering if anyone has ever used monit to monitor hundreds of thousands of file system resources? I am also wondering how monit will handle such a large configuration file? Does the monit daemon parse the configuration file once and then load it into memory (even if the monit daemon sleeps most of the time, is the configuration file cached in RAM)? If so, then I might be in trouble since I only have 1 GB of RAM on my server.

Thank you for any insights!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]