[gentoo-user] Re: What spins a drive up?

2005-06-10 Thread Remy Blank


Mark Knecht wrote:
> On 6/9/05, Remy Blank <[EMAIL PROTECTED]> wrote:
>>Alternatively, you could setup syslog-ng to send the logs to another
>>machine.
> 
>I don't know about this. I seem to have gone backwards:
> 
> 1) If I turn off syslog-ng then it seems that the drive never spinds
> up, so I guess at the root it's a syslog-ng issue.

That makes sense.

> 2) When I re-enabled syslog-ng it now started spinning up every 10
> minutes, where it used to spin up once an hour.

Is that with block_dump enabled? Then it is normal. Writes to the log
file by syslog-ng, for all the "WRITE" and "dirtied inode" entries will
be buffered, and flushed to disk every 600s (commit=600 in mount), i.e.
10 minutes.

If it's with block_dump disabled, then I don't know.

> I think I'd do jsut as well to put the log file on the MythTV backend
> machine and make it mountable as an NFS mount. That just means a bit
> of network traffic every 10 minutes, right? I'm planning on placing
> the major portion of portage on an NFS mount also so that the frontend
> box doesn't carry that file load and I only have to burden the net
> with 5 downloads a day. I guess my use of Gentoo has gotten large
> enough that I need to start doing stuff like that.

Logging over NFS is ok, but you could directly log to the syslog-ng
daemon of the backend machine. For this, you need to setup a destination
on your MythTV machine:

  destination backend { tcp(192.168.1.1, 514); };

where you should replace 192.168.1.1 by the IP address of the backend,
and use that destination instead of the current file destination, for
example:

  log { source(src); destination(backend); };

On the backend, you need to add a "tcp" entry to the source directive:

source src {
unix-stream("/dev/log");
pipe("/proc/kmsg");
tcp(0.0.0.0, 514);
internal();
};

Finally, you'll have to open your firewall to allow incoming connections
on the backend to port 514 (if you have a firewall on the backend). You
could also use UDP if it's more convenient for you.

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Mark Knecht
On 6/9/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> 
> 
> Mark Knecht wrote:
> >I got back to looking at this item this evening. dmesg is now full of 
> > this:
> >
> > pdflush(185): WRITE block 14947712 on hda3
> > syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> > syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> > kjournald(869): WRITE block 14947712 on hda3
> > kjournald(869): WRITE block 9112 on hda3
> > kjournald(869): WRITE block 9120 on hda3
> > kjournald(869): WRITE block 9128 on hda3
> > pdflush(185): WRITE block 14947712 on hda3
> > syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> > kjournald(869): WRITE block 9136 on hda3
> > kjournald(869): WRITE block 9144 on hda3
> > syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> > syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> >
> > Is this the logger stuff you were speaking of, or is there a clue here
> > to what's spinning the drive back up?
> 
> Yes, that's it. The kernel is generating a WRITE message, which
> syslog-ng writes to its log file, which generates a new WRITE message,
> and so on.
> 
> You should setup syslog-ng so that WRITE, READ and "dirtied inode"
> messages are not recorded in your log files, but still printed on the
> console. The interesting messages are the "dirtied inode" ones, they
> tell you which processes write data to the disk. kjournald is the
> journaling process for ext3, it won't trigger if no other process is
> writing to the disk.
> 
> Alternatively, you could setup syslog-ng to send the logs to another
> machine.
> 
> -- Remy

Hi Remy,
   I don't know about this. I seem to have gone backwards:

1) If I turn off syslog-ng then it seems that the drive never spinds
up, so I guess at the root it's a syslog-ng issue.

2) When I re-enabled syslog-ng it now started spinning up every 10
minutes, where it used to spin up once an hour.

3) I have edited /etc/syslog-ng/syslog-ng.conf and it does have the
longer time setting:

options {
chain_hostnames(off);
sync(0);

# The default action of syslog-ng 1.6.0 is to log a STATS line
# to the file every 10 minutes.  That's pretty ugly after a while.
# Change it to every 12 hours so you get a nice daily update of
# how many messages syslog-ng missed (0).
stats(43200);
};

