Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Function reject.


devel / comp.lang.c / Re: Keeping hard drive from spinning down

SubjectAuthor
* Keeping hard drive from spinning downDFS
+* Re: Keeping hard drive from spinning downJens Stuckelberger
|+* Re: Keeping hard drive from spinning downrbowman
||`* Re: Keeping hard drive from spinning downStefan Ram
|| `- Re: Keeping hard drive from spinning downBen Bacarisse
|`- Re: Keeping hard drive from spinning downScott Lurndal
+- Re: Keeping hard drive from spinning down PLOolcott
+* Re: Keeping hard drive from spinning downManfred
|`- Re: Keeping hard drive from spinning down PLOolcott
`* Re: Keeping hard drive from spinning downPaul
 +- Re: Keeping hard drive from spinning down (the actual correct answer)olcott
 `- Re: Keeping hard drive from spinning downChris M. Thomasson

1
Keeping hard drive from spinning down

<7jYZK.65924$JZK5.56932@fx03.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23391&group=comp.lang.c#23391

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx03.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
From: nos...@dfs.com (DFS)
Subject: Keeping hard drive from spinning down
Newsgroups: comp.lang.c
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 116
Message-ID: <7jYZK.65924$JZK5.56932@fx03.iad>
X-Complaints-To: abuse@blocknews.net
NNTP-Posting-Date: Sat, 01 Oct 2022 14:40:03 UTC
Organization: blocknews - www.blocknews.net
Date: Sat, 1 Oct 2022 10:40:04 -0400
X-Received-Bytes: 3507
 by: DFS - Sat, 1 Oct 2022 14:40 UTC

Got a new mobo and chip: AMD 5600G (w/ integrated graphics). Windows
10. Was having a weird issue: my SATA HDD was spinning up every time I
needed to read or write a file.

Couldn't hear it spin down, but it must have because it almost always
made a high-pitched whine accompanied by a short system hang when I
tried to open or save a file after some minutes.

The drive is old but not nearly full, and passed all SMART tests.

To keep it spinning I wrote a little program to read/access a file every
so often. This program runs continuously until killed.

Note: it writes a tiny file to the directory it resides in.

========================================================================
DriveAlive.c
========================================================================
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

//usage:
//for testing: $ progname N (where N is seconds between 15 and 300)
// or
//for production, run program in background
// $ progname N & (Linux, view in top)

//flag: 0 for production, 1 for testing (testing outputs messages to
terminal)
//NOTE:if you run the program in test mode in the background, it's a
pain to stop it,
//so just delete the DriveAlive.txt file and it'll abort within 10 seconds
int appstatus = 0;

int main(int argc, char *argv[]) {

//vars
char *tmpfile = "DriveAlive.txt";
FILE *ftmp;

//interval from command line
int interval = atoi(argv[1]);
while(interval < 15 || interval > 300)
{
printf("Enter file check interval in seconds (15 to 300): ");
scanf("%d", &interval);
}

//testing uses 10sec interval
if(appstatus == 1) { interval = 10; }

//write temp file
time_t t;
time(&t);
ftmp = fopen(tmpfile, "w");
fprintf(ftmp,"This file was created by DriveAlive on %s",ctime(&t));
fclose(ftmp);
if(appstatus == 1) { printf("DriveAlive was started in test mode.\n"); }

//program runs continuously
//testing: show countdown between file checks
int cnt = interval;
while (1) {
for (int i = 0; i < interval; i++) {
//testing
if(appstatus == 1) {
printf("\r%d seconds until next file access ",cnt);
fflush(stdout);
}

//pause then decrement countdown counter
sleep(1);
cnt--;

//access file at end of countdown
if(cnt == 0) {
cnt = interval;
ftmp = fopen(tmpfile, "r");
if(ftmp == NULL){
printf("\nDriveAlive stopped: failed to open DriveAlive.txt\n");
return -1;
}
fclose(ftmp);
if(appstatus == 1) { printf("\rtesting: file was opened \n"); }
}
}
}

return(0);

}

