Hi! My English isn't so good, so something isn't simple to say for me
I have installed fc7 on my acer laptop(but the problem hasn't anything common with laptops. so please don't move the topic). I want to be able to turn off sda when it isn't in use. I need it, for example, when I watch a film(using battery) with mplayer -cache 200000. So rather big part of the film is in my ram. So it will be good to turn off hdd for a while(until the cache is empty). Or it's useful when laptop is running on battery & idle.
I can do it with hdparm -S 5 /dev/sda (turn off sda after 30 seconds of idle).
BUT! there is something, that always uses hdd! I can't understand what is it.
I tried to use lsof, but I can't receive anything helpful from it(its output is veeeeeeeery long). I just can't understand how to use it so find that process, which always works with hdd.(there is large man & my english isn't so good to understand everything written there)
this is ps -ax
Quote:
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 init [5]
2 ? S< 0:00 [kthreadd]
3 ? S< 0:00 [migration/0]
4 ? S< 0:00 [ksoftirqd/0]
5 ? S< 0:00 [watchdog/0]
6 ? S< 0:00 [events/0]
7 ? S< 0:00 [khelper]
48 ? S< 0:00 [kblockd/0]
49 ? S< 0:00 [kacpid]
50 ? S< 0:00 [kacpi_notify]
156 ? S< 0:00 [cqueue/0]
157 ? S< 0:00 [ksuspend_usbd]
160 ? S< 0:00 [khubd]
162 ? S< 0:00 [kseriod]
181 ? S 0:00 [pdflush]
182 ? S 0:00 [pdflush]
183 ? S< 0:00 [kswapd0]
235 ? S< 0:00 [aio/0]
371 ? S< 0:00 [pccardd]
382 ? S< 0:00 [kpsmoused]
410 ? S< 0:00 [ata/0]
411 ? S< 0:00 [ata_aux]
416 ? S< 0:00 [scsi_eh_0]
417 ? S< 0:00 [scsi_eh_1]
423 ? S< 0:00 [kjournald]
451 ? S< 0:00 [kauditd]
488 ? S<s 0:00 /sbin/udevd -d
1054 ? S< 0:00 [tifm]
1102 ? S< 0:00 [ipw2200/0]
1357 ? S< 0:00 [kmpathd/0]
1390 ? Ss 0:00 /sbin/mount.ntfs-3g /dev/sda1 /mnt/sda1 -o rw
1393 ? Ss 0:00 /sbin/mount.ntfs-3g /dev/sda2 /mnt/sda2 -o rw
1396 ? Ss 0:00 /sbin/mount.ntfs-3g /dev/sda3 /mnt/sda3 -o rw
1623 ? S< 0:00 [kondemand/0]
2028 ? Ss 0:00 syslogd -m 0
2031 ? Ss 0:00 klogd -x
2073 ? Ss 0:00 rpcbind
2094 ? Ss 0:00 rpc.statd
2121 ? Ss 0:00 rpc.idmapd
2140 ? Ss 0:00 dbus-daemon --system
2159 ? Ss 0:00 pcscd
2181 ? Ss 0:00 /usr/bin/hidd --server
2196 ? Ssl 0:00 automount
2215 ? Ss 0:00 /usr/sbin/acpid
2226 ? Ss 0:00 cupsd
2240 ? Ss 0:00 /usr/sbin/sshd
2260 ? Ss 0:00 sendmail: accepting connections
2268 ? Ss 0:00 sendmail: Queue runner@01:00:00 for /var/spool/client
2280 ? Ssl 0:00 console-kit-daemon
2352 ? Ss 0:00 crond
2393 ? Ss 0:00 xfs -droppriv -daemon
2404 ? SNs 0:00 anacron -s
2414 ? Ss 0:00 /usr/sbin/atd
2436 ? Ss 0:00 /usr/sbin/atieventsd
2447 ? Ss 0:00 /sbin/dhcdbd --system
2458 ? SN 0:00 /usr/bin/python /usr/sbin/yum-updatesd
2470 ? Ss 0:00 avahi-daemon: running [linux.local]
2471 ? Ss 0:00 avahi-daemon: chroot helper
2482 ? Ss 0:01 hald
2483 ? S 0:00 hald-runner
2494 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event1
2495 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event3
2498 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event4
2499 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event5
2500 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event6
2538 ? S 0:00 /usr/libexec/hald-addon-cpufreq
2540 ? S 0:00 hald-addon-acpi: listening on acpid socket /var/run/a
2560 ? S 0:00 hald-addon-storage: polling /dev/scd0 (every 2 sec)
2657 ? S 0:00 /usr/sbin/smartd -q never
2662 ? Ss 0:00 login -- root
2663 tty2 Ss+ 0:00 /sbin/mingetty tty2
2664 tty3 Ss+ 0:00 /sbin/mingetty tty3
2665 tty4 Ss+ 0:00 /sbin/mingetty tty4
2666 tty5 Ss+ 0:00 /sbin/mingetty tty5
2667 tty6 Ss+ 0:00 /sbin/mingetty tty6
2732 tty1 Ss+ 0:00 -bash
3040 ? S< 0:00 [krfcommd]
3474 ? SLl 0:00 /sbin/multipathd
3524 ? Ssl 0:00 NetworkManager --pid-file=/var/run/NetworkManager/Net
3546 ? Ss 0:00 kdm
3548 tty7 SLs+ 3:54 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xa
3549 ? S 0:00 -:0
3559 tty7 SL+ 0:00 /usr/bin/X -br -nolisten tcp :0 vt7 -auth /var/run/xa
3561 ? S 0:00 /sbin/dhclient -1 -lf /var/lib/dhclient/dhclient-eth0
3590 ? Ss 0:00 /bin/sh /usr/bin/startkde
3647 ? Ss 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-s
3650 ? S 0:00 /usr/bin/dbus-launch --exit-with-session startkde
3651 ? Ss 0:00 /bin/dbus-daemon --fork --print-pid 4 --print-address
3699 ? Ss 0:00 /usr/bin/gpg-agent -s --daemon
3715 ? S 0:00 start_kdeinit --new-startup +kcminit_startup
3716 ? Ss 0:00 kdeinit Running...
3719 ? S 0:00 dcopserver --nosid
3721 ? S 0:00 klauncher [kdeinit] --new-startup
3723 ? S 0:01 kded --new-startup
3728 ? S 0:00 kwrapper ksmserver
3730 ? S 0:00 ksmserver
3731 ? S 0:00 kwin
3733 ? S 0:02 kdesktop
3738 ? S 0:03 kicker
3745 ? S 0:00 /usr/bin/artsd -F 10 -S 4096 -s 60 -m artsmessage -c
3747 ? S 0:00 kaccess
3750 ? S 0:00 kmix -session 1028c1d320b2100001186848664000000311200
3753 ? Sl 0:00 /usr/libexec/gnome-settings-daemon
3757 ? Sl 0:02 syndock
3762 ? S 0:00 klipper
3765 ? S 0:00 kpowersave
3766 ? S 0:00 knetworkmanager
3769 ? S 0:00 gnome-keyring-daemon
3785 ? S 0:00 /usr/libexec/gconfd-2 11
3787 ? S 0:01 knotify [kdeinit]
3789 ? S 0:03 kopete
3821 ? Ss 0:01 gnome-screensaver
3944 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event7
3948 ? S 0:00 hald-addon-keyboard: listening on /dev/input/event8
3970 ? S 0:00 kio_uiserver
3996 ? S 0:00 kio_file [kdeinit] file /tmp/ksocket-ypucm/klauncherX
4014 ? Sl 1:21 /usr/lib/firefox-2.0.0.3/firefox-bin -UILocale ru
4083 ? S 0:00 konsole
4084 pts/1 Ss+ 0:00 /bin/bash
4127 ? S 0:00 konsole
4128 pts/2 Ss 0:00 /bin/bash
4161 pts/2 R+ 0:00 ps -ax
|
I know, there is a lot of stuff
this is my runlevel 5.
Quote:
S00microcode_ctl
S04dkms_autoinstaller
S04readahead_early
S05kudzu
S06cpuspeed
S08ip6tables
S08iptables
S10network
S11auditd
S12syslog
S13irqbalance
S13multipathd
S13rpcbind
S14nfslock
S18rpcidmapd
S19rpcgssd
S22messagebus
S25pcscd
S26hidd
S28autofs
S44acpid
S55cups
S55sshd
S80sendmail
S90ConsoleKit
S90crond
S90xfs
S95anacron
S95atd
S96readahead_later
S97atieventsd
S97dhcdbd
S97yum-updatesd
S98avahi-daemon
S98haldaemon
S98NetworkManager
S99firstboot
S99local
S99smartd
|
I can monitor using of sda with dstat. That's how it looks(every second refresh):
Quote:
[ypucm@localhost ~]$ dstat -d
-dsk/total-
read writ
82k 32k
0 0
0 0
0 0
0 0
0 0
0 164k
0 0
0 0
0 0
0 0
0 24k
0 0
0 0
0 244k
0 0
0 16k
0 0
0 0
0 0
0 0
0 16k
0 0
0 0
0 0
0 0
0 24k
0 0
0 0
0 0
0 0
0 16k
0 0
|
it always writing.
It isn't swapping. I turned off swap because of 2gb of ram in my laptop.
So, my task is to kill that process, which permanently accesses to my /dev/sda.
Please, help me with it...