Re: which process is accessing my hard drive?

2004-03-01 Thread François TOURDE
Le 12478ième jour après Epoch,
Matt Price écrivait:

> On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
>> Another thought:  Are you running a journaling file system (i.e. ext3,
>> reiserfs, etc...)?  If so, then kjournald will be running and will
>> periodically write to the disk to keep its journal up to date.
>> 
> I'd thought of that and checked -- it's ext2, at least according to
> fstab.  

Don't forget atime... When ext2/ext3 file is accessed, the atime value
is modified.

I use "/bin/mount xxx -o remount,noatime" when on battery, and restore
to normal when power.

-- 
In the strict scientific sense we all feed on death -- even vegetarians.
-- Spock, "Wolf in the Fold", stardate 3615.4



Re: which process is accessing my hard drive?

2004-03-01 Thread Micha Feigin
On Mon, Mar 01, 2004 at 12:43:24PM -0500, Matt Price wrote:
> On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > Incoming from Matt Price:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > > ps, attached).  But somehow the hard drive keeps spinning back up
> > > spontaneously.  Who's accessing my hard drive??  I don't have the
> > > slightest idea how to find out, or (even better) figure out how to
> > > stop it from happening.  
> > 
> > I may not have your solution, but a couple of points:
> > 
> >   - kswapd, bdflush, klogd _may_ be your problem.
> > 

kswapd and bdflush you need, and they are kernel processes. The problem
is that bdflush runs about every 30 seconds to flush buffers to
disk. Look into laptop-mode like I mentioned in the other email.

stopping klogd is a problem unless you know what you are doing, but you
should add a '-' in front of all log files in /etc/syslog.conf such as
for example:
kern.*  -/var/log/kern.log
This will delay writing to the log files.

> if so, what should I do?  They have such low process numbers I've
> always thought they were all absolutely essential.  Can I mess with
> them?  
> 
> >   - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?
> > 
> 
> > I can see inetd (my exim seems to need it), but if you never ssh
> > _into_ that box, you don't need sshd.  You don't need portmap except
> > if you're connecting to NFS, and xfs seems a waste of resources on a
> > small box except if you're running apps that demand its abilities.
> 
> I actually DO ssh into the laptop sometimes -- not often, but
> sometimes when transfering data I want to work excluseively on my
> desktop... but I ought to be able to turn it off without any problem,
> I'll do that.  
> 

sshd doesn't do any disk access when there are no active connections
afaik.

> I don't really know what xfs is for -- occasionally I do work in a gui
> on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> with them, but if in fact xfs is always unnecessary I'll just get rid
> of it.  I just checked and the only other package apt wants to remove
> with it is x-window-system.  Do you think that makes it safe to remove
> it?  

It is basically safe to remove as X can serve its own fonts locally, xfs
is needed if you want to serve fonts remotely (rarely needed anymore).
You just need to make sure all the fontpath lines are setup properly in
/etc/X11/XF86Config-4

> 
> Portmap I'll get rid of right now.
> 
> well, that's a start -- thanks!
> 
> matt
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
>  
>  +++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 



Re: which process is accessing my hard drive?

2004-03-01 Thread Micha Feigin
On Mon, Mar 01, 2004 at 11:35:55AM -0500, Matt Price wrote:
> 
> Hey folks,
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  
> 
> Can anyone help me with this?
> 

You should look into laptop mode (what kernel are you using?,
2.4.23-pre5 or there abouts and up has it built in). If you have a
kernel that has laptop mode you can do echo 1 > /proc/sys/vm/block_dump
and it will print which processes access the disk.

Also, I am having a problem with emacs now that it keeps saving backups
every 30 seconds or so. Using flyspell in emacs will also keep
accessing the disk when it checks the dictionary for spelling.

> thx,
> matt
> 
>  
>  +++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
Content-Description: output of ps
> USER   PID %CPU %MEM   VSZ  RSS TTY  STAT START   TIME COMMAND
> root 1  0.0  0.4  1484  444 ?S01:27   0:03 init
> root 2  0.0  0.0 00 ?SW   01:27   0:02 [keventd]
> root 3  0.0  0.0 00 ?SWN  01:27   0:00 
> [ksoftirqd_CPU0]
> root 4  0.0  0.0 00 ?SW   01:27   0:01 [kswapd]
> root 5  0.0  0.0 00 ?SW   01:27   0:00 [bdflush]
> root 6  0.0  0.0 00 ?TW   01:27   0:00 [kupdated]
> root 7  0.0  0.0 00 ?SW   01:27   0:01 [khubd]
> daemon 165  0.0  0.3  1600  304 ?S01:27   0:00 /sbin/portmap
> root   254  0.0  0.6  2184  580 ?S01:27   0:00 /sbin/syslogd
> root   257  0.0  0.5  2200  492 ?S01:27   0:00 /sbin/klogd
> root   270  0.0  0.0 00 ?SW   01:27   0:00 [kapmd]
> root   272  0.0  0.5  1484  540 ?S01:27   0:04 /usr/sbin/apmd 
> -P /etc/apm/apmd_proxy --proxy-timeout 30
> root   297  0.0  0.4  2164  452 ?S01:27   0:00 /usr/sbin/inetd
> root   335  0.0  0.5  1500  556 ?S01:27   0:00 /sbin/cardmgr 
> -C config-2.4
> root   362  0.0  0.5  3040  544 ?S01:28   0:00 /usr/sbin/sshd
> root   374  0.0  0.7  4268  732 ?S01:28   0:00 
> /usr/bin/X11/xfs -daemon
> root   438  0.0  0.6    572 ?S01:28   0:00 
> /usr/X11R6/bin/Xprt -ac -pn -nolisten tcp -audit 4 -fp 
> /usr/X11R6/lib/X11/fonts/Type1,/usr/X11R6/lib/X11/fonts/TrueType,/usr/X11R6/lib/X11/fonts/100dpi,/usr/X11R6/lib/X11/fonts/75dpi,/usr/X11R6/lib/X11/fonts/misc
>  :64
> root   450  0.0  0.5  2304  532 ?S01:28   0:00 /sbin/rpc.statd
> root   454  0.0  0.5  1528  528 ?S01:28   0:00 
> /usr/sbin/noflushd -n 5 /dev/hda
> matt   469  0.0  1.5  3436 1440 tty1 S01:28   0:02 -bash
> root   470  0.0  1.4  3424 1404 tty2 S01:28   0:01 -bash
> root   472  0.0  0.4  1480  404 tty4 S01:28   0:00 /sbin/getty 
> 38400 tty4
> root   473  0.0  0.4  1480  404 tty5 S01:28   0:00 /sbin/getty 
> 38400 tty5
> root   474  0.0  0.4  1480  404 tty6 S01:28   0:00 /sbin/getty 
> 38400 tty6
> matt  5749  0.0  1.9  3444 1788 tty3 S03:29   0:00 -bash
> matt  6161  0.2  7.1 10784 6768 tty1 T04:09   1:04 emacs 
> Strassbourg.ll
> matt  7322  0.0  0.8  2848  824 tty1 R11:31   0:00 ps aux



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 12:52:23PM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > 
> > Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> > time using sysctl?  Unfortuantely I don't even really knwo what these 
> > phrases mean
> 
> man sysctl ; man 5 sysctl.conf ; /sbin/sysctl -w 
> kernel.domainname="example.com"

