Re: hard drive access every few seconds...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Wood wrote:

# stat /mnt/mtab doesn't change the atimes. But # stat /proc/mounts *do* change to times to the current time.

Atime on most files in /proc is just the current time. Nothing gets updated, this doesn't cause drive activity. Nautilus using stat() on /proc/mounts is totally acceptable.


I though stat woudn't supposed to
change access/modifiy/change times.

It changes the atime on the directory containing the file that you stat, except for some filesystems like proc.


The other suggestion that gets tossed around a lot (in pseudocode) is:
static int mtabfd = -1;
if( mtabfd == -1 )
	mtabfd = open( "/etc/mtab" );
fstat( mtabfd, &statbuf );

fstat doesn't update the directory's atime, either.

Must be a /proc limitation - lovely .
I'm just trying to get the nautilus guys to quit polling /mnt/mtab and
switch to fam.

I haven't used fam before, but that would likely cause the desktop device icons to stop working if it were turned off. I'm for it, since it's consistant with what they're already doing, but using fstat() rather than stat(), or stat() on /proc/mounts will work, too.







[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux