It is widely documented that on zfs atime updates the access time on zfs.
Where is the access time updated on Solaris 11.2?
If I create file atimetest.txt under rpool/export/home:
The atime is set to on, so I set it to off:
I then check the time, run ls -ld against the directory, run ls -tl against the file:
Then cat the file from /:
Checking the directory with ls -ld and checking the file with ls -lt shows no update for the access time:
So, where is the access time updated?
I can see the setting of atime=off in zpool history:
but no update for access time.
I'd like to set atime=off for zfs on application servers, but would like a before and after image to access the change.
This behaviour is replicated on both solaris 10 and 11 x86.
By using stat command, you can see that information.
If you change atime to off, the Access part will not be update when you access the file and you will gain minor to none performance depending on the filesystem structure.
Alternatively, you can use the portable POSIX way to display the file access time:
Note that with certain workloads, disabling atime might have more than a "minor to none" performance gain. It can dramatically reduce the number of I/Os (possibly down to zero) if your applications are constantly reading a large set of small files.
Thank-you for your replies; my post was to determine how I could see the effect of setting atime=off for zfs. Unfortunately I cannot install the gnu utils for solaris to get stat available, due to rigid change control. I have not come across ls -lu before; I have tried repeatedly catting the file atimetest.txt today, but that does not show any change in the ls -lu output.
I am happy to accept that the default setting for atime (=on) updates the inode data, which is something I cannot see easily, in my current setup.
Unfortunately I cannot install the gnu utils for solaris to get stat available, due to rigid change control.
Most GNU utils are already there but GNU stat is unfortunately not part of them. Solaris ls has been extended to support some GNU options though, and they provide the information required.
Quote:
I have not come across ls -lu before; I have tried repeatedly catting the file atimetest.txt today, but that does not show any change in the ls -lu output.
I am happy to accept that the default setting for atime (=on) updates the inode data, which is something I cannot see easily, in my current setup.
Here is a test showing the access time changing on Solaris 11.2:
Hello!
I have ZFS-based flash archive (flar file). I need to install to it several additional packages and patches. As I know, it is possible for USF-based flar, but how to do it with ZFS-based one? (0 Replies)
Following this thread:
https://www.unix.com/ip-networking/1935-automated-ftp-task.html
I have created the following script:
#! /bin/ksh
HOST=ftp.mywebsite2.com
USER=astrocloud
PASSWD=8****
exec 4>&1
ftp -nv >&4 2>&4 |&
print -p open $HOST
print -p user $USER $PASSWD
print -p cd... (3 Replies)
Hi,
ctime is the inode change time. If reading a file, its atime will be updated, which should cause inode member i_atime changed, which is an inode change. So ctime should also be updated. But if I try to ls a directory on redhat, only the directory atime gets updated, not ctime. Why?
THANKS! (2 Replies)
I need to sort through a volume that contains video files by access time and delete files that have not been accessed over x days. I have to use the access time as video files are originals that do not get modified, just read
Testing commands on a local test folder...
$ date
Wed Sep 28... (10 Replies)
hi, in trying to maintain your directories, one needs to do some housekeeping like removing old files. the tool "find" comes in handy. but how would you decide which option to use when it comes to, say, deleting files that are older than 5 days?
mtime - last modified
atime - last accessed... (4 Replies)
Unix keeps 3 timestamps for each file: mtime, ctime, and atime. Most people seem to understand atime (access time), it is when the file was last read. There does seem to be some confusion between mtime and ctime though. ctime is the inode change time while mtime is the file modification time. ... (2 Replies)
Hey,
First of all I want to know How do I see the atime of a file ?? Whats the command ??
I think ls -l shows the last modified time right ? Because when I use cat to read a file, the timestamp shown by ls -l does not change.
Its not ls -lu ! man ls did not help ! How do I see the last... (8 Replies)
i have used all forms of the unix find command.. and right now this is the only command i can think of that might have this option..:
if i use mtime i am looking at a time interval.. but if i wanted to find out intervals of access, change and modification according to when a file changed size... (4 Replies)