Ad Widget

Collapse

vfs.file.time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Huy Dinh
    Junior Member
    • Jan 2006
    • 5

    #1

    vfs.file.time

    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
    Senior Member
    • Jul 2005
    • 299

    #2
    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]

    Comment

    • Huy Dinh
      Junior Member
      • Jan 2006
      • 5

      #3
      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.

      Comment

      • elkor
        Senior Member
        • Jul 2005
        • 299

        #4
        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.

        Comment

        • Huy Dinh
          Junior Member
          • Jan 2006
          • 5

          #5
          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?

          Comment

          • elkor
            Senior Member
            • Jul 2005
            • 299

            #6
            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)

            Comment

            • napel25
              Junior Member
              • Nov 2006
              • 18

              #7
              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.

              Comment

              Working...