|
2012-01-24
, 21:30
|
Posts: 169 |
Thanked: 83 times |
Joined on Dec 2009
|
#202
|
|
2012-01-24
, 21:34
|
Posts: 958 |
Thanked: 483 times |
Joined on May 2010
|
#203
|
The Following User Says Thank You to droll For This Useful Post: | ||
|
2012-01-24
, 21:35
|
Posts: 958 |
Thanked: 483 times |
Joined on May 2010
|
#204
|
|
2012-01-24
, 22:31
|
Posts: 172 |
Thanked: 98 times |
Joined on Aug 2010
@ Forest of Dean, England.
|
#205
|
The Following User Says Thank You to thebtman For This Useful Post: | ||
|
2012-01-24
, 23:26
|
Posts: 346 |
Thanked: 271 times |
Joined on Jan 2010
|
#206
|
#!/bin/sh INTERNALSWAP=/dev/mmcblk0p3 MMCSWAP=/dev/mmcblk1p2 # microSD partition 2 (swap) if [ ! -b "$MMCSWAP" ]; then exit 1 fi DATE="$(date)" BEFORE="$(free)" swapon "$MMCSWAP" swapoff "$INTERNALSWAP" swapon "$INTERNALSWAP" swapoff "$MMCSWAP" # Make the phone temporally unlock, cause Xorg unswapping, # avoid the device to be sluggish in the first seconds of use # Comment out if you don't like it dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked sleep 1 # disable the backlight echo 0 > /sys/class/backlight/acx565akm/brightness sleep 10 AFTER="$(free)" # Save stats to /tmp/swapdefrag cat >> /tmp/swapdefrag << EOF $DATE Before: $BEFORE After: $AFTER EOF
The Following 3 Users Say Thank You to Megaltariak For This Useful Post: | ||
|
2012-01-25
, 05:11
|
Posts: 958 |
Thanked: 483 times |
Joined on May 2010
|
#207
|
|
2012-01-25
, 08:10
|
Posts: 172 |
Thanked: 98 times |
Joined on Aug 2010
@ Forest of Dean, England.
|
#208
|
My swap defrag script:
You need to create a second swap partition in order to use itCode:#!/bin/sh INTERNALSWAP=/dev/mmcblk0p3 MMCSWAP=/dev/mmcblk1p2 # microSD partition 2 (swap) if [ ! -b "$MMCSWAP" ]; then exit 1 fi DATE="$(date)" BEFORE="$(free)" swapon "$MMCSWAP" swapoff "$INTERNALSWAP" swapon "$INTERNALSWAP" swapoff "$MMCSWAP" # Cause Xorg unswapping, avoid the device to be sluggish the first seconds of use, comment out if you don't like dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked sleep 1 # disable the backlight echo 0 > /sys/class/backlight/acx565akm/brightness sleep 10 AFTER="$(free)" cat > /tmp/swapdefrag << EOF $DATE Before: $BEFORE After: $AFTER EOF
Adapt it to your needs and run it as a daily task at ~4am
with cron/alarmed/whatever
|
2012-01-25
, 18:05
|
Posts: 346 |
Thanked: 271 times |
Joined on Jan 2010
|
#209
|
The Following User Says Thank You to Megaltariak For This Useful Post: | ||
|
2012-01-25
, 18:38
|
Posts: 958 |
Thanked: 483 times |
Joined on May 2010
|
#210
|
The Following User Says Thank You to droll For This Useful Post: | ||
If you want to support my work, you can donate by PayPal or Flattr
Projects no longer actively developed: here