latest posts

May 14, 2014

Knowing the AM1 Platform that my AMD Athlon 5350 APU/ASUS AM1I-A motherboard run on more than likely does not support IOMMU like my desktop's 990FX does I figured it was a detection issue with the Linux kernel that ClearOS 6.5 utlizes.

Doing some research into the issue there are a couple adjustments to your GRUB configuration that may or may not resolve the issue. In my case adjusting my GRUB arguments upon boot to include iommu=soft resolved the issue. I'm hoping down the road with newer Linux kernels the detection (if that even is the issue) gets better, but for those running an AMD "Kabini" APU and ran into this issue you'll at least be able to boot into your Linux distribution without any issues.

May 11, 2014

Continuing down the path of securing my home network, I wanted to get some sort of automated
reporting of traffic and other statistics. Looking around I came upon Monitorix, which offered everything I was
looking for. Unfortunately, adding Monitorix to my ClearOS 6.5 install wasn't as trivial as a
yum install. In addition, there seems to be a huge gap between the version all
of the online guides include (2.5.2-1) and the current as of this writing, version 3.5.1-1.
With some work I was able to get the latest installed and running with 1 caveat.

In addition depending on your setup, you may want to configure Monitorix itself
in the /etc/monitorix.conf file for an eth1 or other devices that
aren't "standard".

Once statisfied with the configuration execute the following commands:
[bash]
service httpd start
service monitorix start
[/bash]
Now you should be able to access Monitorix from http://localhost/monitorix.

Installing 3.5.1-1

Not content to be running a 2 year old version of the software if only for the principle of
it, I started to deep dive into getting the latest version up and running. I tried my best to
document the steps, though there was some trial and error in doing the upgrade. Going from a
fresh install you may need to execute some of the yum commands above, in
particular the first 2 commands.

First off execute the following commands:
[bash]
yum --enablerepo=rpmforge install perl-HTTP-Server-Simple
yum install perl-IO-Socket-SSL perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple
wget ftp://195.220.108.108/linux/Mandriva/devel/cooker/x86_64/media/contrib/release/perl-
HTTP-Server-Simple-0.440.0-3-mdv2011.0.noarch.rpm
[/bash]
These will download the neccessary prequisites for the newer version of
Monitorix. Next you'll download and install the new rpm:
[bash]
wget http://www.monitorix.org/monitorix-3.5.1-1.noarch.rpm
rpm -U monitorix-3.5.1-1.noarch.rpm
[/bash]
Then restart httpd and monitorix:
[bash]
service httpd restart
service monitorix restart
[/bash]
After restarting you may notice an error:
[bash]
Starting monitorix: Can't locate HTTP/Server/Simple/CGI.pm in @INC (@INC contains:
/usr/bin/lib /usr/lib/monitorix /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .)
at /usr/lib/monitorix/HTTPServer.pm line 27.
BEGIN failed--compilation aborted at /usr/lib/monitorix/HTTPServer.pm line 27.
Compilation failed in require at /usr/bin/monitorix line 30.
BEGIN failed--compilation aborted at /usr/bin/monitorix line 30.
[/bash]
Doing some research, for Perl to adjust the @INC path permenantly,
it requires a recompile, so in order to fix the problem permenantly for Monitorix simply copy
/usr/lib/perl5/vendor_perl/5.X.X/HTTP to the
/usr/lib/monitorix/.

After copying the folder, you may also need to verify the path changes for the new version in
the /etc/monitorix/monitorix.conf to match the following:
[bash]
base_dir = /var/lib/monitorix/www/
base_lib = /var/lib/monitorix/
base_url = /monitorix
base_cgi = /monitorix-cgi
[/bash]
Also verify the first few lines match the following in the
/etc/httpd/conf.d/monitorix.conf:
[bash]
Alias /monitorix /usr/share/monitorix
Alias /monitorix /var/lib/monitorix/www
[/bash]
After restarting httpd and monitorix (same commands as above), I was
presented with a "500 Internal Error". Knowing the errors are logged in the
/var/log/httpd/error_log file I immediately scrolled to the end to find out the
root cause of the internal error:
[bash]
Sat May 10 23:12:04 2014] [error] [client 192.168.1.230] Undefined subroutine &main::param
called at /var/lib/monitorix/www/cgi/monitorix.cgi line 268., referer:
http://192.168.1.1/monitorix/
[Sat May 10 23:12:04 2014] [error] [client 192.168.1.230] Premature end of script headers:
monitorix.cgi, referer: http://192.168.1.1/monitorix/
[/bash]
Having not done Perl in nearly 12 years, I simply went to line 268:
[bash]
our $mode = defined(param('mode')) ? param('mode') : '';
[/bash]
Looking at the error, it looks to have stemmed from the param calls. Knowing for myself this would always be localhost, I simply updated the line to the following:
[bash]
our $mode = 'localhost';
[/bash]
Attempting to restart monitorix again I received the same error on the next line, so for the time being I "hard coded" the values like so:
[bash]
our $mode = 'localhost'; #defined(param('mode')) ? param('mode') : '';
our $graph = 'all'; #param('graph');
our $when = '1day'; #param('when');
our $color = 'black'; #param('color');
our $val = ''; # defined(param('val')) ? param('val') : '';
our $silent = ''; # defined(param('silent')) ? param('silent') : '';
[/bash]
After saving, restarting Monitorix I was presented with the Monitorix 3.5.1-1 landing page:

