0

I gave the command ls -lt to see which log files are constantly being written into, since if they are being written into, the modified time will almost be very close to date command's output.

But strangely, the modified time in the ls command's output is showing to be 12 minutes old for all the log files which are being continuously modified (written into). For example, if I give the command

date ; echo ; ls -lt *log

And if get the date's output as Sun Jan 19 16:48:16 IST 2014, the ls -lt *log command's output for a while which is being written into when the command was given will show the file details as:

-rw-r--r-- 1 root 12014 6.2M Jan 19 16:36 Imap.log

Now the file Imap.log here is continuously being written into into, so the modified time should also be very very close to 16:48, but as can be seen, its just 16:36. A full 12 minute difference.

The date command's output is correct. I tried using simple ls -l, also stat filename to see details over there, and even the stat command shows the Modify time stamp to be 12 minutes old.

The partition on which the log files are being written to is mounted on an NFS. Is that the culprit? What is it that I need to check?

The OS is CentOS 5.4. Kernel is 2.6.18-164.el5.

Gautam Somani
  • 296
  • 3
  • 14

1 Answers1

3

Check the NFS mount options. The actimeo option defines the file-attribute cache in seconds, which might be configured to a few minutes in your case. This is usually done by the system administrator to minimise the number of NFS calls from the client side to the server, to get the metadata of the file.