Lines Matching +full:disk +full:- +full:activity
2 How to conserve battery power using laptop-mode
12 ------------
14 Laptop mode is used to minimize the time that the hard disk needs to be spun up,
31 ------------
41 located in /etc/default/laptop-mode on Debian-based systems, or in
42 /etc/sysconfig/laptop-mode on other systems.
52 -------
64 * If you mount some of your ext3/reiserfs filesystems with the -n option, then
67 wrong options -- or it will fail because it cannot write to /etc/mtab.
80 -----------
84 configuration options. When the knob is set, any physical disk I/O (that might
85 have caused the hard disk to spin up) causes Linux to flush all dirty blocks. The
86 result of this is that after a disk has spun down, it will not be spun up
89 knob determines the time between the occurrence of disk I/O and when the flush
96 dirtied are not forced to be written to disk as often. The control script also
100 this results in concentration of disk activity in a small time interval which
101 occurs only once every 10 minutes, or whenever the disk is forced to spin up by
102 a cache miss. The disk can then be spun down in the periods of inactivity.
104 If you want to find out which process caused the disk to spin up, you can
106 is set, Linux reports all disk read and write operations that take place, and
107 all block dirtyings done to files. This makes it possible to debug why a disk
112 the output of block_dump will be logged, causing disk activity that is not
117 -------------
119 The laptop mode configuration file is located in /etc/default/laptop-mode on
120 Debian-based systems, or in /etc/sysconfig/laptop-mode on other systems. It
140 "-S" option.
149 Disk readahead, in 512-byte sectors, while laptop mode is active. A large
150 readahead can prevent disk accesses for things like executable pages (which are
189 See Documentation/admin-guide/pm/cpufreq.rst for more info. Disabled by default.)
199 -------------
204 * You can spin down the disk while playing MP3, by setting disk readahead
205 to 8MB (READAHEAD=16384). Effectively, the disk will read a complete MP3 at
214 * In syslog.conf, you can prefix entries with a dash `-` to omit syncing the
215 file after every logging. When you're using laptop-mode and your disk doesn't
219 (http://noflushd.sourceforge.net/), it seems that noflushd prevents laptop-mode
230 -------------------------------------------------------
235 It should be installed as /etc/default/laptop-mode on Debian, and as
236 /etc/sysconfig/laptop-mode on Red Hat, SUSE, Mandrake, and other work-alikes.
249 # Read-ahead, in 512-byte sectors. You can spin down the disk while playing MP3/OGG
250 # by setting the disk readahead to 8MB (READAHEAD=16384). Effectively, the disk
293 # See Documentation/admin-guide/pm/cpufreq.rst for more info
303 # Idle timeout for your hard drive (man hdparm for valid values, -S option)
317 --------------
343 if [ -f /etc/default/laptop-mode ] ; then
345 . /etc/default/laptop-mode
346 elif [ -f /etc/sysconfig/laptop-mode ] ; then
348 . /etc/sysconfig/laptop-mode
357 MAX_AGE=${MAX_AGE:-'600'}
359 # Read-ahead, in kilobytes
360 READAHEAD=${READAHEAD:-'4096'}
363 DO_REMOUNTS=${DO_REMOUNTS:-'1'}
366 DO_REMOUNT_NOATIME=${DO_REMOUNT_NOATIME:-'1'}
369 DO_HD=${DO_HD:-'1'}
372 HD="${HD:-'/dev/hda'}"
374 # spindown time for HD (hdparm -S values)
375 AC_HD=${AC_HD:-'244'}
376 BATT_HD=${BATT_HD:-'4'}
380 DIRTY_RATIO=${DIRTY_RATIO:-'40'}
383 # See Documentation/admin-guide/pm/cpufreq.rst for more info
384 DO_CPU=${CPU_MANAGE:-'0'}
385 CPU_MAXFREQ=${CPU_MAXFREQ:-'slowest'}
393 DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'}
396 DEF_AGE=${DEF_AGE:-'30'}
397 DEF_UPDATE=${DEF_UPDATE:-'5'}
398 DEF_DIRTY_BACKGROUND_RATIO=${DEF_DIRTY_BACKGROUND_RATIO:-'10'}
399 DEF_DIRTY_RATIO=${DEF_DIRTY_RATIO:-'40'}
400 DEF_XFS_AGE_BUFFER=${DEF_XFS_AGE_BUFFER:-'15'}
401 DEF_XFS_SYNC_INTERVAL=${DEF_XFS_SYNC_INTERVAL:-'30'}
402 DEF_XFS_BUFD_INTERVAL=${DEF_XFS_BUFD_INTERVAL:-'1'}
410 XFS_HZ=${XFS_HZ:-'100'}
414 KLEVEL="$(uname -r |
424 echo "Unhandled kernel version: $KLEVEL ('uname -r' = '$(uname -r)')" >&2
429 if [ ! -e /proc/sys/vm/laptop_mode ] ; then
434 if [ ! -w /proc/sys/vm/laptop_mode ] ; then
445 -e 's/,'"$OPT"'=[0-9]*,/,/g' \
446 -e 's/,,*/,/g' \
447 -e 's/^,//' \
448 -e 's/,$//'
457 -e 's/,'"$OPT"',/,/g' \
458 -e 's/,,*/,/g' \
459 -e 's/^,//' \
460 -e 's/,$//'
489 # no$OPT not found -- so we must have $OPT.
493 # option not specified in fstab -- choose the default.
520 echo -n "$PARSEDOPTS1,$OPT="
522 -e 's/.*,'"$OPT"'=//' \
523 -e 's/,.*//'
536 grep -v '^#' |
545 if [ $DO_REMOUNT_NOATIME -eq 1 ] ; then
553 echo -n "Starting laptop_mode"
555 if [ -d /proc/sys/vm/pagebuf ] ; then
557 # This only needs to be set, not reset -- it is only used when
561 elif [ -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
566 elif [ -f /proc/sys/fs/xfs/age_buffer ] ; then
568 # But not for these -- they are also used in normal
572 elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
594 if [ $DO_REMOUNTS -eq 1 ]; then
603 mount $DEV -t $FST $MP -o remount,$PARSEDOPTS,commit=$MAX_AGE$NOATIME_OPT
606 mount $DEV -t $FST $MP -o remount,$OPTS$NOATIME_OPT
609 if [ -b $DEV ] ; then
610 blockdev --setra $(($READAHEAD * 2)) $DEV
614 if [ $DO_HD -eq 1 ] ; then
616 /sbin/hdparm -S $BATT_HD $THISHD > /dev/null 2>&1
617 /sbin/hdparm -B 1 $THISHD > /dev/null 2>&1
620 if [ $DO_CPU -eq 1 -a -e /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq ]; then
631 echo -n "Stopping laptop_mode"
633 if [ -f /proc/sys/fs/xfs/age_buffer -a ! -f /proc/sys/fs/xfs/lm_age_buffer ] ; then
637 elif [ -f /proc/sys/fs/xfs/age_buffer_centisecs ] ; then
654 if [ $DO_REMOUNTS -eq 1 ] ; then
664 mount $DEV -t $FST $MP -o remount,$PARSEDOPTS
668 mount $DEV -t $FST $MP -o remount,$PARSEDOPTS
671 if [ -b $DEV ] ; then
672 blockdev --setra 256 $DEV
676 if [ $DO_HD -eq 1 ] ; then
678 /sbin/hdparm -S $AC_HD $THISHD > /dev/null 2>&1
679 /sbin/hdparm -B 255 $THISHD > /dev/null 2>&1
682 if [ $DO_CPU -eq 1 -a -e /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq ]; then
698 ----------------
724 "on-line")
728 "off-line")
743 if [[ -f /proc/sys/vm/laptop_mode ]]
746 if [[ $LM -gt 0 ]]
748 if [[ -f $BATT_INFO ]]
751 if [ -f /etc/default/laptop-mode ] ; then
753 . /etc/default/laptop-mode
754 elif [ -f /etc/sysconfig/laptop-mode ] ; then
756 . /etc/sysconfig/laptop-mode
758 MINIMUM_BATTERY_MINUTES=${MINIMUM_BATTERY_MINUTES:-'10'}
760 ACTION="`cat $BATT_INFO | grep charging | cut -c 26-`"
761 if [[ ACTION -eq "discharging" ]]
763 … PRESENT_RATE=`cat $BATT_INFO | grep "present rate:" | sed "s/.* \([0-9][0-9]* \).*/\1/" `
764 … REMAINING=`cat $BATT_INFO | grep "remaining capacity:" | sed "s/.* \([0-9][0-9]* \).*/\1/" `
771 …logger -p daemon.warning "You are using laptop mode and your battery interface $BATT_INFO is missi…
778 ---------------
780 Bartek Kania submitted this, it can be used to measure how much time your disk