Archive

Archive for the ‘Uncategorized’ Category

Queue only in Exim

July 8th, 2010 Joar Jegleim No comments

In the process of upgrading our server where mail for customers where being stored I had to take down the system. One thing is to give thousand of users downtime, they can (must) live with it, as long as you for instance do it during nights or so. An other thing is incoming mail, the system should be able to receive mail 24/7 at least as long as one have more than 1 incoming MX .

Normally Exim is run by the switch -bd -q5m, depending on the configuration in exim.conf Exim usually tries to deliver mail instantly and (ref. -q5m) a queue runner goes through the queue every 5 minutes and may or may not retry delivery of mail hanging in the queue (it may not retry mail where ‘retry time’ has not been reach) .

In exim.conf you may add the directive:

queue_only

meaning that for each incoming mail exim will queue the mail and not try to deliver it at once. Mail is then picked up by the queue runner process and delivered later.
By using this directive and by stopping exim and starting it manually with out the queue runner process:

exim -bd

I was able to queue all incoming mail at our MX and could do what I needed to do with the server where mail is delivered (that is for local deliveries) which in my case was about 3 hours of downtime.
When done I removed the queue_only directive and restarted exim with the queue runner again and everything was well :)

Sources:
exim.org

Categories: Uncategorized Tags:

Testing read/write speed of disks

July 6th, 2010 Joar Jegleim No comments

Upon testing the performance of a raid 6 array with 13 disks i wanted to check read/write performance, an easy way to do this fast on Linux (Debian) is simply using ‘time’ and ‘dd’:

bakis:/var/raid6volume# time dd if=/dev/zero of=./testingtransfer bs=16k count=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 1.48474 s, 181 MB/s

real	0m1.513s
user	0m0.008s
sys	0m1.456s
bakis:/var/raid6volume# time dd if=./testingtransfer of=/dev/null bs=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 0.156663 s, 1.7 GB/s

real	0m0.159s
user	0m0.004s
sys	0m0.160s
bakis:/var/raid6volume#

The ‘read’ test above isn’t real since the file has been cached . But a rsync is working in the background so I couldn’t umount /var/raid6volume for this example.

Initially I was doing this to test performance over nfs for the same array, one has to umount / mount the share between each test to make sure nothings in the cache.

Working with nfs, tuning wsize and rsize on the client side also gives a lot better performance (at least in my case), see the link bellow for more info.

I got these hints from debianhelp.co.uk

Categories: Uncategorized Tags:

Sun java plugin in Lucid Lynx

May 4th, 2010 Joar Jegleim No comments

I still need sun’s java plugin to access my internet bank. The recent Ubuntu 10.04 (Lucid Lynx) have removed sun packages from the official repository. But you can still quite easily install Sun java plugin by :

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-plugin

source: beeznest.wordpress.com

Categories: Uncategorized Tags: , ,

How much ram in my graphics card ?

April 28th, 2010 Joar Jegleim No comments

Nice command to find how much ram my graphics card has. Use ‘lspci’ to get the pci id and throw it back to lspci like this:

joar@juno:~$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 09)
joar@juno:~$ lspci -v -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 09)
	Subsystem: Lenovo Device 3a02
	Flags: bus master, fast devsel, latency 0, IRQ 30
	Memory at f4000000 (64-bit, non-prefetchable) [size=4M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 1800 [size=8]
	Capabilities: 
	Kernel driver in use: i915
	Kernel modules: i915

joar@juno:~$

Categories: Uncategorized Tags: ,

Ethtool is great

April 15th, 2010 Joar Jegleim No comments

Ethtool is a great tool you can use to adjust several settings at your NIC.
It’s especially great to detect if a cable is connected or not. Say you’ve got 3 NIC’s at your server, your hooking up one to the switch and wondering did I hook up eth0, eth1 or eth2 now (?)

# ethtool eth1
Settings for eth1:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: umbg
	Wake-on: d
	Current message level: 0x00000007 (7)
	Link detected: yes

As we can see ‘Link detected: yes, we’ve got a winner.
Note: you have to bring up the interface with :

# ifconfig eth1 up

or else ethtool will say the link is not detected even if a cable is attached.

Categories: Uncategorized Tags: ,

SSL and .pem problems while setting up ifolder test server.

April 14th, 2010 Joar Jegleim No comments

I’m looking at ifolder, and during installation on my test server I spent some time trying to get my head around the ifolder documentation regarding using .pem certificates with apache2. They explicitly say you have to export your self signed certificate as .pem with ‘ca certificate only’, on my OpenSuse test server /var/log/apache2/error.log kept on giving me

Init: Private key not found

This post gave me a hint on how to resolve this. Exporting the certificate as specified in the ifolder administrator documentation as ‘ca certificate AND the private key’ solved it all.

Categories: Uncategorized Tags: , , ,

Still not friends with Ekiga

March 24th, 2010 Joar Jegleim No comments

I was a bit quick on my last post, since Ekiga still haven’t got real support for pulsaudio I had to toss it.
Up came sflphone and they’ve got REAL support for pulse.

Categories: Uncategorized Tags: , , ,

Ekiga in Ubuntu Karmic hangs with pulse

March 4th, 2010 Joar Jegleim No comments

With reference to this post I finally figured out that I could after all use a Linux softphone with our iptelephony solution at work.
At first I tried Ekiga, since it’s Ubuntu’s default softphone app, but it didn’t really work, kept on hanging.
I tried Twinkle, which worked right out of the box, but using QT 3.x libs ? I just couldn’t settle with that. I don’t like to mix QT libs in my glibs environment and I REALLY don’t like to use really old QT libs if I must have them.
I took an other shot at Ekiga, and dug up this post at launchpad which solved my problems.
Upgrade to Ekiga 3.2.6 and things should be okay with Karmic, pulseaudio and Ekiga again.
Launchpad Ekiga 3.2.6 repo here.

Categories: Uncategorized Tags: , , ,

Disable GDM in Ubuntu 9.10

February 19th, 2010 Joar Jegleim No comments

When I need to disable services in Linux I’m used to symlinks in /etc/rc2.d
(for debian based distros) .
Ubuntu 9.10 doesn’t have any symlink for gdm in /etc/rc2.d
so how do I disable the freakin’ service ?
It seems gdm is started by upstart now, but they’ve also switched to grub2 and according to ubuntuforums.org we can control this from grub.

edit /etc/default/grub

Change the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

And issue:

# update-grub

Categories: Uncategorized Tags: ,

Importing information_schema from an other mysql server

January 27th, 2010 Joar Jegleim No comments

While investigating some mysql stuff at work I imported the whole mysql dump from our production system into my localhost installation. Among the 2000 or so databases was also information_schema, and I ended up with problems like :

root@pluto:~# /etc/init.d/mysql status
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user
'debian-sys-maint'@'localhost' (using password: YES)'
 *

The solution was to reset password fr debian-sys-maint user in mysql.

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost'
IDENTIFIED BY 'password' WITH GRANT OPTION;

Where ‘password’ is found in /etc/mysql/debian.cnf :)

I got this one from ubuntuforums.org.

Categories: Uncategorized Tags: