PDA

View Full Version : vfs.file.time


Huy Dinh
14-03-2006, 14:40
What exactly does vfs.file.time return? Does it return ctime?

Actually, it is not mtime which is returned, so do you know how to make Zabbix figure out the mtime of a file?

elkor
14-03-2006, 15:00
vfs.file.time[file,<mode>] where mode is modify | access | change. the documentation does list modify as the default though.

you could also use vfs.file.cksum[file]

Huy Dinh
15-03-2006, 13:12
Stupid me, I didn't realize that, though I read the docs. Mea culpa :)

But it still doesn't work. All modes return some timestamps that don't have aynthing to do with the real times, apart from the date. But thanks for your help.

elkor
15-03-2006, 14:59
noproblem, haven't tried the time item myself yet, it could be bugged.

if you need mtime I would suggest using checksum, I use it and it works.

Huy Dinh
15-03-2006, 15:23
I just tried vfs.file.cksum, but it doesn't return the mtime, either.

The docs say that vfs.file.cksum returns a checksum of a file - I'd assume that the checksum doesn't have that much to do with the mtime of a file, does it?

elkor
12-04-2006, 21:39
no, but if the checksum changes.. you'll know when the file was modified.

(sorry I never replied to this weeks ago.. I just found the thread today again on a search)

napel25
16-03-2007, 13:00
I think it returns the number of seconds between 1 jan 1970 and the last modification of the file.
With the fuzzytime function it's easy to check this value with the current time.