that much I had under control, but I don't know *which* variables to
set -- was hoping someone else might.  

m

> 



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Matt Price wrote:
> Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> time using sysctl?  Unfortuantely I don't even really knwo what these
> phrases mean
> (I can sorta guess)...   I tried "sysctl -a" but the output wasn't
> particularly meaningful to me, and grep -i update produced no output.
> Anyone have ideas here?

Take a look at the laptop-mode script.

What it does is basically this:

MAX_AGE=600# 10 minutes in seconds
DIRTY_RATIO=40 # percentage of dirty pages allowed
AGE=$((100*$MAX_AGE))  # I actually don't know what unit this is ;)
   # but it sould also be 10 minutes
mount -oremount,commit=$MAX_AGE  # for all journaling filesystems
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 "1" > /proc/sys/vm/laptop_mode
 echo "$AGE" > /proc/sys/vm/dirty_writeback_centisecs
 echo "$AGE" > /proc/sys/vm/dirty_expire_centisecs
 echo "$DIRTY_RATIO" > /proc/sys/vm/dirty_ratio
 echo "$DIRTY_RATIO" > /proc/sys/vm/dirty_background_ratio
 ;;
esac

in /etc/sysctl.conf this should look something like this (for 2.4.x):
vm/laptop_mode = 1
vm/bdflush = 30 500 0 0 6 6 60 20 0

HTH,
 Mika



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> 
> Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> time using sysctl?  Unfortuantely I don't even really knwo what these phrases 
> mean

man sysctl ; man 5 sysctl.conf ; /sbin/sysctl -w kernel.domainname="example.com"

