Archive for the ‘handy’ Category

Drop Linux Disc Cache

Saturday, March 14th, 2009

On this page I found a handy tip to drop the disc cache that Linux keeps in the main memory. I use this to reduce the amount of information written to disc when hibernating using TuxOnIce.

Linux has the tendency to keep all kinds of information cached in the memory. This is very handy when opening programs, but it can be a nousence when you have 2GB memory. Most of the times the disc cache is as large are even twice as large as the actual data in the memory.

When hibernating this results in writing up to 2GB to disk and this can take a while. And TuxOnIce seems not completely stable and crashes during resuming when the disc image is somewhere over 1GB.

So if my memory is filled I run the following commands as root and then I hibernate.
sync; echo 3 > /proc/sys/vm/drop_caches.
The sync command is also very handy for detaching USB drives, because it flushes the caches.

FreeMind

Saturday, March 14th, 2009

A couple off months ago I went to course to learn mind mapping.

I found it to be very useful to remember things in a much more efficient way then taking “classical” notes. I can recommend it to everybody. I use whenever I can.

Until recently I just used a pencil and a notebook, but a couple of days ago found some open source software on SourceForge. I found this software very useful, because now it is much easier to manage my mind-maps and I don’t run put of paper anymore. ;)

Of course it was very easy to install on Gentoo, because there is an ebuild provided via portage ;)

Back-up of my documents

Sunday, January 11th, 2009

Hey you all,

It has been a while since I wrote something, but I still have adventures in life! ;)

I always knew how important it was to make back-ups, but I never did them on regular basis. It was to much effort to back-up my documents manually on regular basis, because the folders is over 2.2GB and I needed to copy it all to be really sure I got everything. I tried several tools for windows to make it more efficient, but none did it for me. They all resulted in a lot of network traffic or endless caching/scanning. So a little while ago I was playing with rsync on my server and thought, I have Cygwin installed so why not use rsync for my documents. So I did and it proved very easy.

I wrote a little script that I run a couple times a week and it works like a charm. It only copies the diff instead of the whole 2.2GB like I did before! So now I can even back-up while not being on my home network or not needing to carry around an external hard-drive all the time. Although, the initial back-up is better done at home ;)

Here it is:
“rsync -auv –delete-after –prune-empty-dirs –stats /cygdrive/c/MyDocuments user@leipie.com:/store > rsync.log
cat rsync.log”

Easy ain’t it? This copies all changes (added, changed and deleted! files) to my documents folder to my server. Also a log is made, so I can see what was uploaded and deleted the server. It also shows some statistics.

To only catch is that you need ssh access to your back-up medium, but that shouldn’t be to hard ;)