Help - Search - Members - Calendar
Full Version: Small Useful Informations
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > Sharp PC-Z1 NetWalker
Scripts triggered by power/suspend changes are located in /etc/pm
They are triggered twice per change first time with "true" or "false" argument when power change is triggered and second time with "suspend suspend" or "suspend resume" when that change is finishing. That means when you do a full cycle suspend-resume they got triggered four times.
Simply put your script in /etc/pm and link in apropriate directory there and note what is happening.

Its useful to pause and resume mpd or when you dont want to use thick power agent (ie in text mode) to make suspend/resume or backlight change when button is pressed or lid closed/open.
Another small utility I made:
while true

tmp=`cat /sys/devices/system/cpu/cpu0/cpufreq/stats/total_trans`
fmp=`cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state|grep 800000|cut -d " " -f 2`
smp=`cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state|grep 160000|cut -d " " -f 2`
# echo "---$smp-"
((tmp3= $tmp - $tmp2))
((fmp3= $fmp - $fmp2))
((smp3= $smp - $smp2))
echo "$tmp3 $fmp3 $smp3"
sleep 5

this script prints how many times cpu was switched between low (160 MHz) to high (800MHz) clock and how long int was working in both modes.
Output looks like this:
34 162 353
26 74 438
20 61 452
0 512 0
10 387 133
9 61 452

First column is number of switches next is time in high clock and last is time in low clock.
It is useful to see which activity uses more power as high clock is more power consuming.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.