Traffic Visualization Generated From Hacker News via Logstalgia

I wanted to play with Logstalgia (https://github.com/acaudwell/Logstalgia) a little so I found an older Apache log file back in Jan 2013 from my website when I was fortunate to get some votes and get on the first page on Hacker News. The video is using standard Logstalgia compiled on Ubuntu 13.10. I accelerated the speed during capture and put a minute or two of the log in prior to HN activity to provide a sense of normal before 14:49 when things get crazy.

Hacker News Traffic Visualization via Logstalgia from Jonathan Mergy on Vimeo.

Decent settings for mbpfan.conf for a MacBook 8,2

macbookprofan

Fan-Control-Daemon has been working great for months on my MacBook Pro 8,2 running Ubuntu 13.04 natively but found it getting hotter and hotter all the time. So, I recompiled FCD from source and moved /etc/mbpfan.conf back to default but that really didn’t help. I had to mess with things a little. Of course, you mess with this on your laptop and you could fry it, so good luck to you. I’m not responsible for melted Macbooks.

But, here is my /etc/mbpfan.conf that I am happy with right now. I bumped the max fan speed up from the default of 6200 and messed with the temps a little while changing the check interval to 3 secs.

 

 

Installing Ubuntu Server 13.04 on an HP DL320e Gen8

20130425-150318.jpg

I just had the experience of installing Ubuntu Server 13.04 on a new HP DL320e Gen8 server and it was not as easy as it should have been. It’s kind of pain because Ubuntu is not one of the officially supported operating systems from HP on this server model. So, their “Intelligent Provisioning” is worthless to you. For some crazy reason, Suse Linux is supported but Ubuntu is not. Weird. Anyway, here is what you have to do if you want to get Ubuntu Server going on it.

BIOS Settings

The SATA “fakeRAID” controller from HP that is integrated is not supported, so you will have to run software RAID which you can configure via the Ubuntu Server installer partitioning steps. But, even leaving the setting in the BIOS to have it use the B120i HP RAID controller will mess-up booting into Ubuntu. The Ubuntu OS installer (tried 12.04 and end-up installing 13.04 as it was officially released today) will see the physical drives in the server bays no matter what the BIOS is set to, but the BIOS will have trouble booting after what felt like a successful install. So, you need to go into the BIOS and change the SATA controller setting to “SATA AHCI Support” so you will be able to boot post-install.

20130425-150406.jpg

20130425-150418.jpg

I believe the BIOS ships with the “Dynamic HP Smart Array B120i RAID Support” set as the default. It’s not that smart, so get it out of the way. You will be bombarded with warnings, but you have to do it. I did a bunch of test installs and this worked when all other options around leaving the “smart” setting going failed. You can get into the BIOS with F9.

Software RAID Configuration

I went with two terabyte drives and a simple RAID1 setup. If you set the BIOS SATA controller setting or not, the Ubuntu installer will see the individual physical drives in the bays. You need to not use guided partitioning and switch to manual. On each disk, create a partition map and give each drive the full free space you can without any partitions.

Once each drive has free space and partition maps through manual partitioning, you will get an option to do “Configure Software RAID.” Select it and create your RAID with the drives you have and right changes. Then, go into Configure the Logical Volume Manager” and create volumes on the RAID for root and swap.

20130425-150304.jpg

Yes, you can get fancy with more partitions and we all used to back in the day with various ones for /usr, /var, etc. but not really much of a benefit to do anymore. I match my swap size with the amount of RAM I have. In this case, I had a couple of 1TB drives sw mirrored and gave 8GB-ish to the swap space and the rest to root for Linux.

If you do these two major tweaks, you can get around the SATA problem with Ubuntu on the DL320e. If you get through an install and can reboot because it can’t find the volumes, check the BIOS setting and make sure it is on SATA AHCI or it will not find the installed Linux system and sw RAID.

20130425-150341.jpg

 

20130425-150354.jpg

Integrated Spamassassin and Postfix MTA Setup on Ubuntu

arrowlogo

The wiki entry on the Spamassassin wiki for the simple setup with Postfix is almost there. I recently setup my 12.04 Ubuntu server with Spamassassin with Postfix and everything is working well. I had to do a few more steps to get it working. Here is what I did.

1. Create the spamfilter.sh script detailed on the wiki. Place it in /usr/bin/spamfilter.sh and chmod +x it. Ensure the newly-created /usr/bin/spamfilter.sh has correct permissions (0755), and is owned by root:root.

2. Install/confirm spamassassin is there on Ubuntu

3. Create a new user in Ubuntu “spamd” and create a home directory for it. This is where Spamassassin is going to want to put the Bayes information. It will store it in /home/spamd/.spamassassin

4. Change the /etc/postfix/master.cf first smtp line to this

and add the spamfilter entry towards the bottom of the same /etc/postfix/master.cf file

Here is what mine looks like –

spamfilter

5. Start spamd. I just started it with a

6. Restart postfix and send a few emails in and out of the server to make sure you have a working system. You should see verbose scoring in headers or, if you get spam during this time, some verbose scoring totals in the email body like below.

496spamscore20130408

7. If things are working, you can now go in a tweak some stuff. The files you might want to mess with right off the bat are the spamassassin files in /usr/share/spamassassin

usrsharespamassassin

8. I edited the contact address and you can also change the flag on what you want your threshold to be and if you want to have SA insert the scoring in the body of the message as it does by default. These options are in:

and change “report_contact” to your email address

report_contact

and there are more options detailed over at the Spamassassin wiki >>  http://wiki.apache.org/spamassassin/FrontPage

Spamassassin and Postfix working together have been great. This is a simple setup with just a few components to minimize possible configuration issues or points of failure. Hope this helps.

Perl 5.16 on Ubuntu 13.04 (Raring Ringtail)

Update 2013-03-29: Caused some chaos with debconf. I have modified the sets a little to fix it.

perl516

If you need to move off Perl 5.14 which is the current distro packaged version on Ubuntu 13.04 daily, snag source and compile it. It works. But, I would reccomend leaving the 5.14 in the dkpg system due to the massive dependencies it has. Here is what I did.

1. Go into Synaptic and lock the version of Perl you already have installed. Removing it is going to cause massive chaos, so we are just compiling over it from source.

lockpackage1install perl 5.16 on ubuntu

lockpackage2

That way, any updates will not mess with the compiled version but everything in the dpkg system is okay.

2. I always go into /tmp to do the source grab and compile.

The current perl src as of this post is 5.16.3 but depending what is current later check http://www.cpan.org/src/README.html and snag it

Then open and compile

and accept most of the default values, but it will prompt for the executable path. The config will want to put everything in /usr/local which is fine except for the executables. You want to put those in /usr/bin instead of /usr/local/bin so it will displace the old version. It is your call and you could put it all under /usr but either way, you probably want those executables in /usr/bin to overwrite the 5.14 versions.

3. Copy the Debconf perl module into the path of the new perl compile @INC libraries. If you don’t do this, your whole package system updates and upgrades will fail.

4. Do the make trio

5. After that, you should have perl 5.16 installed. But, I would then go in and update CPAN.

and when you are in CPAN run

To get things up to speed and exit. Should be set.