========================================================================

Thoughts on the code?

Other strategies for keeping the disk from spinning down?

Thanks

Re: Keeping hard drive from spinning down

<tha2n3$g6h$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23396&group=comp.lang.c#23396

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!fs4vz7lwhQCwq5L3H1slGg.user.46.165.242.75.POSTED!not-for-mail
From: Jens_Stu...@nowhere.net (Jens Stuckelberger)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sat, 1 Oct 2022 18:59:48 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <tha2n3$g6h$1@gioia.aioe.org>
References: <7jYZK.65924$JZK5.56932@fx03.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="16593"; posting-host="fs4vz7lwhQCwq5L3H1slGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Jens Stuckelberger - Sat, 1 Oct 2022 18:59 UTC

On Sat, 1 Oct 2022 10:40:04 -0400, DFS wrote:

> Got a new mobo and chip: AMD 5600G (w/ integrated graphics). Windows
> 10. Was having a weird issue: my SATA HDD was spinning up every time I
> needed to read or write a file.
>
> Couldn't hear it spin down, but it must have because it almost always
> made a high-pitched whine accompanied by a short system hang when I
> tried to open or save a file after some minutes.
>
> The drive is old but not nearly full, and passed all SMART tests.
>
> To keep it spinning I wrote a little program to read/access a file every
> so often. This program runs continuously until killed.

Doesn't Windows have something similar to the Unix touch command?

Re: Keeping hard drive from spinning down

<jprhmkFp8v8U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23397&group=comp.lang.c#23397

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bow...@montana.com (rbowman)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sat, 1 Oct 2022 13:11:15 -0600
Lines: 21
Message-ID: <jprhmkFp8v8U1@mid.individual.net>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <tha2n3$g6h$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net U/mAtNYHqsLCi21TlnwQHAaiFw8ARu3jrbvCRTSVpbyU+/SYZ1
Cancel-Lock: sha1:ai6CTCyPLkzpA+ijKWx73MVtlC0=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-US
In-Reply-To: <tha2n3$g6h$1@gioia.aioe.org>
 by: rbowman - Sat, 1 Oct 2022 19:11 UTC

On 10/1/22 12:59, Jens Stuckelberger wrote:
> On Sat, 1 Oct 2022 10:40:04 -0400, DFS wrote:
>
>> Got a new mobo and chip: AMD 5600G (w/ integrated graphics). Windows
>> 10. Was having a weird issue: my SATA HDD was spinning up every time I
>> needed to read or write a file.
>>
>> Couldn't hear it spin down, but it must have because it almost always
>> made a high-pitched whine accompanied by a short system hang when I
>> tried to open or save a file after some minutes.
>>
>> The drive is old but not nearly full, and passed all SMART tests.
>>
>> To keep it spinning I wrote a little program to read/access a file every
>> so often. This program runs continuously until killed.
>
> Doesn't Windows have something similar to the Unix touch command?
>

You can change the timestamps in PowerShell but I don't know if it would
be any easier.

Re: Keeping hard drive from spinning down

<Xw0_K.138032$479c.11738@fx48.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23398&group=comp.lang.c#23398

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx48.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Keeping hard drive from spinning down
Newsgroups: comp.lang.c
References: <7jYZK.65924$JZK5.56932@fx03.iad> <tha2n3$g6h$1@gioia.aioe.org>
Lines: 21
Message-ID: <Xw0_K.138032$479c.11738@fx48.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sat, 01 Oct 2022 19:27:51 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sat, 01 Oct 2022 19:27:51 GMT
X-Received-Bytes: 1547
 by: Scott Lurndal - Sat, 1 Oct 2022 19:27 UTC