I'm flummoxed...

I think I'd do jsut as well to put the log file on the MythTV backend
machine and make it mountable as an NFS mount. That just means a bit
of network traffic every 10 minutes, right? I'm planning on placing
the major portion of portage on an NFS mount also so that the frontend
box doesn't carry that file load and I only have to burden the net
with 5 downloads a day. I guess my use of Gentoo has gotten large
enough that I need to start doing stuff like that.

Cheers,
Mark

Jun  9 05:31:29 myth11 vi(6387): dirtied inode 115455 (.viminfo.tmp) on hda3
Jun  9 05:31:29 myth11 vi(6387): dirtied inode 114702 (?) on hda3
Jun  9 05:40:46 myth11 kjournald(869): WRITE block 14947776 on hda3
Jun  9 05:40:46 myth11 kjournald(869): WRITE block 14947784 on hda3
Jun  9 05:40:46 myth11 kjournald(869): WRITE block 1885232 on hda3
Jun  9 05:40:46 myth11 kjournald(869): WRITE block 1885240 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10160 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10168 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10176 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10184 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10192 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10200 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10208 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10216 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10224 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10232 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10240 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10248 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10256 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10264 on hda3
Jun  9 05:40:50 myth11 kjournald(869): WRITE block 10272 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 14947784 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 0 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 8 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 1835024 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 1835032 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 1835040 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 1835224 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 1851392 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 14942208 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 14942216 on hda3
Jun  9 05:40:52 myth11 pdflush(185): WRITE block 14942

Re: [gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Neil Bothwick
On Thu, 09 Jun 2005 15:05:00 +0200, Remy Blank wrote:

> > I have no such file, so I guess 5 must be a default.
> > 
> > Which package installs /etc/laptop_mode?
> 
> Sorry, I meant /etc/laptop-mode/laptop-mode.conf:

I have no /etc/lap
 
> [EMAIL PROTECTED] joe $ qpkg -v -f /etc/laptop-mode/laptop-mode.conf
> app-laptop/laptop-mode-tools-1.05 *

No wonder I don't have that, the ebuild has no ppc keyword. I'll try
keywording it and see what i can break :)


-- 
Neil Bothwick

"He's dead, Jim.  You get his phaser, I'll grab his wallet."


pgpWaKFCCu1Q1.pgp
Description: PGP signature


[gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Remy Blank
Neil Bothwick wrote:
> On Thu, 09 Jun 2005 10:07:58 +0200, Remy Blank wrote:
>>>What do the numbers mean? On my iBook it switches between 0 and 5.
>>
>>It seems to be the value configured in /etc/laptop_mode/
>>laptop_mode.conf:
> 
> 
> I have no such file, so I guess 5 must be a default.
> 
> Which package installs /etc/laptop_mode?

Sorry, I meant /etc/laptop-mode/laptop-mode.conf:

[EMAIL PROTECTED] joe $ qpkg -v -f /etc/laptop-mode/laptop-mode.conf
app-laptop/laptop-mode-tools-1.05 *

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Neil Bothwick
On Thu, 09 Jun 2005 10:07:58 +0200, Remy Blank wrote:

> > What do the numbers mean? On my iBook it switches between 0 and 5.
> 
> It seems to be the value configured in /etc/laptop_mode/
> laptop_mode.conf:

I have no such file, so I guess 5 must be a default.

Which package installs /etc/laptop_mode?


-- 
Neil Bothwick

My Go this  amn keyboar  oesn't have any  's.


pgpWd5ZxX7YcI.pgp
Description: PGP signature


[gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Remy Blank


Neil Bothwick wrote:
> On Thu, 09 Jun 2005 00:10:55 +0800, Ow Mun Heng wrote:
>>>myth11 root # cat /proc/sys/vm/laptop_mode
>>>2
>>
>>Mine says 0 (cause I'm on AC right now)
>>
>>on Battery it changes to 2
> 
> 
> What do the numbers mean? On my iBook it switches between 0 and 5.

It seems to be the value configured in /etc/laptop_mode/laptop_mode.conf:

# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
LM_SECONDS_BEFORE_SYNC=2

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: What spins a drive up?

2005-06-09 Thread Remy Blank


Mark Knecht wrote:
>I got back to looking at this item this evening. dmesg is now full of this:
> 
> pdflush(185): WRITE block 14947712 on hda3
> syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> kjournald(869): WRITE block 14947712 on hda3
> kjournald(869): WRITE block 9112 on hda3
> kjournald(869): WRITE block 9120 on hda3
> kjournald(869): WRITE block 9128 on hda3
> pdflush(185): WRITE block 14947712 on hda3
> syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> kjournald(869): WRITE block 9136 on hda3
> kjournald(869): WRITE block 9144 on hda3
> syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> syslog-ng(5341): dirtied inode 936889 (messages) on hda3
> 
> Is this the logger stuff you were speaking of, or is there a clue here
> to what's spinning the drive back up?

Yes, that's it. The kernel is generating a WRITE message, which
syslog-ng writes to its log file, which generates a new WRITE message,
and so on.

You should setup syslog-ng so that WRITE, READ and "dirtied inode"
messages are not recorded in your log files, but still printed on the
console. The interesting messages are the "dirtied inode" ones, they
tell you which processes write data to the disk. kjournald is the
journaling process for ext3, it won't trigger if no other process is
writing to the disk.

Alternatively, you could setup syslog-ng to send the logs to another
machine.

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Richard Fish
Mark Knecht wrote:

>pdflush(185): WRITE block 14947712 on hda3
>syslog-ng(5341): dirtied inode 936889 (messages) on hda3
>syslog-ng(5341): dirtied inode 936889 (messages) on hda3
>kjournald(869): WRITE block 14947712 on hda3
>kjournald(869): WRITE block 9112 on hda3
>kjournald(869): WRITE block 9120 on hda3
>kjournald(869): WRITE block 9128 on hda3
>pdflush(185): WRITE block 14947712 on hda3
>syslog-ng(5341): dirtied inode 936889 (messages) on hda3
>kjournald(869): WRITE block 9136 on hda3
>kjournald(869): WRITE block 9144 on hda3
>syslog-ng(5341): dirtied inode 936889 (messages) on hda3
>syslog-ng(5341): dirtied inode 936889 (messages) on hda3
>
>  
>

Yep, syslog is what is causing the disk to spin up.

Have a look at /var/log/messages and see what it is writing out.  If it
is messages like this:

Jun  8 19:15:32 carcharias syslog-ng[9232]: STATS: dropped 0

You can stop those by commenting out the "stats" option in
/etc/syslog-ng/syslog-ng.conf.  Or if you don't want any messages file
at all (I don't think I would recommend this, BTW), you can change the line:

destination messages { file("/var/log/messages"); };

to be /dev/null.

HTH.

-Richard

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Mark Knecht
On 6/8/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> Mark Knecht wrote:
> >I'm experimenting with leaving a drive turned off in a MythTV
> > frontend. I have laptop_mode turned on with whatever it has for
> > default settings. I have vixie-cron turned off. Once an hour it seems
> > that the drive still spins up for about 1 minute. How can I find
> > what's causing that and at least make it more infrequent? I see
> > nothing in /var/log/messages nor anything in dmesg. Is there somewhere
> > else I should look?
> 
> Laptop mode prevents the drive spinning up when a process writes to the
> disk. However, in its default configuration, it is configured to flush
> the cached writes after a maximum of 600 seconds (MAX_AGE). On my
> laptop, this means that the drive does spin up about every 10 minues.
> 
> Your could try enabling "block dumping" in the kernel:
> 
> echo 1 >/proc/sys/vm/block_dump
> 
> After that, the kernel will dump every block read and write to the
> kernel log. This might allow you to identify which file is accessed and
> which process causes the access.
> 
> Note that you better switch off any logger before doing that (or at
> least log through the network), otherwise you'll see all the writes from
> the logger itself...
> 
> HTH.
> -- Remy

Remy,
   I got back to looking at this item this evening. dmesg is now full of this:

pdflush(185): WRITE block 14947712 on hda3
syslog-ng(5341): dirtied inode 936889 (messages) on hda3
syslog-ng(5341): dirtied inode 936889 (messages) on hda3
kjournald(869): WRITE block 14947712 on hda3
kjournald(869): WRITE block 9112 on hda3
kjournald(869): WRITE block 9120 on hda3
kjournald(869): WRITE block 9128 on hda3
pdflush(185): WRITE block 14947712 on hda3
syslog-ng(5341): dirtied inode 936889 (messages) on hda3
kjournald(869): WRITE block 9136 on hda3
kjournald(869): WRITE block 9144 on hda3
syslog-ng(5341): dirtied inode 936889 (messages) on hda3
syslog-ng(5341): dirtied inode 936889 (messages) on hda3

Is this the logger stuff you were speaking of, or is there a clue here
to what's spinning the drive back up?

I'm shutting off syslog-ng for a little while to see if the results
are considerably different.

Thanks,
Mark

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Mark Knecht
On 6/8/05, Peter Ruskin <[EMAIL PROTECTED]> wrote:
> On Wednesday 08 June 2005 16:35, Mark Knecht wrote:
> > myth11 root # echo 1>/proc/sys/vm/block_dump
> > myth11 root # cat /proc/sys/vm/block_dump
> > 0
> 
> [18:03 [EMAIL PROTECTED] ~]
> # echo 1 > /proc/sys/vm/block_dump
> [18:03 [EMAIL PROTECTED] ~]
> # cat /proc/sys/vm/block_dump
> 1
> 
> Note the spaces.
> 
> --
> Peter

I did not know that Peter. Thanks.
- Mark

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Neil Bothwick
On Thu, 09 Jun 2005 00:10:55 +0800, Ow Mun Heng wrote:

> > myth11 root # cat /proc/sys/vm/laptop_mode
> > 2
> 
> Mine says 0 (cause I'm on AC right now)
> 
> on Battery it changes to 2

What do the numbers mean? On my iBook it switches between 0 and 5.


-- 
Neil Bothwick

... "I'm simply not a nice girl", she whispered tartly.


pgp6sOUheEyP4.pgp
Description: PGP signature


Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Ow Mun Heng
On Wed, 2005-06-08 at 08:53 -0700, Mark Knecht wrote:
> On 6/8/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> > Mark Knecht wrote:
> > > One setting I noticed rereading the config file was this one:
> > >
> > > 
> > >  Enable laptop mode always, not just when on battery?
> > > # (This will still disable laptop mode when the battery almost runs out.)
> > > LAPTOP_MODE_ALWAYS_ON=0
> > > 
> > >
> > > Since it's a desktop machine it would seem that maybe laptop mode is
> > > not totally operational since I would never be on battery?  I'm trying
> > > changing this to '1' and seeing what happens.
> > 
> > You can check if laptop_mode is enabled with:
> > 
> > cat /proc/sys/vm/laptop_mode
> > 
> > My desktop says 0 (disabled), and my laptop says 2 (enabled, but no idea
> > why it's not 1).
> 
> Mine says '2' also:
> 
> myth11 root # cat /proc/sys/vm/laptop_mode
> 2
> myth11 root #

Mine says 0 (cause I'm on AC right now)

on Battery it changes to 2

/usr/sbin/laptop_mode
case "$KLEVEL" in
"2.4")
echo 1> /proc/sys/vm/laptop_mode
echo "30 500 0 0 $AGE $AGE 60 20 0" > /proc/sys/vm/bdflush
 ;;
"2.6")
echo "$LM_SECONDS_BEFORE_SYNC"  > /proc/sys/vm/laptop_mode

where LM_Seconds is 2


> /dev/hda3 on / type ext3 (rw,noatime,commit=600)
> So this should be spinning the drive up every 10 minutes? I don't
> think that's happening but I'll watch it carefully for another 30
> minutes.

The 10 minutes is a guide only. It just tries to collect all the writes
and make it write only once.

Try this script if you want to find out what's happening or how long is
the spinup/down.

$ cat HDtest.sh 
#!/bin/sh
c0=0
c1=0
n=0
f0=standby
d0=`date +%s`
while true
do
   f1=`hdparm -C /dev/hda | grep 'drive state' | awk '{print $4}'`
   if test $f0 != $f1
   then
  d1=`date +%s`
  c=`expr $d1 - $d0`
  if test $f0 = standby
  then
 c0=`expr $c0 + $c`
  else
 c1=`expr $c1 + $c`
 n=`expr $n + 1`
  fi
  echo "[`date +%X`]  $c seconds in $f0 mode. ($c0 s standby/$c1 s
active/$n spinups)"
  f0=$f1
  d0=$d1
   fi
   sleep 1
done


-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 00:10:54 up 12:23, 10 users, load average: 0.56, 0.62, 0.56 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Ow Mun Heng
On Wed, 2005-06-08 at 17:31 +0200, Remy Blank wrote:
> Mark Knecht wrote:
> > One setting I noticed rereading the config file was this one:
> > 
> > 
> >  Enable laptop mode always, not just when on battery?
> > # (This will still disable laptop mode when the battery almost runs out.)
> > LAPTOP_MODE_ALWAYS_ON=0
> > 
> > 
> > Since it's a desktop machine it would seem that maybe laptop mode is
> > not totally operational since I would never be on battery?  I'm trying
> > changing this to '1' and seeing what happens.
> 
> You can check if laptop_mode is enabled with:
> 
> cat /proc/sys/vm/laptop_mode
> 
> My desktop says 0 (disabled), and my laptop says 2 (enabled, but no idea
> why it's not 1).
> 
> Moreover, if your filesystem is ext3, a "mount" shows the following:
> 
> /dev/hda6 on / type ext3 (rw,noatime,acl,user_xattr,commit=600)
> 
> where the important part is the option "commit=600", the value being
> your MAX_AGE parameter. If laptop_mode is disabled, the parameter is
> either absent or "commit=0".


If you really want to learn more about power management in Linux, I
suggest you google for laptop_mode or you can read the article in the
spanking new MyOSS Magazine at http://mag.my-opensource.org which lists
all the links in one place for your perusal.

otherwise.. try cat /usr/share/doc/laptop[tab]/laptop-mode.gz

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 00:02:49 up 12:15, 9 users, load average: 0.60, 0.54, 0.53 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Mark Knecht
On 6/8/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> Mark Knecht wrote:
> > One setting I noticed rereading the config file was this one:
> >
> > 
> >  Enable laptop mode always, not just when on battery?
> > # (This will still disable laptop mode when the battery almost runs out.)
> > LAPTOP_MODE_ALWAYS_ON=0
> > 
> >
> > Since it's a desktop machine it would seem that maybe laptop mode is
> > not totally operational since I would never be on battery?  I'm trying
> > changing this to '1' and seeing what happens.
> 
> You can check if laptop_mode is enabled with:
> 
> cat /proc/sys/vm/laptop_mode
> 
> My desktop says 0 (disabled), and my laptop says 2 (enabled, but no idea
> why it's not 1).

Mine says '2' also:

myth11 root # cat /proc/sys/vm/laptop_mode
2
myth11 root #

> 
> Moreover, if your filesystem is ext3, a "mount" shows the following:
> 
> /dev/hda6 on / type ext3 (rw,noatime,acl,user_xattr,commit=600)
> 
> where the important part is the option "commit=600", the value being
> your MAX_AGE parameter. If laptop_mode is disabled, the parameter is
> either absent or "commit=0".

So it aappears here to be enabled:

myth11 root # mount
/dev/hda3 on / type ext3 (rw,noatime,commit=600)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev type ramfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
myth11 root #

So this should be spinning the drive up every 10 minutes? I don't
think that's happening but I'll watch it carefully for another 30
minutes.

Thanks,
Mark

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Remy Blank
Mark Knecht wrote:
> One setting I noticed rereading the config file was this one:
> 
> 
>  Enable laptop mode always, not just when on battery?
> # (This will still disable laptop mode when the battery almost runs out.)
> LAPTOP_MODE_ALWAYS_ON=0
> 
> 
> Since it's a desktop machine it would seem that maybe laptop mode is
> not totally operational since I would never be on battery?  I'm trying
> changing this to '1' and seeing what happens.

You can check if laptop_mode is enabled with:

cat /proc/sys/vm/laptop_mode

My desktop says 0 (disabled), and my laptop says 2 (enabled, but no idea
why it's not 1).

Moreover, if your filesystem is ext3, a "mount" shows the following:

/dev/hda6 on / type ext3 (rw,noatime,acl,user_xattr,commit=600)

where the important part is the option "commit=600", the value being
your MAX_AGE parameter. If laptop_mode is disabled, the parameter is
either absent or "commit=0".

-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Mark Knecht
On 6/8/05, Ow Mun Heng <[EMAIL PROTECTED]> wrote:
> On Wed, 2005-06-08 at 07:03 -0700, Mark Knecht wrote:
> > Thanks Remy. I'll investigate some of these settings.
> >
> > As I sat here at 6:48AM (roughly) the drive spun up again. I was
> > watching 'top' but couldn't tell what process used more CPU.
> 
> you can choose to use debug more in laptop mode.
> 
> #echo 1 > /proc/sys/vm/block_dump

Maybe I don't have something configured correctly in the kernel? this
didn't work.

myth11 root # echo 1>/proc/sys/vm/block_dump
myth11 root # cat /proc/sys/vm/block_dump
0
myth11 root #
> 
> and by the way, it should be which process used the HD isn't it?

 Well, yes, true, but my thought was that nothing would use
the HD without using the CPU. Clearly I Was wrong or it wasn't enough
to push it up and make it visible.

> 
> [This is what happens when ppl top post and I don't read the bottom post
> to reply 1st. So.. I answered the question again. Oh well.. since it's
> already written]

Yeah, sorry...

> 
> > One setting I noticed rereading the config file was this one:
> >
> > 
> >  Enable laptop mode always, not just when on battery?
> > # (This will still disable laptop mode when the battery almost runs out.)
> > LAPTOP_MODE_ALWAYS_ON=0
> > 
> 
> This is just a detection mech. Even though it says it will disable it, I
> don't think it's really doing that. Because there's no cron-job to check
> the remaining level etc.

Uhdoes that mean that cron needs to be running to use laptop_mode
or only to check the battery, etc.?

I looked at crontab -u root/nobody/mark and there were no entries so I
figured I could try turning it off. I had not et figured out how to
determine all the users that might possibly have crontab's.

Thanks,
Mark

-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Ow Mun Heng
On Wed, 2005-06-08 at 07:03 -0700, Mark Knecht wrote:
> Thanks Remy. I'll investigate some of these settings.
> 
> As I sat here at 6:48AM (roughly) the drive spun up again. I was
> watching 'top' but couldn't tell what process used more CPU.

you can choose to use debug more in laptop mode. 

#echo 1 > /proc/sys/vm/block_dump

and by the way, it should be which process used the HD isn't it?

[This is what happens when ppl top post and I don't read the bottom post
to reply 1st. So.. I answered the question again. Oh well.. since it's
already written]

> One setting I noticed rereading the config file was this one:
> 
> 
>  Enable laptop mode always, not just when on battery?
> # (This will still disable laptop mode when the battery almost runs out.)
> LAPTOP_MODE_ALWAYS_ON=0
> 

This is just a detection mech. Even though it says it will disable it, I
don't think it's really doing that. Because there's no cron-job to check
the remaining level etc.



> Since it's a desktop machine it would seem that maybe laptop mode is
> not totally operational since I would never be on battery?  I'm trying
> changing this to '1' and seeing what happens.
> 
> cheers,
> Mark
> 
> On 6/8/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> > Mark Knecht wrote:
> > >I'm experimenting with leaving a drive turned off in a MythTV
> > > frontend. I have laptop_mode turned on with whatever it has for
> > > default settings. I have vixie-cron turned off. Once an hour it seems
> > > that the drive still spins up for about 1 minute. How can I find
> > > what's causing that and at least make it more infrequent? I see
> > > nothing in /var/log/messages nor anything in dmesg. Is there somewhere
> > > else I should look?
> > 
> > Laptop mode prevents the drive spinning up when a process writes to the
> > disk. However, in its default configuration, it is configured to flush
> > the cached writes after a maximum of 600 seconds (MAX_AGE). On my
> > laptop, this means that the drive does spin up about every 10 minues.
> > 
> > Your could try enabling "block dumping" in the kernel:
> > 
> > echo 1 >/proc/sys/vm/block_dump
> > 
> > After that, the kernel will dump every block read and write to the
> > kernel log. This might allow you to identify which file is accessed and
> > which process causes the access.
> > 
> > Note that you better switch off any logger before doing that (or at
> > least log through the network), otherwise you'll see all the writes from
> > the logger itself...

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!! 
Neuromancer 22:25:30 up 10:38, 8 users, load average: 1.35, 1.40, 1.26 


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Mark Knecht
Thanks Remy. I'll investigate some of these settings.

As I sat here at 6:48AM (roughly) the drive spun up again. I was
watching 'top' but couldn't tell what process used more CPU.

One setting I noticed rereading the config file was this one:


 Enable laptop mode always, not just when on battery?
# (This will still disable laptop mode when the battery almost runs out.)
LAPTOP_MODE_ALWAYS_ON=0


Since it's a desktop machine it would seem that maybe laptop mode is
not totally operational since I would never be on battery?  I'm trying
changing this to '1' and seeing what happens.

cheers,
Mark

On 6/8/05, Remy Blank <[EMAIL PROTECTED]> wrote:
> Mark Knecht wrote:
> >I'm experimenting with leaving a drive turned off in a MythTV
> > frontend. I have laptop_mode turned on with whatever it has for
> > default settings. I have vixie-cron turned off. Once an hour it seems
> > that the drive still spins up for about 1 minute. How can I find
> > what's causing that and at least make it more infrequent? I see
> > nothing in /var/log/messages nor anything in dmesg. Is there somewhere
> > else I should look?
> 
> Laptop mode prevents the drive spinning up when a process writes to the
> disk. However, in its default configuration, it is configured to flush
> the cached writes after a maximum of 600 seconds (MAX_AGE). On my
> laptop, this means that the drive does spin up about every 10 minues.
> 
> Your could try enabling "block dumping" in the kernel:
> 
> echo 1 >/proc/sys/vm/block_dump
> 
> After that, the kernel will dump every block read and write to the
> kernel log. This might allow you to identify which file is accessed and
> which process causes the access.
> 
> Note that you better switch off any logger before doing that (or at
> least log through the network), otherwise you'll see all the writes from
> the logger itself...
> 
> HTH.
> -- Remy
> 
> 
> Remove underscore and suffix in reply address for a timely response.
> 
> --
> gentoo-user@gentoo.org mailing list
> 
>

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Re: What spins a drive up?

2005-06-08 Thread Remy Blank
Mark Knecht wrote:
>I'm experimenting with leaving a drive turned off in a MythTV
> frontend. I have laptop_mode turned on with whatever it has for
> default settings. I have vixie-cron turned off. Once an hour it seems
> that the drive still spins up for about 1 minute. How can I find
> what's causing that and at least make it more infrequent? I see
> nothing in /var/log/messages nor anything in dmesg. Is there somewhere
> else I should look?

Laptop mode prevents the drive spinning up when a process writes to the
disk. However, in its default configuration, it is configured to flush
the cached writes after a maximum of 600 seconds (MAX_AGE). On my
laptop, this means that the drive does spin up about every 10 minues.

Your could try enabling "block dumping" in the kernel:

echo 1 >/proc/sys/vm/block_dump

After that, the kernel will dump every block read and write to the
kernel log. This might allow you to identify which file is accessed and
which process causes the access.

Note that you better switch off any logger before doing that (or at
least log through the network), otherwise you'll see all the writes from
the logger itself...

HTH.
-- Remy


Remove underscore and suffix in reply address for a timely response.

-- 
gentoo-user@gentoo.org mailing list