[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
changed checksum vs changed timestamp on file creation
From: |
Michi Mutsuzaki |
Subject: |
changed checksum vs changed timestamp on file creation |
Date: |
Tue, 19 Mar 2013 17:50:50 -0700 |
Hi,
I'm using monit (version 5.3.2 on Ubuntu 12.04) to monitor a file. The
file might not exist when monit starts, and I want to execute a
command when the file gets created. My conf file looks something like
this:
check file my_file with path /my/file
if changed timestamp
# if changed checksum
then exec "/my/command"
With "changed timestamp", it works as I expect; the command gets
executed after the file is created. When I use "changed checksum"
instead, however, the command doesn't get executed, and the log says
that checksum has not changed. Is this expected? If so, is there a way
to monitor for file creation without using timestamp? I'm trying to
avoid using timestamp because this file gets touched a lot, and the
command shouldn't get executed if the file content hasn't changed.
Thanks!
--Michi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- changed checksum vs changed timestamp on file creation,
Michi Mutsuzaki <=