Jens Stuckelberger <Jens_Stuckelberger@nowhere.net> writes:
>On Sat, 1 Oct 2022 10:40:04 -0400, DFS wrote:
>
>> Got a new mobo and chip: AMD 5600G (w/ integrated graphics). Windows
>> 10. Was having a weird issue: my SATA HDD was spinning up every time I
>> needed to read or write a file.
>>
>> Couldn't hear it spin down, but it must have because it almost always
>> made a high-pitched whine accompanied by a short system hang when I
>> tried to open or save a file after some minutes.
>>
>> The drive is old but not nearly full, and passed all SMART tests.
>>
>> To keep it spinning I wrote a little program to read/access a file every
>> so often. This program runs continuously until killed.
>
> Doesn't Windows have something similar to the Unix touch command?
>

All touch does is update the last accessed date in the inode. Which may
never be flushed from the in-memory cache until the filesystem is sync'd.

Re: Keeping hard drive from spinning down

<touch-20221001205353@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23399&group=comp.lang.c#23399

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: 1 Oct 2022 19:55:36 GMT
Organization: Stefan Ram
Lines: 32
Expires: 1 Sep 2023 11:59:58 GMT
Message-ID: <touch-20221001205353@ram.dialup.fu-berlin.de>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <tha2n3$g6h$1@gioia.aioe.org> <jprhmkFp8v8U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de 7Cwez6NsVWPB0xrFV3guNgyfFs/SzyyIC7fODMkRxk3ENE
X-Copyright: (C) Copyright 2022 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Sat, 1 Oct 2022 19:55 UTC

rbowman <bowman@montana.com> writes:
>On 10/1/22 12:59, Jens Stuckelberger wrote:
>>Doesn't Windows have something similar to the Unix touch command?
>You can change the timestamps in PowerShell but I don't know if it would
>be any easier.

This is comp.lang.c. So here is a quick attempt at a "touch"
that's supposed to change the modification time of an existing
file "example.txt":

#include "windows.h"
#include "tchar.h"
int _tmain( int argc, LPTSTR argv[] )
{ FILETIME newFileTime;
LPFILETIME pAccessTime = NULL, pModifyTime = NULL;
HANDLE hFile;
hFile = CreateFile
( "example.txt", GENERIC_READ | GENERIC_WRITE, 0, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
GetSystemTimeAsFileTime( &newFileTime );
pModifyTime = &newFileTime;
SetFileTime( hFile, NULL, pAccessTime, pModifyTime );
CloseHandle( hFile); }

. If the content does not matter, one also can execute the command

echo abc >example.txt

. This also should keep the file (the creation time will not be
changed) and update the modification time.

Re: Keeping hard drive from spinning down

<875yh3s2k7.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23400&group=comp.lang.c#23400

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sat, 01 Oct 2022 21:37:28 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <875yh3s2k7.fsf@bsb.me.uk>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <tha2n3$g6h$1@gioia.aioe.org>
<jprhmkFp8v8U1@mid.individual.net>
<touch-20221001205353@ram.dialup.fu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="d03308ad99a497d5544694cf75f35425";
logging-data="1497413"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+39Gd4Z1UBtsPKF6+DTj/QbqhFAk3mqwk="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Z32JRKNW3Rj5x7mgQdt8jSCuMqk=
sha1:mM2a74P7hbukQxFSQFDI6U8WynE=
X-BSB-Auth: 1.76d57eca6a13d77d930e.20221001213728BST.875yh3s2k7.fsf@bsb.me.uk
 by: Ben Bacarisse - Sat, 1 Oct 2022 20:37 UTC

ram@zedat.fu-berlin.de (Stefan Ram) writes:

> rbowman <bowman@montana.com> writes:
>>On 10/1/22 12:59, Jens Stuckelberger wrote:
>>>Doesn't Windows have something similar to the Unix touch command?
>>You can change the timestamps in PowerShell but I don't know if it would
>>be any easier.
>
> This is comp.lang.c.

Yes, and this thread is a great example of why posting in the wrong
group is unhelpful. The OP needs to be directed to a group that can
explain how to get either the OS or the drive to do what's wanted. I
can't do that because I don't know any technically proficient Windows
groups.

(On Linux, I used to use the hdparm command, but that was years ago
before I had SSDs.)

> So here is a quick attempt at a "touch"
> that's supposed to change the modification time of an existing
> file "example.txt":

This might work or it might not. But even if it does work, it's not
really the right way to do it.

--
Ben.

Re: Keeping hard drive from spinning down PLO

<tha9fb$1djk1$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23401&group=comp.lang.c#23401

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: polco...@gmail.com (olcott)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down PLO
Date: Sat, 1 Oct 2022 15:55:07 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <tha9fb$1djk1$2@dont-email.me>
References: <7jYZK.65924$JZK5.56932@fx03.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 1 Oct 2022 20:55:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="bad4b3a567316e1b025f900b5e2ad417";
logging-data="1494657"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19z6jVN53+k1H5FbikeqcM4"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:QQ24bVpHqdrrov4Df3dRZp9PZsc=
Content-Language: en-US
In-Reply-To: <7jYZK.65924$JZK5.56932@fx03.iad>
 by: olcott - Sat, 1 Oct 2022 20:55 UTC

On 10/1/2022 9:40 AM, DFS wrote:
> Got a new mobo and chip: AMD 5600G (w/ integrated graphics).  Windows
> 10.  Was having a weird issue: my SATA HDD was spinning up every time I
> needed to read or write a file.
>

Control Panel
search for "power"
under edit power plan choose
Change advanced power settings
Hard disk
Turn off hard disk after
Setting (Minutes): 20 // mine is set to 20 minutes

--
Copyright 2022 Pete Olcott "Talent hits a target no one else can hit;
Genius hits a target no one else can see." Arthur Schopenhauer

Re: Keeping hard drive from spinning down

<thaoq6$1uen$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23403&group=comp.lang.c#23403

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!Be2tmgKbrUiSvvT25/KcFg.user.46.165.242.75.POSTED!not-for-mail
From: non...@add.invalid (Manfred)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sun, 2 Oct 2022 03:16:53 +0200
Organization: Aioe.org NNTP Server
Message-ID: <thaoq6$1uen$1@gioia.aioe.org>
References: <7jYZK.65924$JZK5.56932@fx03.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="63959"; posting-host="Be2tmgKbrUiSvvT25/KcFg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Manfred - Sun, 2 Oct 2022 01:16 UTC

On 10/1/2022 4:40 PM, DFS wrote:
[...]
> Thoughts on the code?
>
> Other strategies for keeping the disk from spinning down?
>
> Thanks

As Ben mentioned, the code is the wrong solution for the problem.
The main problem is that you appear to have the timings of powersave
mode wrong .
This is controlled by the OS and BIOS, so that's where to look for a
solution.
One wild guess: see that Windows and the BIOS correctly identify the
drive as HDD, not SSD.

Incidentally, this has nothing to do with the C language.
Or, it may be considered pertinent wrt the assumption of C being
considered a synonym for IT.

Re: Keeping hard drive from spinning down PLO

<thaq89$1ipv3$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23404&group=comp.lang.c#23404

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: polco...@gmail.com (olcott)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down PLO
Date: Sat, 1 Oct 2022 20:41:28 -0500
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <thaq89$1ipv3$1@dont-email.me>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <thaoq6$1uen$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 2 Oct 2022 01:41:29 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e29f28c36bb6da352519f26551480a17";
logging-data="1664995"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bjOZncPbrLRuBt9zJvNOK"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:8F2/ubadJOvdvMKljCutkgXvyfg=
Content-Language: en-US
In-Reply-To: <thaoq6$1uen$1@gioia.aioe.org>
 by: olcott - Sun, 2 Oct 2022 01:41 UTC

On 10/1/2022 8:16 PM, Manfred wrote:
> On 10/1/2022 4:40 PM, DFS wrote:
> [...]
>> Thoughts on the code?
>>
>> Other strategies for keeping the disk from spinning down?
>>
>> Thanks
>
> As Ben mentioned, the code is the wrong solution for the problem.
> The main problem is that you appear to have the timings of powersave
> mode wrong .
> This is controlled by the OS and BIOS, so that's where to look for a
> solution.
> One wild guess: see that Windows and the BIOS correctly identify the
> drive as HDD, not SSD.

Control Panel
search for "power"
under edit power plan choose
Change advanced power settings
Hard disk
Turn off hard disk after
Setting (Minutes): 20 // mine is set to 20 minutes

--
Copyright 2022 Pete Olcott "Talent hits a target no one else can hit;
Genius hits a target no one else can see." Arthur Schopenhauer

Re: Keeping hard drive from spinning down

<thbk6k$1ndk$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23405&group=comp.lang.c#23405

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!YpWFAxXpXJOozLnmFNLutA.user.46.165.242.75.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sun, 2 Oct 2022 05:04:19 -0400
Organization: Aioe.org NNTP Server
Message-ID: <thbk6k$1ndk$1@gioia.aioe.org>
References: <7jYZK.65924$JZK5.56932@fx03.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="56756"; posting-host="YpWFAxXpXJOozLnmFNLutA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
X-Mozilla-News-Host: news://nntp.aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Paul - Sun, 2 Oct 2022 09:04 UTC

On 10/1/2022 10:40 AM, DFS wrote:
> Got a new mobo and chip: AMD 5600G (w/ integrated graphics).  Windows 10.  Was having a weird issue: my SATA HDD was spinning up every time I needed to read or write a file.
>
> Couldn't hear it spin down, but it must have because it almost always made a high-pitched whine accompanied by a short system hang when I tried to open or save a file after some minutes.
>
> The drive is old but not nearly full, and passed all SMART tests.
>
> To keep it spinning I wrote a little program to read/access a file every so often.  This program runs continuously until killed.
>
> Note: it writes a tiny file to the directory it resides in.
>
> ========================================================================
> DriveAlive.c
> ========================================================================
>
> Other strategies for keeping the disk from spinning down?
>
> Thanks

http://disablehddapm.blogspot.com/p/1.html

https://linux.die.net/man/8/hdparm

I'm not convinced these things always work, as the
power management on some drive firmwares is quite
busted. AAM was the subject of some legal
action years ago, which is why it is such a mess.
It's not clear how they decide what to do with APM.

https://www.engadget.com/2009-12-29-ex-seagate-employee-claims-the-company-stole-mit-research-tried.html

I don't really know if the APM indicator is reliable
or not, or is programmable when you want it to be programmed.

[Picture]

https://i.postimg.cc/52qPGfmr/disk-sampler.gif

*******

Switching to an SSD, you won't hear a thing. If they
go through PM states, it likely won't take long.
With nothing to spin, there's nothing to spin up.

"Idle wake up time, microseconds"

https://images.anandtech.com/graphs/graph12165/pm-wake-up.png

Paul

Re: Keeping hard drive from spinning down (the actual correct answer)

<thc9qk$1nd9v$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23409&group=comp.lang.c#23409

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: polco...@gmail.com (olcott)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down (the actual correct answer)
Date: Sun, 2 Oct 2022 10:13:23 -0500
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <thc9qk$1nd9v$2@dont-email.me>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <thbk6k$1ndk$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 2 Oct 2022 15:13:24 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="cec26d8e86b60a18be9134ca5cbc81e1";
logging-data="1815871"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/b7HWQDJHyNGW4DPZjKsTb"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:K/Vn9n8yfICbBp46qSjSmZRzK0A=
Content-Language: en-US
In-Reply-To: <thbk6k$1ndk$1@gioia.aioe.org>
 by: olcott - Sun, 2 Oct 2022 15:13 UTC

On 10/2/2022 4:04 AM, Paul wrote:
> On 10/1/2022 10:40 AM, DFS wrote:
>> Got a new mobo and chip: AMD 5600G (w/ integrated graphics).  Windows
>> 10.  Was having a weird issue: my SATA HDD was spinning up every time
>> I needed to read or write a file.
>>
>> Couldn't hear it spin down, but it must have because it almost always
>> made a high-pitched whine accompanied by a short system hang when I
>> tried to open or save a file after some minutes.
>>
>> The drive is old but not nearly full, and passed all SMART tests.
>>
>> To keep it spinning I wrote a little program to read/access a file
>> every so often.  This program runs continuously until killed.
>>
>> Note: it writes a tiny file to the directory it resides in.
>>
>> ========================================================================
>> DriveAlive.c
>> ========================================================================
>>
>> Other strategies for keeping the disk from spinning down?
>>
>> Thanks
>
> http://disablehddapm.blogspot.com/p/1.html
>
> https://linux.die.net/man/8/hdparm
>
> I'm not convinced these things always work, as the
> power management on some drive firmwares is quite
> busted. AAM was the subject of some legal
> action years ago, which is why it is such a mess.
> It's not clear how they decide what to do with APM.
>
> https://www.engadget.com/2009-12-29-ex-seagate-employee-claims-the-company-stole-mit-research-tried.html
>
> I don't really know if the APM indicator is reliable
> or not, or is programmable when you want it to be programmed.
>
>    [Picture]
>
>    https://i.postimg.cc/52qPGfmr/disk-sampler.gif
>
> *******
>
> Switching to an SSD, you won't hear a thing. If they
> go through PM states, it likely won't take long.
> With nothing to spin, there's nothing to spin up.
>
> "Idle wake up time, microseconds"
>
> https://images.anandtech.com/graphs/graph12165/pm-wake-up.png
>
>   Paul
>
>

Control Panel
search for "power"
under edit power plan choose
Change advanced power settings
Hard disk
Turn off hard disk after
Setting (Minutes): 20 // mine is set to 20 minutes

--

--
Copyright 2022 Pete Olcott "Talent hits a target no one else can hit;
Genius hits a target no one else can see." Arthur Schopenhauer

Re: Keeping hard drive from spinning down

<thcp2g$1q2fa$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23411&group=comp.lang.c#23411

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Keeping hard drive from spinning down
Date: Sun, 2 Oct 2022 12:33:35 -0700
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <thcp2g$1q2fa$1@dont-email.me>
References: <7jYZK.65924$JZK5.56932@fx03.iad> <thbk6k$1ndk$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 2 Oct 2022 19:33:36 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5412eda8bebf7133dca51c76c8239cf1";
logging-data="1903082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+udsv73BXhsdKgUqAhhjj4UyllAS0QRhs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.1
Cancel-Lock: sha1:jG0FqyIkUAgn1POrKoCnhq39kjE=
Content-Language: en-US
In-Reply-To: <thbk6k$1ndk$1@gioia.aioe.org>
 by: Chris M. Thomasson - Sun, 2 Oct 2022 19:33 UTC

On 10/2/2022 2:04 AM, Paul wrote:
> On 10/1/2022 10:40 AM, DFS wrote:
>> Got a new mobo and chip: AMD 5600G (w/ integrated graphics).  Windows
>> 10.  Was having a weird issue: my SATA HDD was spinning up every time
>> I needed to read or write a file.
>>
>> Couldn't hear it spin down, but it must have because it almost always
>> made a high-pitched whine accompanied by a short system hang when I
>> tried to open or save a file after some minutes.
>>
>> The drive is old but not nearly full, and passed all SMART tests.
>>
>> To keep it spinning I wrote a little program to read/access a file
>> every so often.  This program runs continuously until killed.
>>
>> Note: it writes a tiny file to the directory it resides in.
>>
>> ========================================================================
>> DriveAlive.c
>> ========================================================================
>>
>> Other strategies for keeping the disk from spinning down?
>>
>> Thanks
>
> http://disablehddapm.blogspot.com/p/1.html
>
> https://linux.die.net/man/8/hdparm
>
> I'm not convinced these things always work, as the
> power management on some drive firmwares is quite
> busted. AAM was the subject of some legal
> action years ago, which is why it is such a mess.
> It's not clear how they decide what to do with APM.
[...]

I cannot remember right now, but I think the ALOM on a Sun server would
work with the hard drives? I had a SunFire T2000 server for a while,
then I sold it. I won it for a CoolThreads contest.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor