Category Archives: Linux

Perl Memory::Stats – Get RSS memory reporting on multiple platforms

It is often nice to be able to dump the current memory usage of a part of your process. I’m working on Mac OSX, and I’m frustrating when a perl module only works on Linux, because it read file like ‘/proc’ or stuff like that. Thanks to IRC users, I have discover Proc::ProcessTable, and then … Continue reading Perl Memory::Stats – Get RSS memory reporting on multiple platforms

How to build a new kernel (custom) for OVH servers

I’m dealing with TC and shorewall. And based ovh kernel lack of some builtin modules. So to be short :

Don’t forget to cross your fingers. If anything goes wrong, just reboot in rescue, and fix the kernel. Source : http://fr.wikitwist.com/ovh-compiler-kernel-personnalise/#axzz2eJVwnpqG Enjoy ! Celogeek

To handle multiple public ip on one linux router

Let say we have at least 3 connections. One private, one public (default outgoing), and a second public. This is a typical config in your ‘/etc/network/interfaces’ :

And you will need additional route table, edit ‘/etc/iproute2/rt_tables’ and add :

So this config, create a second route table ‘public2’. Any incoming connection that pass … Continue reading To handle multiple public ip on one linux router

How to rename your linux network card (eth0, eth1 …) into a custom name

If you want to give a name to your network card on linux, you can ! By default it’s eth0, then eth1 …

Replace the ATTR{address} by the “mac” address of your card (use ifconfig for this purpose). Then reboot. Now you can do “ifconfig private” instead of “ifconfig eth0”.

Perfect bash PS1 with git repos handling

I want to share my PS1 configuration set :

You got something like this : In case you have nothing pending to commit : ~/Devel/MyGitRepos {MyCurrentBranch} $ YOUR COMMAND If you have something pending to commit : ~/Devel/MyGitRepos {MyCurrentBranch} $ YOUR COMMAND When you are not in a git repository : ~/Devel/MyGitRepos $ YOUR … Continue reading Perfect bash PS1 with git repos handling