MMEncode is not available on Linux distros any more.

Posted by admin - Under: Linux, Software

Not sure what happened to this or why but its no longer available. I used to have a script that used it to convert binary data to text for attachments on emails. Having searched high and low I came up with a new solution – use openssl.

You can do the same that you were doing with mmencode by doing the following

openssl base64 -e < $FILE

Enjoy.

MySQL pegging CPU after the leap second adjustment.

Posted by Paul Farrow - Under: Linux, Software

So I find that my MySQL database is running high on CPU all of a sudden. I optimize the tables etc and no difference. I hunt around the internet to find that there seems to be a problem with this years leap second adjustment which sends MySQL into orbit.

The solution reset the date

date -s "`date`"

and it dropped back to normal.

Credit goes to this lady here http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix

BackupPC Has qw(…) Warnings Since Upgrading Perl

Posted by Paul Farrow - Under: Linux, Software

So since upgrading Perl I am presented with qw warnings coming out of the cron job checking that BackupPC is running.

Use of qw(...) as parentheses is deprecated at /usr/share/BackupPC/lib/BackupPC/Storage/Text.pm line 301.
Use of qw(...) as parentheses is deprecated at /usr/share/BackupPC/lib/BackupPC/Lib.pm line 1412.

The way to get rid of these warnings is to enclose qw in parentheses and Perl processes the foreach parameters without warnings.

Like so

Text.pm (Line 301)

#
# Promote BackupFilesOnly and BackupFilesExclude to hashes
#
foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
next if ( !defined($conf->{$param}) || ref($conf->{$param}) eq "HASH" );
$conf->{$param} = [ $conf->{$param} ]
if ( ref($conf->{$param}) ne "ARRAY" );
$conf->{$param} = { "*" => $conf->{$param} };
}

Lib.pm (Line 1412)

foreach my $param (qw(BackupFilesOnly BackupFilesExclude)) {
next if ( !defined($conf->{$param}) );
if ( ref($conf->{$param}) eq "HASH" ) {

#Rackmax #SATA Enclosure With A Silicon Image SiI3114 PCI SATA Raid Card

Posted by Paul Farrow - Under: Hardware, Linux, Mini-ITX

Last week I bought a Rackmax 4 x 3.5 Sata Enclosure from Linitx.  It has four drives but fits inside 3 x 5.25 external slots.  Initial inspection was that its well made and rugged.  Only niggle I had was that the two power molex sockets on the back are quite close together and because of this you cant use sata to molex power converters in it or not the ones I have cause the sata moulding touches and pushes the plug out of the socket.

There were no other problems, I housed it in an Antec mini tower just fine.  Kept the fan on the back which is a little noisy but not too bad, it seems noisy because the motherboard is fanless and the Antec case has a 120 mm fan which together is basically silent and this fan is the only thing in the tower making any noise.  Now I put disks a couple of old 250Gb Samsung Spinpoint SATA II drives in it which just happened to be laying around in my office and bought a couple of 1TB Samsung Spintpoint SATA II drives from Ebuyer.  Mounted the drives and put them in the Rackmax enclosure.  Powered it up and all the lights came on and went off but one of the drives in the Rackmax enclosure had a solid yellow light on which I think signals a problem.  I swapped them around and another light came on a different drive !!! wierd so I just put it down to the fact that the enclosure wasnt configured properly yet with the motherboard.

Ok so while I bought the terabyte drives I also bought a 4 port sata raid card from Linitx, it was only a cheapy and just thought its bound to be fine with Linux.  Linitx are a very reputable dealer who specialise in small form factor motherboards and embedded systems.  So got it slotted into my fanless VIA EK8000 board and plugged the drives up.  Powered it up and it just halts on when it is declaring what SATA drives it has on itself.  MMM I thought to myself wonder if its all SATA drives or what?!  So I unplugged the drives and powered it up and went through no problem.  So then I thought perhaps its a size thing so just plugged up one of the 250Gb drives and powered it up.  The system booted fine.  So tried again with the terabyte drive and low and behold it just halts before it even gets to the Linux boot up.  Ok so looked up the model of SATA card I have and it is the Silicon Image Sil3114 PCI SATA Raid Card.

Now some people on the web are saying it is because it cant negotiate the lower 1.5Gbps speed with the SATA II drives and to set your drives to the lower speed.  So thought ok that sounds feasible and set about lowering the speed from SATA II to SATA I on my Samsung drives.  Now Samsung have a utility that does this for you.  Downloaded it off their website and tried it.  The ramdrive they have wont load on anything other than a proper Intel processor.  It wouldnt load on my VIA C7 board or my Atom board.  Therefore I had to break apart my desktop just to be able to flash the drives – it was a real ROYAL pain.  Did all that put my desktop back together and still had a problem arrrhghghghghghg.  Ok so now I thought it has to be a BIOS problem on the SATA Raid card.  Low and behold the BIOS on the card was at 5.0.37 and the latest update was at 5.4 something.  Gosh that was like 4 years out of date !!!  So now did I have to break open my desktop just to flash the BIOS.  No after reading up on the flash utility etc I realised that it can be flashed in windows from the device manager.  So opened my Atom machine running Windows 7 (purely because it has an easy access case) and put the card in there.  I then downloaded the latest drivers for the card via Windows Update and went into the device manager and right clicked on the device and there is a tab called flash bios.  Clicked there browsed to the image and flashed it.  Couldnt have been simpler.   I took the binary prefixed with the letter R.

Threw the card back into the VIA board booted with the terabyte drives in it and it came up fine.  Just wish I had done that first rather than thinking it was because my drives needed to be downgraded.

And its all running very smoothly now.

Checkpassword-0.90 Compilation Error on Fedora Core 3

Posted by Paul Farrow - Under: Linux, Mini-ITX, Software

Ok now next problem that I ran into in trying to get qmail running on the distrubution is that checkpassword-0.90 doesnt want to compile and looking on the web there is 1 arabic website explaining how to get around this which I cant understand but with again more pain I have finally cracked it.

In the source directory of checkpassword you will need to change the error.h file to include errno.h just after the line extern int errno like so…

extern int errno;

#include

then recompile and everything should work. 

POP3: unable to scan $HOME/Maildir?

Posted by Paul Farrow - Under: Mini-ITX, Software

Ok I run qmail here and funny thing was outlook wasnt logging into it. Thought I had been hacked or something. To see what the problem was I telnetted into my qmail box using

telnet mail.farrowcomputing.com 110

port 110 is the port designated to pop3, then put in your username

user  “username”

then password

pass “password”

and on my system was then seeing “Unable to scan $HOME/Maildir” looked into it and had 6000 spam messages, now the limit I have for mails is quite low so you either need to up it or delete some of the messages from the linux box running qmail or you will need to put the softlimit up, ie.

Try to increase the softlimit for pop3d which is found in your pop3d run script such as /var/qmail/service/pop3d/run (for e.g.): 

blah blah… softlimit -m 2000000 to higher value.