How to flush the RAM ?
- Bernhardiner
- Posts: 43
- Joined: Tue 03 Jul 2018, 10:12
- Contact:
How to flush the RAM ?
Hi,
does a script exist or which command can be used to flush the RAM in any Puppy?
Regards,
Bernhardiner
does a script exist or which command can be used to flush the RAM in any Puppy?
Regards,
Bernhardiner
- ttuuxxx
- Posts: 11171
- Joined: Sat 05 May 2007, 10:00
- Location: Ontario Canada,Sydney Australia
- Contact:
Here try this, just extract it and run it in a terminal
- Attachments
-
- ram.tar.gz
- (262 Bytes) Downloaded 121 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
The question is.
Why do you want to do this?
What is the problem?
Why do you want to do this?
What is the problem?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
- Bernhardiner
- Posts: 43
- Joined: Tue 03 Jul 2018, 10:12
- Contact:
- ttuuxxx
- Posts: 11171
- Joined: Sat 05 May 2007, 10:00
- Location: Ontario Canada,Sydney Australia
- Contact:
Your welcome also delete /root/.cache on a regular basisBernhardiner wrote:Thank you, ttuuxxx.
It seems to work.
It can be the RAM is not big enough, or it is better not to save everything in the save file.
Regards,
Bernhardiner
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)
The save process, for updating the save, is only going to put stuff in the save that needs to be in the save.
It does not put everything that is in memory in the save.
This is not something to worry about.
If you do not want anything new going into the save automatically.
Setup the options in Puppy Event Manager>Save Session.
To make a hard drive install be able to use these options.
In the menu entry that boots it.
Change the pmedia= to pmedia=usbflash.
That will make it run in pupmode 13 and not pupmode 12.
It does not put everything that is in memory in the save.
This is not something to worry about.
If you do not want anything new going into the save automatically.
Setup the options in Puppy Event Manager>Save Session.
To make a hard drive install be able to use these options.
In the menu entry that boots it.
Change the pmedia= to pmedia=usbflash.
That will make it run in pupmode 13 and not pupmode 12.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
- Bernhardiner
- Posts: 43
- Joined: Tue 03 Jul 2018, 10:12
- Contact:
No.Somewhere in this forum it is written that everything in RAM is saved in the save file.
That is someone making too general a statement.
Not everything in ram goes into the save.
Only any changed settings.
Only anything added to Puppy that is not already in the save.
Only stuff already in the save that has changed and only those changes.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
Dear all,
This works for me:
With kind regards,
vovchik
This works for me:
Code: Select all
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
# Get Memory Information
freemem_before=$(cat /proc/meminfo | grep MemFree | tr -s ' ' | cut -d ' ' -f2) && freemem_before=$(echo "$freemem_before/1024.0" | bc)
cachedmem_before=$(cat /proc/meminfo | grep "^Cached" | tr -s ' ' | cut -d ' ' -f2) && cachedmem_before=$(echo "$cachedmem_before/1024.0" | bc)
# Output Information
echo -e "This script will clear cached memory and free up your ram.\n\nAt the moment you have $cachedmem_before MiB cached and $freemem_before MiB free memory."
# Test sync
if [ "$?" != "0" ]
then
echo "Something went wrong, It's impossible to sync the filesystem."
exit 1
fi
# Clear Filesystem Buffer using "sync" and Clear Caches
sync && echo 3 > /proc/sys/vm/drop_caches
freemem_after=$(cat /proc/meminfo | grep MemFree | tr -s ' ' | cut -d ' ' -f2) && freemem_after=$(echo "$freemem_after/1024.0" | bc)
# Output Summary
echo -e "This freed $(echo "$freemem_after - $freemem_before" | bc) MiB, so now you have $freemem_after MiB of free RAM."
exit 0
vovchik
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
bigpup
I use that pmedia=usbflash with syslinux.cfg, but where does one make the related change in a Grub4Dos configured system?
TIA
I use that pmedia=usbflash with syslinux.cfg, but where does one make the related change in a Grub4Dos configured system?
TIA
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]
Hello, all.
About 4 years ago, the French side (forum members jplt, Médor, myself,
with suggestions from ASRI and augras, etc.) produced this.
Parms you can pass as $1 are as follows:
# "chrono" : save as a history file; no window pops up;
# "simple" : for operation from the terminal;
# "histo" : combines the two above.
If you wish to consult the history, for monitoring purposes.
-=> useful if you think something is wrong with your RAM; <=-
You run it every now and then during your session. Readings are saved
in file /root/my-documents/tmp/suivimev.his
# "flafla", "bling" or nothing: show results with transparency (default).
E.g. < ./cleanup_memory bling > will show the results as in the scrot.
The title bar shows how much RAM was recoup'ed, and if swap is in use.
Whatever little text there is is shown in the language of the system. At
this time EN or FR only; translators for other languages welcome.
Requires the real less, not the busybox one. If does not show a symbolic link, you have the real less.
Enjoy. BFN.
About 4 years ago, the French side (forum members jplt, Médor, myself,
with suggestions from ASRI and augras, etc.) produced this.
Parms you can pass as $1 are as follows:
# "chrono" : save as a history file; no window pops up;
# "simple" : for operation from the terminal;
# "histo" : combines the two above.
If you wish to consult the history, for monitoring purposes.
-=> useful if you think something is wrong with your RAM; <=-
You run it every now and then during your session. Readings are saved
in file /root/my-documents/tmp/suivimev.his
# "flafla", "bling" or nothing: show results with transparency (default).
E.g. < ./cleanup_memory bling > will show the results as in the scrot.
The title bar shows how much RAM was recoup'ed, and if swap is in use.
Whatever little text there is is shown in the language of the system. At
this time EN or FR only; translators for other languages welcome.
Requires the real less, not the busybox one. If
Code: Select all
ls -Algor /usr/bin/less
Enjoy. BFN.
- Attachments
-
- cleanup_memory.zip
- This latest v. corrects a bug in the less display, in histo and simple modes.
Unzip in a "bin" directory in your $PATH and make executable. Contains a
"cleanup_memory" symlink to script cleanup_memory4b1. - (2.81 KiB) Downloaded 89 times
-
- history-mode.jpg
- (143.24 KiB) Downloaded 186 times
-
- cleanup-RAM-4b-EN.jpg
- Default display.
- (113.63 KiB) Downloaded 199 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
I think the browser is the usual culprit that fills the RAM with junk. I find that restarting the graphical server, which kills Firefox, then restarting Firefox and telling it to restore the tabs it had open before it was killed, seems to clear out a lot of junk while leaving the browser the way it was before restarting the graphical server.
Just add it on the line that starts with "kernel", like so:B.K. Johnson wrote:bigpup
I use that pmedia=usbflash with syslinux.cfg, but where does one make the related change in a Grub4Dos configured system?
TIA
title Puppy Linux precise572a in sda3 dir precise572a
rootnoverify (hd0,1)
kernel /precise572a/vmlinuz pmedia=usbflash psubdir=precise572a
initrd /precise572a/initrd.gz
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
Just to add to above information.
All Grub4dos menu entries should already have a pmedia= in their kernel line entries.
Just change the pmedia= that is already there to pmedia=usbflash
There needs to be only one pmedia= entry.
Understand that when you do this. Puppy will run in pupmode 13. It will use a saveramdisk that is going to use some ram all the time.
Everything that normally goes into the save, will stay in this saveramdisk, until you choose to have it go into the real save file/folder, by having a set time to flush to the save file/folder, clicking on the save icon on the desktop, or do a shutdown.
Setting options are in Puppy Event Manager>Save Session.
All Grub4dos menu entries should already have a pmedia= in their kernel line entries.
Just change the pmedia= that is already there to pmedia=usbflash
There needs to be only one pmedia= entry.
Understand that when you do this. Puppy will run in pupmode 13. It will use a saveramdisk that is going to use some ram all the time.
Everything that normally goes into the save, will stay in this saveramdisk, until you choose to have it go into the real save file/folder, by having a set time to flush to the save file/folder, clicking on the save icon on the desktop, or do a shutdown.
Setting options are in Puppy Event Manager>Save Session.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)
When I was a kid I wanted to be older.... This is not what I expected
YaPI(any iso installer)