Clicking on Ok I was presented with all of the graphs I was expecting. To give a sample of a few graphs:

In the coming days I will revisit the error and dig up my old Perl books to remove the hard coded values. Hopefully this helps someone out there with ClearOS wanting to get some neat graphs with Monitorix.

May 09, 2014

As some maybe aware, I recently purchased an Asus AM1I-A for a new ClearOS machine to run as a
firewall. The installation for ClearOS 6 went extremely smoothly, but upon restarting I kept receiving kernel panic errors from eth1 (the onboard Realtek RTL8111-GR).
After doing some investigating, it turns out RHEL and thereby ClearOS have an issue with loading the r8169 kernel module when it detects the RTL8111 (and the 8111
variants).

Hoping to get more of these ports knocked out in the coming days so as always check back here. In addition I'm hoping to get an official page up and running with all of the release conveniently located instead of the current situation. No eta on that project however.

Sep 29, 2013

As noted in my Asus X55U Notebook write up earlier today, I ported over jcBENCH to x86/Linux. Luckily, there were only minute changes required from the ia64/Linux port. Interesting the /proc/cpuinfo is handled differently between SLES 9 and OpenSUSE 12.3. I'll have to do further investigation on the reasoning behind that.

Jan 11, 2012

After some more thought about jcBENCH and what its real purpose was I am going to drop the Solaris and IRIX ports. Solaris has a Mono port, but I only have Sun Blade 100 which has a single cpu. Not expecting a ton of performance from that. IRIX on the other hand, I have a Quad R14k 500 Origin 300, but no port of Mono exists. So I could port it to Java, but then you really couldn't compare benchmarks between the Mono/.NET versions. I am about 50% done with the Android port and am just waiting for the OpenSuse 12.1 compatible MonoDevelop release so I can get started on the Linux Port.
After those 2 ports are completed I am thinking of starting something entirely new that I have been thinking about the last couple years. Those that deal with a SQL database and write a data layer for his or her .NET project, know the shortcomings or doing either:

Using an ADO.NET Entity Model, adding your Tables, Views and Stored Procedures and then use that as is or extend it with some business logic

Use an all custom data layer using the base DataTable, DataRows etc, wrap your objects with partial classes and create a "factory"

Both approaches have their pros and cons, the first takes a lot of less time, but you also have a lot less control and could be costly with all of the overhead. Both however will eventually fall apart down the road. The reason, they were built for one audience and one production server or servers. How many times have you gone to your IT Manager and asked for a new Database server because it was quicker then really go back to the architecture of your data layer. As time goes on, this could happen over and over again. I have personally witnessed such an event. A system was designed and built for around 50 internal users, on a single cpu web server and a dual Xeon database server. Over 5 years later, the code has remained the same yet it's been moved to 6 different servers with ever increasing speed.
Times have changed and will continue to change, workloads vary from day to day, servers are swapped in and out, so my solution, an adaptive, dynamic data layer. One that profiles itself and uses that data to analyze the server to use either single threaded LINQ queries or PLINQ queries if the added overhead of using PLINQ would out way the time it would take only using one cpu. In addition using Microsoft's AppFabric to cache the commonly used intensive queries that maybe only get run once an hour and the data doesn't change for 24. This doesn't come without a price of course, having only architected this model in my head, I can't say for certain how much overhead the profiling will be. Over the next couple months, I'll be developing this so stay tuned. jcBENCH as you might have guessed was kind of a early test scenario of testing various platforms and how they handled multi-threaded tasks of varying intensity.

Jan 04, 2012

Finally got a Silicon Graphics Visual Workstation 330. Not a traditional Silicon Graphics by any means, but the case was neat and fufills a nostalgic purpose.
[caption id="attachment_29" align="aligncenter" width="550" caption="SGI VS 330 in box"][/caption]
[caption id="attachment_31" align="aligncenter" width="550" caption="SGI VS 330 Sideview"][/caption]
Not wanting to be limited to Dual Pentium 3 933mhz CPUs and no SATA support, I used a spare CPU, ram and motherboard I had laying around.
[caption id="attachment_32" align="aligncenter" width="550" caption="Asus M4A89GTD/USB3, Corsair XMS3 16gb, Athlon II X3 435 and Crucial 64gb"][/caption]
In addition I swapped out the rear fan, being 11 years old it was quite noisy. I had a spare CoolerMaster 120mm low-rpm Blue LED fan that fit perfectly in the back. All in all, pretty smooth swap. Downloaded the Network Install CD of OpenSuse 12.1, installed it and was ready to go in under an hour.
In it's completed form:
[caption id="attachment_33" align="aligncenter" width="550" caption="Completed swap of parts out of the SGI VS 330"][/caption]
All that's left now is to de-scuff the case to bring it back closer to a new state.