Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Garrett Cooper
On Apr 14, 2006, at 2:48 PM, David J Brooks wrote: On Friday 14 April 2006 16:43, Garrett Cooper wrote: On Apr 14, 2006, at 1:21 PM, Bigby Findrake wrote: On Fri, 14 Apr 2006, Bigby Findrake wrote: I'm sorry, I'm an idiot - the script, in its current incarnation, needs to be modified. It's

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread David J Brooks
On Friday 14 April 2006 16:43, Garrett Cooper wrote: > On Apr 14, 2006, at 1:21 PM, Bigby Findrake wrote: > > On Fri, 14 Apr 2006, Bigby Findrake wrote: > > > > I'm sorry, I'm an idiot - the script, in its current incarnation, > > needs to be modified. It's doing exactly what you don't want it to

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Garrett Cooper
On Apr 14, 2006, at 1:21 PM, Bigby Findrake wrote: On Fri, 14 Apr 2006, Bigby Findrake wrote: I'm sorry, I'm an idiot - the script, in its current incarnation, needs to be modified. It's doing exactly what you don't want it to do - it will shut down the disk if there was activity. The if

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Bigby Findrake
On Fri, 14 Apr 2006, Bigby Findrake wrote: I'm sorry, I'm an idiot - the script, in its current incarnation, needs to be modified. It's doing exactly what you don't want it to do - it will shut down the disk if there was activity. The if statement should read: if [ $STATUS -ne 0 ] On Fri,

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Bigby Findrake
On Fri, 14 Apr 2006, Garrett Cooper wrote: Yes. Recently accessed or is being accessed. -Garrett Well, for a shell-script-hack, which (i) requires no new kernel and (ii) could be fairly portable but (iii) could conceivably miss some activity, you could do something like the following: #!/b

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Garrett Cooper
Greg 'groggy' Lehey wrote: On Friday, 14 April 2006 at 1:27:18 -0700, Garrett Cooper wrote: Hello again list, Just wondering if there was any way where I could possibly tie into the kernel or do something where I could determine whether or not a disk is currently 'in use'. Problem: I'm

Re: Determining whether or not a SCSI disk is in use

2006-04-14 Thread Greg 'groggy' Lehey
On Friday, 14 April 2006 at 1:27:18 -0700, Garrett Cooper wrote: > Hello again list, >Just wondering if there was any way where I could possibly tie into > the kernel or do something where I could determine whether or not a disk > is currently 'in use'. >Problem: I'm trying to spin down my

Determining whether or not a SCSI disk is in use

2006-04-14 Thread Garrett Cooper
Hello again list, Just wondering if there was any way where I could possibly tie into the kernel or do something where I could determine whether or not a disk is currently 'in use'. Problem: I'm trying to spin down my disks periodically via a cronjob to save energy, reduce noise, and heat