We have moved to a new Sailfish OS Forum. Please start new discussions there.
15

[App request] Drop Cache [released]

asked 2015-04-05 17:42:26 +0300

rburkhanov gravatar image

updated 2015-09-24 13:56:45 +0300

chemist gravatar image

I've found that I can hardly survive more then 3-5 days without rebooting my Jolla. I have to do that because of apps starting more and more slower, hanging now and then, other productivity problems. In the days of N9 I used Drop Cache app (http://my-meego.com/software/applications.php?fldAuto=1289&faq=25) to solve all that problems without rebooting. Unfortunately I didn't managed to find anything like that for Jolla.

If someone could make (or point me at the already existing) native SFOS app with the same functionality, it would be really helpful.

UPDATE Seems like the new Sailfish Utilities option "Reset UI" is doing this job, so closing this question as "released".

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by rburkhanov
close date 2015-09-24 13:48:48.727442

Comments

1

you can easily script this and then plug it into an app in openrepos called ShellEx. that way you can launch it with a few taps rather than having to drop down to a terminal.

droll ( 2015-04-23 03:30:16 +0300 )edit

Could you share the script, please? Not all of us are developers.

eson ( 2015-04-23 09:16:42 +0300 )edit

2 Answers

Sort by » oldest newest most voted
5

answered 2015-04-23 09:46:00 +0300

droll gravatar image

updated 2015-04-28 01:34:52 +0300

chemist gravatar image
  1. enable developer mode on your jolla

  2. set a password for it

  3. launch Terminal

  4. type cd /home/nemo (obsolete as you should already be in /home/nemo)

  5. type vi dropcache.sh

  6. tap i (should show --insert-- at the bottom) then enter the following lines

    #!/bin/sh
    echo 1 > /proc/sys/vm/drop_caches 
    echo 2 > /proc/sys/vm/drop_caches 
    echo 3 > /proc/sys/vm/drop_caches
    

  7. tap ESC to exit editing mode (--insert-- disappears) then enter :x (shows at the bottom left)

  8. enter chmod +x dropcache.sh to make it executable

  9. launch ShellEx from launcher

  10. create a new task

  11. Give it a name - such as Drop Cache

  12. in the command to run type (replace (develpwd) with what you entered in step #2 above)

    sh -c "echo (develpwd) | devel-su -c "/home/nemo/dropcache.sh"

  13. save the task and test it out.

edit flag offensive delete publish link more

Comments

Thanks a lot! Very useful.

eson ( 2015-04-23 09:50:50 +0300 )edit

I replaced (develpwd) with my devel-su password,but didnt work.shellEx gives me: Command Drop Cache Starting... Password:

Program returned exit code 255

Note that i put " after the password to match the one preceding it which is not available in your guide.What am i doing wrong ?

babooo ( 2015-04-26 11:23:41 +0300 )edit

in the last line of my instruction i forgot to add a double quote after .sh"

try this (assuming your pwd is fish)

sh -c "echo \" fish\" | devel-su -c /home/nemo/dropcache.sh"

droll ( 2015-04-26 13:08:42 +0300 )edit

Still not working. Auth failed & Returned the same error 255

babooo ( 2015-04-26 13:59:57 +0300 )edit

can you show me a screenshot of your shellex command? also attach your copy of dropcache.sh.

droll ( 2015-04-26 14:06:07 +0300 )edit
6

answered 2015-04-05 18:37:08 +0300

Nieldk gravatar image

updated 2015-04-27 22:43:53 +0300

chemist gravatar image

Well, not a nifty app. But, in terminal you can do this quite simple:

Note: you need to be root (devel-su)

To free pagecache:

# echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

# echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

# echo 3 > /proc/sys/vm/drop_caches
edit flag offensive delete publish link more

Comments

2

Thanks! Would be great to have some GUI for that. 'Cause it's just more convinient ) But it's already better then nothing.

rburkhanov ( 2015-04-05 19:53:31 +0300 )edit
6

It would make sense to add this feature to the Sailfish Utilities App.

wanderer ( 2015-04-15 16:28:31 +0300 )edit
1

Adding it to ShellEx might make it more convenient without needing a dedicated GUI :-)

bruce_one ( 2015-04-23 06:34:33 +0300 )edit

Question tools

Follow
8 followers

Stats

Asked: 2015-04-05 17:42:26 +0300

Seen: 898 times

Last updated: Sep 24 '15