sw170 Posted September 26, 2011 Share Posted September 26, 2011 ...... and at last one ONLY for battery monitoring (sleep if battery power is less than 3 % (if not charging) BatteryMon.app.zip Hey KWS, thanks a MILLION for both: your RIP script and real data saver BatteryMon.app Best Wishes swavek Link to comment Share on other sites More sharing options...
dysfunction Posted October 16, 2011 Share Posted October 16, 2011 Does this work in 10.7.2? I tried to install it, but the installer cant finish. Anyone else who have that problem? Or is there another workaround for 10.7.2? Link to comment Share on other sites More sharing options...
sw170 Posted October 16, 2011 Share Posted October 16, 2011 KWS could you please explain whats happening in your "battery check" script here: set batt to do shell script ("ioreg -w0 -l|grep LegacyBatteryInfo") set oldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to {"Capacity\"="} set all2 to second text item of batt set AppleScript's text item delimiters to {","} set all to first text item of all2 set tresh to all / 30 as integer set AppleScript's text item delimiters to {"Current\"="} set curr2 to second text item of batt set AppleScript's text item delimiters to {","} set curr to first text item of curr2 set AppleScript's text item delimiters to oldDelims if tresh > curr then I'm trying to understand it and change sleep mode from 3% to 5% and can't work that out. Thanks in advance s Link to comment Share on other sites More sharing options...
KWS Posted October 19, 2011 Author Share Posted October 19, 2011 tresh is 100 divided to 30 = 3,33 %- all is your full battery capacity You need to change to all divided to 20 = 5 % set tresh to all / 20 as integer Regards KWS Link to comment Share on other sites More sharing options...
Dojomann Posted October 19, 2011 Share Posted October 19, 2011 in 10.7.2 if i have kwsleep installed, after resuming from sleep the machine waits up to a minute or so (sometimes instantly) and then puts itself back to sleep... anyone else having this issue? Link to comment Share on other sites More sharing options...
stefano.85 Posted October 20, 2011 Share Posted October 20, 2011 in 10.7.2 if i have kwsleep installed, after resuming from sleep the machine waits up to a minute or so (sometimes instantly) and then puts itself back to sleep... anyone else having this issue? +1 here! same exact problem, i don't know if it's related to kwsleep (that i have also installed). This happens only sometimes (maybe when i wake the system by mouse-click and not by power-button but i'm not sure about this). Bye Link to comment Share on other sites More sharing options...
KWS Posted October 20, 2011 Author Share Posted October 20, 2011 Try as a workaround to execute a keystroke or a mouseclick directly after wake. Possibly uda dont reset system activity, so after 30 s sleep triggers again ... Link to comment Share on other sites More sharing options...
sw170 Posted October 21, 2011 Share Posted October 21, 2011 tresh is 100 divided to 30 = 3,33 %-all is your full battery capacity You need to change to all divided to 20 = 5 % set tresh to all / 20 as integer Regards KWS Thanks for clearing that out KWS, I got carried away with this problem and created my own Zarvox-lowBattery voice alert Best swavek Link to comment Share on other sites More sharing options...
Dojomann Posted October 21, 2011 Share Posted October 21, 2011 Try as a workaround to execute a keystroke or a mouseclick directly after wake.Possibly uda dont reset system activity, so after 30 s sleep triggers again ... nope, doesn't seem to do it... mashing the keyboard to no avail, still goes back to sleep.. I've removed kwsleep since and it's fine, just doesn't go to sleep after a certain amount of time. Link to comment Share on other sites More sharing options...
KWS Posted October 21, 2011 Author Share Posted October 21, 2011 QUOTE (Dojomann @ Oct 21 2011, 04:24 AM) nope, doesn't seem to do it... mashing the keyboard to no avail, still goes back to sleep.. I've removed kwsleep since and it's fine, just doesn't go to sleep after a certain amount of time. OK, in case of sleep-problems i must say that ... iQuit I'm very busy at the moment ... maybe I can continue the project sometime in the future ... the future is already gone ... i did a quick workaround to avoid resetting system-activity ... hope it works ... Best Regards KWS Link to comment Share on other sites More sharing options...
OsXsO Posted November 18, 2011 Share Posted November 18, 2011 OK, in case of ... sleep-problems ... iQuit .. use pleasesleep or anything you prefer ... Regards KWS oooooooohhhh this are bad news... thx KWS for your work. Link to comment Share on other sites More sharing options...
RogerG Posted December 2, 2011 Share Posted December 2, 2011 Thanks KWS! Your solution worked very well for me, I used it a very long time, beginning with 10.5 A few days ago I updated my machine to 10.7.2 and I was very sad to learn that RIP does not do the job anymore :-( Anyway, I will find a different solution, I just wanted to express my thankfulness. Best regards RogerG Link to comment Share on other sites More sharing options...
KWS Posted December 7, 2011 Author Share Posted December 7, 2011 I added updates for 10.7.2 on first page ... Link to comment Share on other sites More sharing options...
OsXsO Posted December 14, 2011 Share Posted December 14, 2011 I added updates for 10.7.2 on first page ... Great ... working again .. on my 10.7.2 Questions: i have osx installed on a box as a remote server 10.6.8 using a airport extreme so i can take advantage of the bonjour proxy service.. my problem is that if i access files on the shares of the server... "playing a movie" it will sleep. so i tried to set applefileserver:1 smbd:1 and Applevncserver:1 and it looks that it keeps longer until it sleeps but i can't go smaller than 1. Kwssleep monitors downloading net traffic, maybe the easiest way would be if its possible to monitor the upload too. anyway thx for the update Salu2 Link to comment Share on other sites More sharing options...
KWS Posted December 14, 2011 Author Share Posted December 14, 2011 Great ... working again .. on my 10.7.2 Questions: i have osx installed on a box as a remote server 10.6.8 using a airport extreme so i can take advantage of the bonjour proxy service.. my problem is that if i access files on the shares of the server... "playing a movie" it will sleep. so i tried to set applefileserver:1 smbd:1 and Applevncserver:1 and it looks that it keeps longer until it sleeps but i can't go smaller than 1. Kwssleep monitors downloading net traffic, maybe the easiest way would be if its possible to monitor the upload too. anyway thx for the update Salu2 Maybe you should set a cpu-limit for your movie playing prog ... Link to comment Share on other sites More sharing options...
OsXsO Posted December 14, 2011 Share Posted December 14, 2011 Its the remote one which sleeps, not the one i'm watching on. In other words: i have hack "homeserver" where my media is located. This hack use kws to autosleep. If other pc mac access the server to use the itunes share o run direct an avi from hd share it should stay on but it sleeps. If i make a timemachine backup on that hd share it works perfect.. After backup is done the server sleeps.. So if you just read from the server = serve goes into sleep If you write to the server = server awake Maybe now its clearer Salu2 Link to comment Share on other sites More sharing options...
KWS Posted December 15, 2011 Author Share Posted December 15, 2011 kwsleep and RIP are monitoring in- and outgoing traffic (on LAN- and Firewire-Ports, not USB). You can try to open /Library/Scripts/KWS/Sleep.sh with a text editor and change CPUload=30 # Treshold in % for CPU-Load (here 30 = 30% !!) NetVal=50000 # Treshold for Network-Traffic in Byte/s to - maybe - CPUload=30 # Treshold in % for CPU-Load (here 30 = 30% !!) NetVal=20000 # Treshold for Network-Traffic in Byte/s so that the treshold for stopping sleep is lower ... Regards KWS Link to comment Share on other sites More sharing options...
KWS Posted December 15, 2011 Author Share Posted December 15, 2011 I must apologize - KWSleep + KWSleepLion are monitoring only incoming traffic ... ... thanks to OsXsO for the note. I updated KWSleep and KWSleepLion in first post ... run the full install to detect your network ... Regards KWS Link to comment Share on other sites More sharing options...
OsXsO Posted December 15, 2011 Share Posted December 15, 2011 hey KWS thx for the update....... but sorry to say that my machine 10.6.8 isn't sleeping with the updated sleep.sh. i tried going up to 90000 but no effect... replacing with old sleep.sh working as before any suggestions?? edit: tried disable the wake op on lan access in system settings, energy saver ... without success edit2: tried on my 10.7.2.. doesn't work Link to comment Share on other sites More sharing options...
KWS Posted December 16, 2011 Author Share Posted December 16, 2011 Excuse me again, you must run the full install to attach your network-ports. Or you start Edit KWSleep and run Network Interfaces - Detect from the menu bar ... i wrote this script some months ago ... Regards KWS Link to comment Share on other sites More sharing options...
OsXsO Posted December 16, 2011 Share Posted December 16, 2011 i did that, without joy salu2 Link to comment Share on other sites More sharing options...
KWS Posted December 16, 2011 Author Share Posted December 16, 2011 So I am at my wits end - here the script stops if in- or outgoing traffic greater than 50 kbyte/s occurs. Are you sure that the network-port with your outgoing traffic (shown in system settings - Network (standard is en0) is detected by the script... Regards KWS Link to comment Share on other sites More sharing options...
OsXsO Posted December 16, 2011 Share Posted December 16, 2011 yes its recognized on en0 en1 and fw0.. but both systems i tried doesn't enter into sleep.. one 10.6.8 the other 10.7.2. the network interface are detected correctly. salu2 Link to comment Share on other sites More sharing options...
KWS Posted December 16, 2011 Author Share Posted December 16, 2011 And is it in the script for Interface in "en0" "en1" "fw0 "# Net Link to comment Share on other sites More sharing options...
OsXsO Posted December 16, 2011 Share Posted December 16, 2011 this is how it looks like # Network-Interfaces for Interface in "en0" "en1" "fw0" # Net do IArray=( "${IArray[@]}" $Interface ) done Link to comment Share on other sites More sharing options...
Recommended Posts