Posts Tagged ‘Linux’

File server = Epic Fail

Sunday, July 6th, 2008

So I spent a few hours redoing the File server setup, switching out the mother board drives etc… Only to recall why I never used the dual 1ghz machine in the first place.  When placing an IDE or SATA PCI card into the motherboard everything slows to a crawl.  Its some issue with the motherboard and is stated on the TYAN site.  So I wasted away a few hours of my life for nothing.  I did however reinstall the File server with the old hardware and a copy of Ubuntu Server.  The new install is much more optimized than the later which is the only plus from the experience.  Damn you TYAN and your Dual p3 motherboard issues.

Back in the mix.

Saturday, May 10th, 2008

After abruptly being woken up today nice and early I figured that I would put some work into my linux box. It was almost foreign to me, since I haven’t been doing anything linux since I moved. My Mediacenter has mainly just been sitting online running as a Transparent Squid proxy, Caching DNS server, Fileserver to my XBMC. The specs of the machine are as follows:

1.25ghz AMD XP
512 PC2700
784gb of Random SATA Drives.

As you can see its not anything that special, but houses a decent amount of drive space and handles everything just fine for my needs. That being said I wanted to squeeze a as much juice out of it as possible. I figured the best way to do this would be to remove any unused services that start, really no need in running cups when there is no printer connected to it. I also removed bluetooth, pcmcia, and a bunch of laptop services.
I really need to find my extra ram that I have laying around and spruce it up to 1gb of ram, as well as purchase another SATA card so I can add a few more drives that I have laying around. Adding the SATA card should boost me up to around 1tb of storage. More than enough space to start downloading the internets.

CPanel phpMyadmin MySQL Fix

Tuesday, November 6th, 2007

If you end up getting this error

#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)

Then you need to do the following.

vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

find
$cfg['Servers'][$i]['socket'] = ”;
change to
$cfg['Servers'][$i]['socket'] = ‘/var/lib/mysql/mysql.sock’;

next line
$cfg['Servers'][$i]['connect_type'] = ‘tcp’;

change to

$cfg['Servers'][$i]['connect_type'] = ’socket’;

You should be all set after that…

Tech Comic

Tuesday, October 9th, 2007

Jake sent this around, and if you are into computers it might hold true to you.
letting_go.png
[Click the image for a Larger view]

Dell Poweredge SC440 and CentOS 4.4

Thursday, September 13th, 2007

So we got a shipment of Dell Poweredge SC440’s in and I installed CentOS 4.4 on them only to find out the NIC stops working once you do so. By default the kernel installed is 2.6.9-42.ELsmp. Come to find this kernel does not work well with the BroadCom BCM5754. To fix this you need to download the 2.6.9-55.EL kernel. Install that RPM, edit the grub menu.lst and reboot. From there you can do a yum update and be on your way. If you don’t feel like doing this you can download the CentOS 4.5 iso’s and that will work as well. Stupid Dell changing up their hardware all the time.

AccuWeather.pl Cacti Fix

Thursday, September 6th, 2007

I got bored today and decided that I wanted to monitor weather in different locations with my Cacti setup. I obtained a copy of the AccuWeather perl script and also the XML file for Cacti, loaded it up and what do you know… It wasn’t graphing the Temp or the RealFeel®. With a little help from my friend Wezzul I was able to get it graphing correctly. I present to you the fixed perl script.

#!/usr/bin/perl
use warnings;
use strict;

use LWP::Simple;

my $httpaddr = "http://wwwa.accuweather.com/forecast-current-conditions.asp?partner=forecastfox&myadc=0&traveler=1&zipcode=" . $ARGV[0] . "&metric=0";

my %data;
my $content = LWP::Simple::get($httpaddr) or die "Couldn’t get it!";
$content =~ s/\ |\n//g;

# regex in html source order
if ($content =~ /(-?\d+)°/g) { $data{Temp} = $1; }
if ($content =~ /RealFeel&reg;< \/a>:< \/div>\s+<div style=".*" >(-?\d+)&deg;F< \/div>/g)  { $data{RealFeel} = $1; }
if ($content =~ /(\d+)%/g)  { $data{Humidity} = $1; }
if ($content =~ /(\d+)%/g) { $data{CloudCover} = $1; }
if ($content =~ /(\d+) mi/g) { $data{Visibility} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{MaxTemp} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{Dewpoint} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{MinTemp} = $1; }
if ($content =~ /(\d+) ft/g) { $data{Ceiling} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{Departure} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{ApparentTemp} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{HighPast6hrs} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{WindChill} = $1; }
if ($content =~ /(-?\d+)&deg;/g) { $data{LowPast6hrs} = $1; }
if ($content =~ /(\d+) mph/g) { $data{WindSpeed} = $1; }
if ($content =~ /(\d+) in/g) { $data{PrecipPast3hrs} = $1; }
if ($content =~ /(\d+) in/g) { $data{PrecipPast6hrs} = $1; }
if ($content =~ /(\d+) mph/g) { $data{WindGusts} = $1; }
if ($content =~ /(\d+) in/g) { $data{PrecipPast24hrs} = $1; }
if ($content =~ /(-?\d+\.\d+)&quot;/g) { $data{Pressure} = $1; }
if ($content =~ /(\d+) in/g) { $data{SnowOnGround} = $1; }

for (keys %data) {
  printf "%s:%s ", $_, $data{$_};
}
print "\n"
</div>