> This sounds cool -- though I probably won'th ave an opportunity to
> recompile the kernel in the next little while (among other problems,
> I'm at 97% fulll on /dev/hda...).  But maybe the issues can be fixed

A!  With that little left, I'd be tempted to unsubscribe.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -



Re: which process is accessing my hard drive?

2004-03-01 Thread François TOURDE
Le 12478ième jour après Epoch,
Matt Price écrivait:

> On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
>> Another thought:  Are you running a journaling file system (i.e. ext3,
>> reiserfs, etc...)?  If so, then kjournald will be running and will
>> periodically write to the disk to keep its journal up to date.
>> 
> I'd thought of that and checked -- it's ext2, at least according to
> fstab.  

Don't forget atime... When ext2/ext3 file is accessed, the atime value
is modified.

I use "/bin/mount xxx -o remount,noatime" when on battery, and restore
to normal when power.

-- 
In the strict scientific sense we all feed on death -- even vegetarians.
-- Spock, "Wolf in the Fold", stardate 3615.4


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 07:55:09PM +0100, Mika Fischer wrote:
> Mika Fischer wrote:
> > I don't know the details but I was under the impression that the
> > "laptop-mode" patch to the linux kernel included the ability to have the
> > process waking up the disk logged.
> > 
> > That might come in handy if it's true.
> > 
> > Anyone know more about this?
> 
> Here it is:
> http://www.linuxhq.com/kernel/v2.4/23/Documentation/laptop-mode.txt

This is interesting and also suggests some other possibilities, which
unfortunately I don't quite understand.  Quoting from the text:  

> One problem is the age time of dirty buffers. Linux uses 30 seconds per
> default, so if you dirty any data then flusing of that data will commence
> at most 30 seconds from then. Another is the journal commit interval of
> journalled file systems such as ext3, which is 5 seconds on a stock kernel.
> Both of these are tweakable either from proc/sysctl or as mount options
> though, and thus partly solvable from user space.

> The kernel update daemon (kupdated) also runs at specific intervals, flushing
> old dirty data out. Default is every 5 seconds, this too can be tweaked
> from sysctl.

Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
time using sysctl?  Unfortuantely I don't even really knwo what these phrases 
mean
(I can sorta guess)...   I tried "sysctl -a" but the output wasn't
particularly meaningful to me, and grep -i update produced no output.
Anyone have ideas here?  


> So what does the laptop mode patch do? It attempts to fully utilize the
> hard drive once it has been spun up, flushing the old dirty data out to
> disk. Instead of flushing just the expired data, it will clean everything.
> When a read causes the disk to spin up, we kick off this flushing after
> a few seconds. This means that once the disk spins down again, everything
> is up to date. That allows longer dirty data and journal expire times.

This sounds cool -- though I probably won'th ave an opportunity to
recompile the kernel in the next little while (among other problems,
I'm at 97% fulll on /dev/hda...).  But maybe the issues can be fixed
using sysctl



> 
> HTH,
>  Mika
> 
> 



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Mika Fischer wrote:
> I don't know the details but I was under the impression that the
> "laptop-mode" patch to the linux kernel included the ability to have the
> process waking up the disk logged.
> 
> That might come in handy if it's true.
> 
> Anyone know more about this?

Here it is:
http://www.linuxhq.com/kernel/v2.4/23/Documentation/laptop-mode.txt

HTH,
 Mika



Re: which process is accessing my hard drive?

2004-03-01 Thread Micha Feigin
On Mon, Mar 01, 2004 at 12:43:24PM -0500, Matt Price wrote:
> On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > Incoming from Matt Price:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > > ps, attached).  But somehow the hard drive keeps spinning back up
> > > spontaneously.  Who's accessing my hard drive??  I don't have the
> > > slightest idea how to find out, or (even better) figure out how to
> > > stop it from happening.  
> > 
> > I may not have your solution, but a couple of points:
> > 
> >   - kswapd, bdflush, klogd _may_ be your problem.
> > 

kswapd and bdflush you need, and they are kernel processes. The problem
is that bdflush runs about every 30 seconds to flush buffers to
disk. Look into laptop-mode like I mentioned in the other email.

stopping klogd is a problem unless you know what you are doing, but you
should add a '-' in front of all log files in /etc/syslog.conf such as
for example:
kern.*  -/var/log/kern.log
This will delay writing to the log files.

> if so, what should I do?  They have such low process numbers I've
> always thought they were all absolutely essential.  Can I mess with
> them?  
> 
> >   - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?
> > 
> 
> > I can see inetd (my exim seems to need it), but if you never ssh
> > _into_ that box, you don't need sshd.  You don't need portmap except
> > if you're connecting to NFS, and xfs seems a waste of resources on a
> > small box except if you're running apps that demand its abilities.
> 
> I actually DO ssh into the laptop sometimes -- not often, but
> sometimes when transfering data I want to work excluseively on my
> desktop... but I ought to be able to turn it off without any problem,
> I'll do that.  
> 

sshd doesn't do any disk access when there are no active connections
afaik.

> I don't really know what xfs is for -- occasionally I do work in a gui
> on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> with them, but if in fact xfs is always unnecessary I'll just get rid
> of it.  I just checked and the only other package apt wants to remove
> with it is x-window-system.  Do you think that makes it safe to remove
> it?  

It is basically safe to remove as X can serve its own fonts locally, xfs
is needed if you want to serve fonts remotely (rarely needed anymore).
You just need to make sure all the fontpath lines are setup properly in
/etc/X11/XF86Config-4

> 
> Portmap I'll get rid of right now.
> 
> well, that's a start -- thanks!
> 
> matt
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
>  
>  +++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Micha Feigin
On Mon, Mar 01, 2004 at 11:35:55AM -0500, Matt Price wrote:
> 
> Hey folks,
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  
> 
> Can anyone help me with this?
> 

You should look into laptop mode (what kernel are you using?,
2.4.23-pre5 or there abouts and up has it built in). If you have a
kernel that has laptop mode you can do echo 1 > /proc/sys/vm/block_dump
and it will print which processes access the disk.

Also, I am having a problem with emacs now that it keeps saving backups
every 30 seconds or so. Using flyspell in emacs will also keep
accessing the disk when it checks the dictionary for spelling.

> thx,
> matt
> 
>  
>  +++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
Content-Description: output of ps
> USER   PID %CPU %MEM   VSZ  RSS TTY  STAT START   TIME COMMAND
> root 1  0.0  0.4  1484  444 ?S01:27   0:03 init
> root 2  0.0  0.0 00 ?SW   01:27   0:02 [keventd]
> root 3  0.0  0.0 00 ?SWN  01:27   0:00 [ksoftirqd_CPU0]
> root 4  0.0  0.0 00 ?SW   01:27   0:01 [kswapd]
> root 5  0.0  0.0 00 ?SW   01:27   0:00 [bdflush]
> root 6  0.0  0.0 00 ?TW   01:27   0:00 [kupdated]
> root 7  0.0  0.0 00 ?SW   01:27   0:01 [khubd]
> daemon 165  0.0  0.3  1600  304 ?S01:27   0:00 /sbin/portmap
> root   254  0.0  0.6  2184  580 ?S01:27   0:00 /sbin/syslogd
> root   257  0.0  0.5  2200  492 ?S01:27   0:00 /sbin/klogd
> root   270  0.0  0.0 00 ?SW   01:27   0:00 [kapmd]
> root   272  0.0  0.5  1484  540 ?S01:27   0:04 /usr/sbin/apmd -P 
> /etc/apm/apmd_proxy --proxy-timeout 30
> root   297  0.0  0.4  2164  452 ?S01:27   0:00 /usr/sbin/inetd
> root   335  0.0  0.5  1500  556 ?S01:27   0:00 /sbin/cardmgr -C 
> config-2.4
> root   362  0.0  0.5  3040  544 ?S01:28   0:00 /usr/sbin/sshd
> root   374  0.0  0.7  4268  732 ?S01:28   0:00 /usr/bin/X11/xfs 
> -daemon
> root   438  0.0  0.6    572 ?S01:28   0:00 /usr/X11R6/bin/Xprt 
> -ac -pn -nolisten tcp -audit 4 -fp 
> /usr/X11R6/lib/X11/fonts/Type1,/usr/X11R6/lib/X11/fonts/TrueType,/usr/X11R6/lib/X11/fonts/100dpi,/usr/X11R6/lib/X11/fonts/75dpi,/usr/X11R6/lib/X11/fonts/misc
>  :64
> root   450  0.0  0.5  2304  532 ?S01:28   0:00 /sbin/rpc.statd
> root   454  0.0  0.5  1528  528 ?S01:28   0:00 /usr/sbin/noflushd -n 
> 5 /dev/hda
> matt   469  0.0  1.5  3436 1440 tty1 S01:28   0:02 -bash
> root   470  0.0  1.4  3424 1404 tty2 S01:28   0:01 -bash
> root   472  0.0  0.4  1480  404 tty4 S01:28   0:00 /sbin/getty 38400 tty4
> root   473  0.0  0.4  1480  404 tty5 S01:28   0:00 /sbin/getty 38400 tty5
> root   474  0.0  0.4  1480  404 tty6 S01:28   0:00 /sbin/getty 38400 tty6
> matt  5749  0.0  1.9  3444 1788 tty3 S03:29   0:00 -bash
> matt  6161  0.2  7.1 10784 6768 tty1 T04:09   1:04 emacs Strassbourg.ll
> matt  7322  0.0  0.8  2848  824 tty1 R11:31   0:00 ps aux


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 11:22:35AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > > Incoming from Matt Price:
> > > > 
> > > > I'm trying to set my (aging) laptop up for maximum power
> > > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > > Pretty much the only thing I have running is emacs (see the output of
> > > > ps, attached).  But somehow the hard drive keeps spinning back up
> > > 
> > > I may not have your solution, but a couple of points:
> > > 
> > >   - kswapd, bdflush, klogd _may_ be your problem.
> > 
> > if so, what should I do?  They have such low process numbers I've
> > always thought they were all absolutely essential.  Can I mess with
> > them?  
> 
> _I_ would not futz with those, but there may be other ways to do this
> with tunefs (or its ilk; chattr?).
> 
> > I don't really know what xfs is for -- occasionally I do work in a gui
> > on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> > with them, but if in fact xfs is always unnecessary I'll just get rid
> > of it.  I just checked and the only other package apt wants to remove
> > with it is x-window-system.  Do you think that makes it safe to remove
> > it?  
> 
> "xfs" == "X Font Server".  It's that line in your
> /etc/X11/XF86config-4 that says, "FontPath "unix/:7100"."  If, as you
> say at the top, you don't use X, then you don't need or want xfs.  If,
> as you say here, you use OOo, then you need/want X, and may need/want
> xfs.
sorry, should have been clearer -- MOSTLY I work in the console, esp
when I want to conserve battery power; but sometimes I hook up to the
outlet and use OOo; and in fact I do occasionally NEED to do this,
e.g. this weekend when I need to go somewhere and then print a talk on
someone else's windows computer...  



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Matt Price wrote:
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.
> 
> Can anyone help me with this?

I don't know the details but I was under the impression that the
"laptop-mode" patch to the linux kernel included the ability to have the
process waking up the disk logged.

That might come in handy if it's true.

Anyone know more about this?

Other than that my first guess would be a journaling filesystem.
There's also a shell script included with the patch mentioned above that
sets the time between updates of the journal to 10 minutes.

See for example here: http://lwn.net/Articles/32520/

Cheers,
 Mika



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 12:25:57PM -0500, Curt Howland wrote:
> See what "lsof" (list open files) has to say.
> 
Interesting command.  It seems a little bit beyond me...  is there a
way to sort the output by access time as well?  the list of files is
fairly long -- 258 lines even with a minimum set of processes
running...  
(output attached, hope it's not annoying)

thx,
matt

> Curt-
> 
> On Monday 01 March 2004 11:35, Matt Price wrote:
> > Hey folks,
> >
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I
> > don't use x, and I've gone so far as to shutdown things like cron and
> > atd. Pretty much the only thing I have running is emacs (see the
> > output of ps, attached).  But somehow the hard drive keeps spinning
> > back up spontaneously.  Who's accessing my hard drive??  I don't have
> > the slightest idea how to find out, or (even better) figure out how
> > to stop it from happening.
> >
> > Can anyone help me with this?
> >
> > thx,
> > matt
> 



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 12:52:23PM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > 
> > Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> > time using sysctl?  Unfortuantely I don't even really knwo what these phrases mean
> 
> man sysctl ; man 5 sysctl.conf ; /sbin/sysctl -w kernel.domainname="example.com"

that much I had under control, but I don't know *which* variables to
set -- was hoping someone else might.  

m

> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > Incoming from Matt Price:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > > ps, attached).  But somehow the hard drive keeps spinning back up
> > 
> > I may not have your solution, but a couple of points:
> > 
> >   - kswapd, bdflush, klogd _may_ be your problem.
> 
> if so, what should I do?  They have such low process numbers I've
> always thought they were all absolutely essential.  Can I mess with
> them?  

_I_ would not futz with those, but there may be other ways to do this
with tunefs (or its ilk; chattr?).

> I don't really know what xfs is for -- occasionally I do work in a gui
> on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> with them, but if in fact xfs is always unnecessary I'll just get rid
> of it.  I just checked and the only other package apt wants to remove
> with it is x-window-system.  Do you think that makes it safe to remove
> it?  

"xfs" == "X Font Server".  It's that line in your
/etc/X11/XF86config-4 that says, "FontPath "unix/:7100"."  If, as you
say at the top, you don't use X, then you don't need or want xfs.  If,
as you say here, you use OOo, then you need/want X, and may need/want
xfs.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 11:14:40AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> > > On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > > > 
> > > > I'm trying to set my (aging) laptop up for maximum power
> > > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > > Pretty much the only thing I have running is emacs (see the output of
> > > 
> > > emacs, eh?  Well, that explains it...  You must not have enough GB of
> > 
> > I don't go to church meetings -- it's just that I learned emacs key
> > bindings bakc hwne I was a wee student, & find vi confusing
> 
> Especially if you're not running X, consider jed.  It's a smaller,
> quicker, mostly compatible emacs clone based around slang.
... but doesn't have longlines-mode, I don't think, which I use b/c
I'm writing papers, not code...  I wish it did!  Then I'd use it!

m


> 
> 



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Matt Price wrote:
> Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> time using sysctl?  Unfortuantely I don't even really knwo what these
> phrases mean
> (I can sorta guess)...   I tried "sysctl -a" but the output wasn't
> particularly meaningful to me, and grep -i update produced no output.
> Anyone have ideas here?

Take a look at the laptop-mode script.

What it does is basically this:

MAX_AGE=600# 10 minutes in seconds
DIRTY_RATIO=40 # percentage of dirty pages allowed
AGE=$((100*$MAX_AGE))  # I actually don't know what unit this is ;)
   # but it sould also be 10 minutes
mount -oremount,commit=$MAX_AGE  # for all journaling filesystems
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 "1" > /proc/sys/vm/laptop_mode
 echo "$AGE" > /proc/sys/vm/dirty_writeback_centisecs
 echo "$AGE" > /proc/sys/vm/dirty_expire_centisecs
 echo "$DIRTY_RATIO" > /proc/sys/vm/dirty_ratio
 echo "$DIRTY_RATIO" > /proc/sys/vm/dirty_background_ratio
 ;;
esac

in /etc/sysctl.conf this should look something like this (for 2.4.x):
vm/laptop_mode = 1
vm/bdflush = 30 500 0 0 6 6 60 20 0

HTH,
 Mika


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> > On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > 
> > emacs, eh?  Well, that explains it...  You must not have enough GB of
> 
> I don't go to church meetings -- it's just that I learned emacs key
> bindings bakc hwne I was a wee student, & find vi confusing

Especially if you're not running X, consider jed.  It's a smaller,
quicker, mostly compatible emacs clone based around slang.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > Hey folks,
> > 
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I don't
> > use x, and I've gone so far as to shutdown things like cron and atd.
> > Pretty much the only thing I have running is emacs (see the output of
> 
> emacs, eh?  Well, that explains it...  You must not have enough GB of
> memory to keep from swapping parts of emacs in and out of swap space all
> the time.  Switch to an editor that isn't so huge (like vim :o).  (OK,
> if it wasn't obvious, I'm kidding.  I don't want to incur the wrath of
> the church of emacs :o)
> 

I don't go to church meetings -- it's just that I learned emacs key
bindings bakc hwne I was a wee student, & find vi confusing

> Seriously though, if you are limited on memory, and you're not running
> X, I'd suggest that you not run xfs and Xprt either.

done, thx

> 
> > ps, attached).  But somehow the hard drive keeps spinning back up
> > spontaneously.  Who's accessing my hard drive??  I don't have the
> > slightest idea how to find out, or (even better) figure out how to
> > stop it from happening.  
> 
> Another thought:  Are you running a journaling file system (i.e. ext3,
> reiserfs, etc...)?  If so, then kjournald will be running and will
> periodically write to the disk to keep its journal up to date.
> 
I'd thought of that and checked -- it's ext2, at least according to
fstab.  


> Cheers!
thx,
m



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> 
> Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
> time using sysctl?  Unfortuantely I don't even really knwo what these phrases mean

man sysctl ; man 5 sysctl.conf ; /sbin/sysctl -w kernel.domainname="example.com"

> This sounds cool -- though I probably won'th ave an opportunity to
> recompile the kernel in the next little while (among other problems,
> I'm at 97% fulll on /dev/hda...).  But maybe the issues can be fixed

A!  With that little left, I'd be tempted to unsubscribe.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Brett Johnson
On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> Hey folks,
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of

emacs, eh?  Well, that explains it...  You must not have enough GB of
memory to keep from swapping parts of emacs in and out of swap space all
the time.  Switch to an editor that isn't so huge (like vim :o).  (OK,
if it wasn't obvious, I'm kidding.  I don't want to incur the wrath of
the church of emacs :o)

Seriously though, if you are limited on memory, and you're not running
X, I'd suggest that you not run xfs and Xprt either.

> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  

Another thought:  Are you running a journaling file system (i.e. ext3,
reiserfs, etc...)?  If so, then kjournald will be running and will
periodically write to the disk to keep its journal up to date.

Cheers!
-- 
Brett Johnson <[EMAIL PROTECTED]>
   -  i  n  v  e  n  t  -



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > 
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I don't
> > use x, and I've gone so far as to shutdown things like cron and atd.
> > Pretty much the only thing I have running is emacs (see the output of
> > ps, attached).  But somehow the hard drive keeps spinning back up
> > spontaneously.  Who's accessing my hard drive??  I don't have the
> > slightest idea how to find out, or (even better) figure out how to
> > stop it from happening.  
> 
> I may not have your solution, but a couple of points:
> 
>   - kswapd, bdflush, klogd _may_ be your problem.
> 
if so, what should I do?  They have such low process numbers I've
always thought they were all absolutely essential.  Can I mess with
them?  

>   - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?
> 

> I can see inetd (my exim seems to need it), but if you never ssh
> _into_ that box, you don't need sshd.  You don't need portmap except
> if you're connecting to NFS, and xfs seems a waste of resources on a
> small box except if you're running apps that demand its abilities.

I actually DO ssh into the laptop sometimes -- not often, but
sometimes when transfering data I want to work excluseively on my
desktop... but I ought to be able to turn it off without any problem,
I'll do that.  

I don't really know what xfs is for -- occasionally I do work in a gui
on Openoffice -- since fonts were so hard to set up I'm loathe to mess
with them, but if in fact xfs is always unnecessary I'll just get rid
of it.  I just checked and the only other package apt wants to remove
with it is x-window-system.  Do you think that makes it safe to remove
it?  

Portmap I'll get rid of right now.

well, that's a start -- thanks!

matt



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  

I may not have your solution, but a couple of points:

  - kswapd, bdflush, klogd _may_ be your problem.

  - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?

I can see inetd (my exim seems to need it), but if you never ssh
_into_ that box, you don't need sshd.  You don't need portmap except
if you're connecting to NFS, and xfs seems a waste of resources on a
small box except if you're running apps that demand its abilities.

fwiw.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 07:55:09PM +0100, Mika Fischer wrote:
> Mika Fischer wrote:
> > I don't know the details but I was under the impression that the
> > "laptop-mode" patch to the linux kernel included the ability to have the
> > process waking up the disk logged.
> > 
> > That might come in handy if it's true.
> > 
> > Anyone know more about this?
> 
> Here it is:
> http://www.linuxhq.com/kernel/v2.4/23/Documentation/laptop-mode.txt

This is interesting and also suggests some other possibilities, which
unfortunately I don't quite understand.  Quoting from the text:  

> One problem is the age time of dirty buffers. Linux uses 30 seconds per
> default, so if you dirty any data then flusing of that data will commence
> at most 30 seconds from then. Another is the journal commit interval of
> journalled file systems such as ext3, which is 5 seconds on a stock kernel.
> Both of these are tweakable either from proc/sysctl or as mount options
> though, and thus partly solvable from user space.

> The kernel update daemon (kupdated) also runs at specific intervals, flushing
> old dirty data out. Default is every 5 seconds, this too can be tweaked
> from sysctl.

Anyone know how to tweak kupdated or the "dirty buffer" "flushing"
time using sysctl?  Unfortuantely I don't even really knwo what these phrases mean
(I can sorta guess)...   I tried "sysctl -a" but the output wasn't
particularly meaningful to me, and grep -i update produced no output.
Anyone have ideas here?  


> So what does the laptop mode patch do? It attempts to fully utilize the
> hard drive once it has been spun up, flushing the old dirty data out to
> disk. Instead of flushing just the expired data, it will clean everything.
> When a read causes the disk to spin up, we kick off this flushing after
> a few seconds. This means that once the disk spins down again, everything
> is up to date. That allows longer dirty data and journal expire times.

This sounds cool -- though I probably won'th ave an opportunity to
recompile the kernel in the next little while (among other problems,
I'm at 97% fulll on /dev/hda...).  But maybe the issues can be fixed
using sysctl



> 
> HTH,
>  Mika
> 
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Enrico Zini
On Mon, Mar 01, 2004 at 11:35:55AM -0500, Matt Price wrote:

> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  
> Can anyone help me with this?

Some time ago I had the same problem and came out with this script, that lists
files sorted by access time:

#!/bin/sh
# Script ideas courtesy of Jeff Coppock
#   from the debian-laptop list
 
TIMEBACK=${1:-5}
 
EXCLUDE="-path /usr -prune -o -path /var/src -prune -o -path /var/opt/usr 
-prune -o"
WORKFILE=/ram/report_disk_access
 
cat /dev/null > $WORKFILE
 
for P in / /var
do
find $P $EXCLUDE -mount -printf "%As %Ts %p\n" >> $WORKFILE
#   echo "$P List:"
#   find $P $EXCLUDE -mount -type d
 
#   echo "$P: Accessed in the last $TIMEBACK minutes:"
#   find $P $EXCLUDE -mount -amin $TIMEBACK
 
#   echo "$P: Modified in the last $TIMEBACK minutes:"
#   find $P $EXCLUDE -mount -mmin $TIMEBACK
done


Ciao,

Enrico



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Mika Fischer wrote:
> I don't know the details but I was under the impression that the
> "laptop-mode" patch to the linux kernel included the ability to have the
> process waking up the disk logged.
> 
> That might come in handy if it's true.
> 
> Anyone know more about this?

Here it is:
http://www.linuxhq.com/kernel/v2.4/23/Documentation/laptop-mode.txt

HTH,
 Mika


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 11:22:35AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > > Incoming from Matt Price:
> > > > 
> > > > I'm trying to set my (aging) laptop up for maximum power
> > > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > > Pretty much the only thing I have running is emacs (see the output of
> > > > ps, attached).  But somehow the hard drive keeps spinning back up
> > > 
> > > I may not have your solution, but a couple of points:
> > > 
> > >   - kswapd, bdflush, klogd _may_ be your problem.
> > 
> > if so, what should I do?  They have such low process numbers I've
> > always thought they were all absolutely essential.  Can I mess with
> > them?  
> 
> _I_ would not futz with those, but there may be other ways to do this
> with tunefs (or its ilk; chattr?).
> 
> > I don't really know what xfs is for -- occasionally I do work in a gui
> > on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> > with them, but if in fact xfs is always unnecessary I'll just get rid
> > of it.  I just checked and the only other package apt wants to remove
> > with it is x-window-system.  Do you think that makes it safe to remove
> > it?  
> 
> "xfs" == "X Font Server".  It's that line in your
> /etc/X11/XF86config-4 that says, "FontPath "unix/:7100"."  If, as you
> say at the top, you don't use X, then you don't need or want xfs.  If,
> as you say here, you use OOo, then you need/want X, and may need/want
> xfs.
sorry, should have been clearer -- MOSTLY I work in the console, esp
when I want to conserve battery power; but sometimes I hook up to the
outlet and use OOo; and in fact I do occasionally NEED to do this,
e.g. this weekend when I need to go somewhere and then print a talk on
someone else's windows computer...  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Mika Fischer
Matt Price wrote:
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.
> 
> Can anyone help me with this?

I don't know the details but I was under the impression that the
"laptop-mode" patch to the linux kernel included the ability to have the
process waking up the disk logged.

That might come in handy if it's true.

Anyone know more about this?

Other than that my first guess would be a journaling filesystem.
There's also a shell script included with the patch mentioned above that
sets the time between updates of the journal to 10 minutes.

See for example here: http://lwn.net/Articles/32520/

Cheers,
 Mika


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 12:25:57PM -0500, Curt Howland wrote:
> See what "lsof" (list open files) has to say.
> 
Interesting command.  It seems a little bit beyond me...  is there a
way to sort the output by access time as well?  the list of files is
fairly long -- 258 lines even with a minimum set of processes
running...  
(output attached, hope it's not annoying)

thx,
matt

> Curt-
> 
> On Monday 01 March 2004 11:35, Matt Price wrote:
> > Hey folks,
> >
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I
> > don't use x, and I've gone so far as to shutdown things like cron and
> > atd. Pretty much the only thing I have running is emacs (see the
> > output of ps, attached).  But somehow the hard drive keeps spinning
> > back up spontaneously.  Who's accessing my hard drive??  I don't have
> > the slightest idea how to find out, or (even better) figure out how
> > to stop it from happening.
> >
> > Can anyone help me with this?
> >
> > thx,
> > matt
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> > Incoming from Matt Price:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > > ps, attached).  But somehow the hard drive keeps spinning back up
> > 
> > I may not have your solution, but a couple of points:
> > 
> >   - kswapd, bdflush, klogd _may_ be your problem.
> 
> if so, what should I do?  They have such low process numbers I've
> always thought they were all absolutely essential.  Can I mess with
> them?  

_I_ would not futz with those, but there may be other ways to do this
with tunefs (or its ilk; chattr?).

> I don't really know what xfs is for -- occasionally I do work in a gui
> on Openoffice -- since fonts were so hard to set up I'm loathe to mess
> with them, but if in fact xfs is always unnecessary I'll just get rid
> of it.  I just checked and the only other package apt wants to remove
> with it is x-window-system.  Do you think that makes it safe to remove
> it?  

"xfs" == "X Font Server".  It's that line in your
/etc/X11/XF86config-4 that says, "FontPath "unix/:7100"."  If, as you
say at the top, you don't use X, then you don't need or want xfs.  If,
as you say here, you use OOo, then you need/want X, and may need/want
xfs.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 11:14:40AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> > > On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > > > 
> > > > I'm trying to set my (aging) laptop up for maximum power
> > > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > > Pretty much the only thing I have running is emacs (see the output of
> > > 
> > > emacs, eh?  Well, that explains it...  You must not have enough GB of
> > 
> > I don't go to church meetings -- it's just that I learned emacs key
> > bindings bakc hwne I was a wee student, & find vi confusing
> 
> Especially if you're not running X, consider jed.  It's a smaller,
> quicker, mostly compatible emacs clone based around slang.
... but doesn't have longlines-mode, I don't think, which I use b/c
I'm writing papers, not code...  I wish it did!  Then I'd use it!

m


> 
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> > On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > > 
> > > I'm trying to set my (aging) laptop up for maximum power
> > > efficiency.  using hdparm, I set the spindown time very short, I don't
> > > use x, and I've gone so far as to shutdown things like cron and atd.
> > > Pretty much the only thing I have running is emacs (see the output of
> > 
> > emacs, eh?  Well, that explains it...  You must not have enough GB of
> 
> I don't go to church meetings -- it's just that I learned emacs key
> bindings bakc hwne I was a wee student, & find vi confusing

Especially if you're not running X, consider jed.  It's a smaller,
quicker, mostly compatible emacs clone based around slang.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 10:49:26AM -0700, Brett Johnson wrote:
> On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> > Hey folks,
> > 
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I don't
> > use x, and I've gone so far as to shutdown things like cron and atd.
> > Pretty much the only thing I have running is emacs (see the output of
> 
> emacs, eh?  Well, that explains it...  You must not have enough GB of
> memory to keep from swapping parts of emacs in and out of swap space all
> the time.  Switch to an editor that isn't so huge (like vim :o).  (OK,
> if it wasn't obvious, I'm kidding.  I don't want to incur the wrath of
> the church of emacs :o)
> 

I don't go to church meetings -- it's just that I learned emacs key
bindings bakc hwne I was a wee student, & find vi confusing

> Seriously though, if you are limited on memory, and you're not running
> X, I'd suggest that you not run xfs and Xprt either.

done, thx

> 
> > ps, attached).  But somehow the hard drive keeps spinning back up
> > spontaneously.  Who's accessing my hard drive??  I don't have the
> > slightest idea how to find out, or (even better) figure out how to
> > stop it from happening.  
> 
> Another thought:  Are you running a journaling file system (i.e. ext3,
> reiserfs, etc...)?  If so, then kjournald will be running and will
> periodically write to the disk to keep its journal up to date.
> 
I'd thought of that and checked -- it's ext2, at least according to
fstab.  


> Cheers!
thx,
m


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Brett Johnson
On Mon, 2004-03-01 at 09:35, Matt Price wrote:
> Hey folks,
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of

emacs, eh?  Well, that explains it...  You must not have enough GB of
memory to keep from swapping parts of emacs in and out of swap space all
the time.  Switch to an editor that isn't so huge (like vim :o).  (OK,
if it wasn't obvious, I'm kidding.  I don't want to incur the wrath of
the church of emacs :o)

Seriously though, if you are limited on memory, and you're not running
X, I'd suggest that you not run xfs and Xprt either.

> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  

Another thought:  Are you running a journaling file system (i.e. ext3,
reiserfs, etc...)?  If so, then kjournald will be running and will
periodically write to the disk to keep its journal up to date.

Cheers!
-- 
Brett Johnson <[EMAIL PROTECTED]>
   -  i  n  v  e  n  t  -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Matt Price
On Mon, Mar 01, 2004 at 10:27:41AM -0700, s. keeling wrote:
> Incoming from Matt Price:
> > 
> > I'm trying to set my (aging) laptop up for maximum power
> > efficiency.  using hdparm, I set the spindown time very short, I don't
> > use x, and I've gone so far as to shutdown things like cron and atd.
> > Pretty much the only thing I have running is emacs (see the output of
> > ps, attached).  But somehow the hard drive keeps spinning back up
> > spontaneously.  Who's accessing my hard drive??  I don't have the
> > slightest idea how to find out, or (even better) figure out how to
> > stop it from happening.  
> 
> I may not have your solution, but a couple of points:
> 
>   - kswapd, bdflush, klogd _may_ be your problem.
> 
if so, what should I do?  They have such low process numbers I've
always thought they were all absolutely essential.  Can I mess with
them?  

>   - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?
> 

> I can see inetd (my exim seems to need it), but if you never ssh
> _into_ that box, you don't need sshd.  You don't need portmap except
> if you're connecting to NFS, and xfs seems a waste of resources on a
> small box except if you're running apps that demand its abilities.

I actually DO ssh into the laptop sometimes -- not often, but
sometimes when transfering data I want to work excluseively on my
desktop... but I ought to be able to turn it off without any problem,
I'll do that.  

I don't really know what xfs is for -- occasionally I do work in a gui
on Openoffice -- since fonts were so hard to set up I'm loathe to mess
with them, but if in fact xfs is always unnecessary I'll just get rid
of it.  I just checked and the only other package apt wants to remove
with it is x-window-system.  Do you think that makes it safe to remove
it?  

Portmap I'll get rid of right now.

well, that's a start -- thanks!

matt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread s. keeling
Incoming from Matt Price:
> 
> I'm trying to set my (aging) laptop up for maximum power
> efficiency.  using hdparm, I set the spindown time very short, I don't
> use x, and I've gone so far as to shutdown things like cron and atd.
> Pretty much the only thing I have running is emacs (see the output of
> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  

I may not have your solution, but a couple of points:

  - kswapd, bdflush, klogd _may_ be your problem.

  - do you really want portmap, inetd, xfs, and sshd running on a laptop?!?

I can see inetd (my exim seems to need it), but if you never ssh
_into_ that box, you don't need sshd.  You don't need portmap except
if you're connecting to NFS, and xfs seems a waste of resources on a
small box except if you're running apps that demand its abilities.

fwiw.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)   http://www.spots.ab.ca/~keeling 
- -


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: which process is accessing my hard drive?

2004-03-01 Thread Enrico Zini
On Mon, Mar 01, 2004 at 11:35:55AM -0500, Matt Price wrote:

> ps, attached).  But somehow the hard drive keeps spinning back up
> spontaneously.  Who's accessing my hard drive??  I don't have the
> slightest idea how to find out, or (even better) figure out how to
> stop it from happening.  
> Can anyone help me with this?

Some time ago I had the same problem and came out with this script, that lists
files sorted by access time:

#!/bin/sh
# Script ideas courtesy of Jeff Coppock
#   from the debian-laptop list
 
TIMEBACK=${1:-5}
 
EXCLUDE="-path /usr -prune -o -path /var/src -prune -o -path /var/opt/usr -prune -o"
WORKFILE=/ram/report_disk_access
 
cat /dev/null > $WORKFILE
 
for P in / /var
do
find $P $EXCLUDE -mount -printf "%As %Ts %p\n" >> $WORKFILE
#   echo "$P List:"
#   find $P $EXCLUDE -mount -type d
 
#   echo "$P: Accessed in the last $TIMEBACK minutes:"
#   find $P $EXCLUDE -mount -amin $TIMEBACK
 
#   echo "$P: Modified in the last $TIMEBACK minutes:"
#   find $P $EXCLUDE -mount -mmin $TIMEBACK
done


Ciao,

Enrico


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]