Thursday 19 December 2013

Firefox and backspace

Under Linux the backspace button in Firefox will do nothing on default. I find that very annoying, because I'm not very much of a mouser. I prefer the backspace to perform a page back action. To make this happen, do the following:

Type "about:config" in the address bar of Firefox and press Enter. Filter for "browser.backspace_action" and change its value to 0 (zero).

0 is for page back
1 is for page up
2 is for doing nothing


Managing LVM

You are using LVM and running out of disk space? Check if you still have some left and increase space if you can.

First check used space
df -h 

Check available space in LV:
vgdisplay 

Check LV layout:
lvs 

Increase space for example on var:
lvresize -L +3GB /dev/VG01/LV_VAR
resize2fs -p /dev/VG01/LV_VAR 

Check
lvs df -h

Be happy

Load average

When I was just a little boy I started working with Linux. Sometimes I checked load averages with top and look at the fancy numbers. Now the magic is gone and I can actually understand what I'm seeing. But load average has always been a little fuzzy to me. Yesteryear I would go berserk on a load over 1.00 and had some head-banging moments to find out what was wrong. With the introduction of multiprocessing and multicore systems load average can be well over 1.00 and isn't a real problem, as long as it stays under the total number of cores.

Well explained by Andre: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

Thursday 28 November 2013

Interacting with Nodemanager

I want to get simple information from a remote running WebLogic NodeManager. Thanks to http://pietermalan.blogspot.nl/2012/04/interacting-with-nodemanager.html I found out how to do that using TELNET>.

Monday 18 November 2013

Keyboard layout in Centos

I downloaded an image of Centos from http://virtualboxes.org/images/centos/. How strange when I start the image and look upon an Italian keyboard layout... How in my name can I fix this. Lucky I'm not the only one who had that problem: http://flyingunix.blogspot.nl/2007/07/keyboard-layout-in-centos.html.

Tnx Alina

Tuesday 15 October 2013

NTP synchronisation in RHEL the right way

I'm managing about 28 servers at the moment, a developer came up to me this morning telling me his machine was more then one minute late. Auch, embarrassing situation here I thought. Did I do something wrong? All servers are synced with ntpd on the same central timeserver. How can it be that one server is way off? Digging the internet on so called experts didn't help much, most use ntpd and are done. So why is the server off?

Well it seems when a server is off too much on boot time, ntpd will just not work anymore. That was a new for me. The catch is that servers don't sync on boot with ntp, they sync with the hwclock. If the clock is way off a certain threshold ntp will just silently fail. How can I fix the problem so the server will boot, set time correct and keep it correct?

Open your /etc/rc.local file and add ntpdate to it (use any time server you want), then sync the hwclock:

# sync time
ntpdate -sb pool.ntp.org 
hwclock --systohc

Now after boot, sysinit is run, then rc.local, the time is updated, the hwclock is synced, then the services in rc.d will start. Because we still use ntpd the server time will stay in sync till next reboot; where it is synced on boot et cetera.

Tnx to:
http://nuclearfusionreactor.blogspot.nl/
http://www.rgrjr.com/linux/ntp.html#ntpdate-boot

Wednesday 29 May 2013

Shrink your VirtualBox disk

After working in my VirtualBox RedHat installation my disk grew to 27Mb. I want to make is smaller so it can fit on the left over space of my 5.6Mb SSD.

Fill the disk with 0's and delete the zero file:
$ dd if=/dev/zero of=~/delete.me
$ rm ~/delete.me
 
Start the Virtial Box Manager and fix the disk:
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd --compact C:\pth-to-disk\disk.vdi