Re: Unnecessary hard drive spin-ups

2020-02-13 Thread George N. White III
On Thu, 13 Feb 2020 at 11:35, Andy Paterson via users < users@lists.fedoraproject.org> wrote: > Except the system call version doesn't need you to include any header > files! > Which is NOT clear from the man page! > The man page says "On Linux, the kernel provides a getcwd() system call, which

Re: Unnecessary hard drive spin-ups

2020-02-13 Thread Andy Paterson via users
Except the system call version doesn't need you to include any header files! Which is NOT clear from the man page! > On 13 Feb 2020, at 13:53, George N. White III wrote: > >  >> On Thu, 13 Feb 2020 at 06:40, Andy Paterson via users >> wrote: > >> [...] >> I am a little confused by

Re: Unnecessary hard drive spin-ups

2020-02-13 Thread George N. White III
On Thu, 13 Feb 2020 at 06:40, Andy Paterson via users < users@lists.fedoraproject.org> wrote: > [...] > > I am a little confused by getcwd(), on linux it is supposed to be a system > call .. I expect to find a manual page for it in section 2 (man 2 getcwd) > > instead it gives me the library

Re: Unnecessary hard drive spin-ups

2020-02-13 Thread Andy Paterson via users
On Thursday, 13 February 2020 01:09:20 GMT Roger Heflin wrote: > It may be the pwd command doing it. It works like this: > > if something runs pwd when its cwd is under say /var/log then pwd goes > through all files in /var/log until it finds .. then it goes up a > directory and repeats, until

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Samuel Sieb
On 2/12/20 7:00 PM, Tim via users wrote: Gnome (or Gnome-based) things, will put temporary auto-mounting things (flash drives, etc) inside of /var/run/, then give you an apparently separate mount point. You'll get a desktop icon for it, and no immediate indication that it's accessed through

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Cameron Simpson
On 12Feb2020 19:09, Roger Heflin wrote: It may be the pwd command doing it. It works like this: if something runs pwd when its cwd is under say /var/log then pwd goes through all files in /var/log until it finds .. then it goes up a directory and repeats, until it gets to /. getcwd() is a

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Dave Ulrick
On 2/12/20 7:09 PM, Roger Heflin wrote: It may be the pwd command doing it. It works like this: if something runs pwd when its cwd is under say /var/log then pwd goes through all files in /var/log until it finds .. then it goes up a directory and repeats, until it gets to /. That makes sense.

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Tim via users
On Wed, 2020-02-12 at 13:10 -0600, Dave Ulrick wrote: > In addition to one PC that mounted a green USB drive under /var I > had several other PCs that mounted a NAS under /var. That NAS is > intended to store backup files so its hard drive is configured to > spin down after 10 idle minutes. > >

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Roger Heflin
It may be the pwd command doing it. It works like this: if something runs pwd when its cwd is under say /var/log then pwd goes through all files in /var/log until it finds .. then it goes up a directory and repeats, until it gets to /. Assuming that is the case your solution would be expected

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Tom Horsley
The most irritating spin-up for me occurs on a reboot. I have a really slow USB drive that isn't even mounted, just plugged in (in case I want to mount it). The reboot always hangs for several seconds, and I can hear the drive spin up before the reboot proceeds.

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Dave Ulrick
On 2/12/20 7:53 AM, Dave Ulrick wrote: Interesting thought. I can envision how a lookup for /var/xyz could cause everything under /var to be looked up, and I can see how /var/cache or /var/run would be frequently read.  I'll try mounting a green USB drive's file system at a third-level

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Dave Ulrick
Interesting thought. I can envision how a lookup for /var/xyz could cause everything under /var to be looked up, and I can see how /var/cache or /var/run would be frequently read.  I'll try mounting a green USB drive's file system at a third-level directory (e.g., /var/backups/0) or under a

Re: Unnecessary hard drive spin-ups

2020-02-12 Thread Tim via users
On Tue, 2020-02-11 at 19:53 -0600, Dave Ulrick wrote: > I'm logged in as a non-root user with my home directory as my > current working directory. The file system containing my home > directory is mounted at /home. I'm using a shell prompt via a > graphical terminal emulator (xfce4-terminal, in my