Sunday, August 27, 2006

Ubuntu on Dell 1950

When it comes to putting together a kick-ass Linux box, I usually prefer building my own box. It generally works out better, I get to pick the hardware so I know it's quality and I know that the support in Linux is very good.

However, there are sometimes when building your own box isn't practical. I recently found myself in this situation, and I had to purchase some pre-built rack mountable machines from a vendor. Here's what I wanted minimally in each machine.

- 1U rack mountable
- Dual Core processor
- 64-Bit processor
- DDR2 memory
- 10K RPM SATA Hard Drive
- Dual Giga-Bit Ethernet

And I need them to be inexpensive because I was working on a small budget.

The machine I ended up selecting was the Dell 1950, which at the time was a brand new offering. Technically the machine more than met my prerequisites including the low cost. However my biggest concern was that the support for Linux would be poor.

Upon receiving the machines, I began to experimenting with two different distributions of Linux (Ubuntu Dapper Drake, and Suse 10.1). Here is what I found out.

Ubuntu (6.06) "Dapper Drake" Server
I chose the Server version from Ubuntu for the following reasons, it's absolutely free, it is only one CD to download, it takes less than 10 minutes to completely install, and it installs a very minimal set of tools which are perfect for creating a server to do just about anything. My favorite thing about Ubuntu Server is that is comes with NO servers pre-installed.

If you are going to install Ubuntu on a Dell 1950, make sure that you download the 64-bit version of Ubuntu. If you try to install the 32-bit version, the install will not complain. It will install normally, but you will not get any of the benefits of the 64-bit processors in the system.

My biggest concern was that the installer would not be able to find some of the hardware. The Ubuntu Server installer was able to find all of the hardware in the system, except the network cards (Broadcom® NetXtreme IITM 5708). At first this seemed like a major problem, however I was able to continue through the installer by telling it to ignore the fact that it couldn't find my Ethernet. Everything else installed fine. However, when the installer went to reboot the system, the screen locked up completely. Yikes! So I held in the power button, the system turned off. I powered up the system and was happily greeted by the login prompt.

After logging in, it was my first priority to try to get the Ethernet working. Upon closer examination, I found that Ubuntu had already loaded the driver I needed, and all I had to do was configure my devices. So I opened up the /etc/network/interfaces file and add records for each Ethernet device, and restart the network (sudo /etc/init.d/networking restart). Sure enough I had two fully functioning Ethernet devices.

After a little bit of poking around, it seems that the kernel on the installer CD doesn't have the driver that is needed for this network card, but that the kernel that is installed does have the correct driver. The driver that worked for me was called 'bnx2'.

In addition to my good fortune with the network cards, I found that when I rebooted the system, it no longer froze. So other than these two small gotchas I was able to get the system working perfectly, with a very minimal amount of work.

OpenSuse 10.1
I'm going to start by saying I had a major problem with the Suse installer, so I didn't pursue working with it for very long. The problem I had was that the installer wouldn't recognize the hard drive. I'm not exactly sure what the problem was because it seemed to load the drivers for the SAS controller without any problems. But something wasn't right because it couldn't find the hard drive at all.

I would imagine that if you were using Suse Enterprise edition, this problem wouldn't exist as Dell ships a CD with a special installer program that is used to give the Dell drivers to the Suse installer. Unfortunately this software would not work with OpenSuse.

Summary
If you are looking for a reasonably priced server with great performance I would recommend the Dell 1950. In addition, if you are looking to run Linux on it, I would recommend using Ubuntu Server. It is easy to setup on this hardware, and is a very solid distribution overall.

Sunday, July 30, 2006

Gateway 7210gx

If you have a Gateway 7210gx laptop, and you need to reinstall Windows on it here are some helpful pointers for you.

Pointers

1.) Download the drivers from Gateway's support website before you reformat. A fresh install of Windows will not have drivers for either network card. So if you don't do this first you will have to download them on another computer and burn a CD of them.

2.) The Gateway support website doesn't have a driver for the fast Ethernet card. It is a Broadcom 4401. You can download the driver directly from Broadcom.

3.) When installing the wireless network card, if you are using Windows XP, I do not recommend running the setup utility. It installs some additional applications that just seem to get in the way of Windows. It's just easier to use the built-in support. If you are using Windows XP Service Pack 1, upgrade to Service Pack 2 first.

All you really need to do is go to Control Panel -> System -> Hardware (Tab) -> Device Manager. Right click on the unconfigured wireless device, select "Update Driver". Click "No not this time". Click "install from specific location (advanced)". Click "Don't search. I will choose the driver to install.". Click "Have Disk". Navigate to the files you downloaded from the Broadcom website. Select the 'inf' file. Finish the Wizard. You should be all set.

4.) To install the Ethernet card, just do the same thing as above. Device Manager, Have Disk, etc...

5.) There are some drivers for the keyboard from the Gateway site that you can install, I did and it didn't really seem to do much.

6.) There is a software package for the touch pad. This is not required to use the touch pad, it just installs some software that lets you tweak some of the settings on the touch pad.

7.) I had some problems with installing the display card / video card. I downloaded the driver from Gateway's support page, unpacked the driver, and ran the setup. However instead of installing ok, I got this message.

"Setup was unable to find components that can be installed on your current hardware or software configuration. Please make sure you have the required hardware or software."

In addition if I tried to just install the driver, which has a separate installer. I got an error "INF Error", "Video driver not found".

I had to go through the procedure above to install the video driver. Device Manager, Have Disk, etc... There is a large list of drivers to install, I choose the first one for Radeon 9600 / 9700 Series. It seems to work well.

After a reboot, I then installed the ATI control panel which is a separate installer that the driver. Now everything seems normal with the display driver.

Thursday, June 22, 2006

MythTV Pitfalls & Help: 2

This is my second post on MythTV. The first post went through some of the very basics like MythTV can do and some basics about choosing hardware. If you have any questions about that stuff check out the first post or the MythTV docs.

Step 1

The first step to getting a MythTV box setup is picking and install your favorite Linux distribution. There is no "best distro", but some of the most popular are Ubuntu/Kubuntu, Suse, Mandrake, and Fedora. I used Ubuntu for my choice because I had never used it and wanted to see what it was like. Choose your favorite in the end it doesn't really matter.

Additional Distro Comments
If you have little Linux experience I would highly recommend using Ubuntu or Kubuntu. (The difference is that Ubuntu will install Gnome as the default desktop and Kubuntu will install KDE. Once you install one you can install the other as well.) Both are very easy to use, have very good installation programs, package management tools (Add / Remove Software for windows people), and are very easy to get help with. The Ubuntu installer picked up all of my hardware basic (not my encoder card) including my wireless card (madwifi). I was then through the package management software able to install the Nvidia drivers for my video card.

Step 2
At this point I had all of my hardware basic hardware setup and configured. It was no time to get the Video Encoder Card to work. As I mentioned before I purchased the PVR-350 from Hauppauge. This card has great support under Linux with the ivtv drivers. The ivtv site has a good Howto for installing on "Breezy Badger". I did not see this till after I installed so I didn't use it plus I use "Dapper Drake". Anyway the install is not that difficult. Here are the key points.

1.) Download the 0.4.X version, it's probably the one you will need. When in doubt run 'uname -r' to get your current kernel version. If your kernel is less than or equal to version 2.6.15 then you want version 0.4.x. If it is above that use the 0.6.x version. (This may change with time, consult the documentation if in doubt)

2.) Make sure you install the development tools for Ubuntu and make sure you install the kernel headers package. If you don't install this stuff you may get errors. Missing libraries, gcc, libtool, etc... Also if you have errors compiling the kernel modules you probably didn't install the kernel headers package.

3.) Next compile with 'make', and install with 'sudo make install'.

4.) Next download and install the firmware for the device. This is a critical step and the card will not work without the firmware. You can extract the firmware from your windows cd or download it from the website. Here is where you can find more about this. On "dapper drake" the firmware files go in /lib/firmware/.

5.) Make sure none of the modules are currently running by executing this command. 'sudo rmmod ivtv cx25840 tuner tveeprom msp3400 wm8775 tda9887 saa7115 saa7127' The execute this command to load the new drivers. 'sudo modprobe ivtv'.

6.) You can use dmesg and / or look at /var/log/messages to make sure the correct modules are loaded.

7.) You can test the input of your newly installed card by running the command 'cat /dev/video0 > test.mpg'. Then open 'test.mpg' with MPlayer or some other media player. You can test the output by running the command 'ivtvfbctl /dev/fb0 -noglobalalpha -localalpha; dd if=/dev/video0 of=/dev/video16 bs=64k'.

This install was not very difficult as long as you installed the development tool required and the kernel headers. Please do realize that if you install ANY kernel updates you will need to recompile and reinstall these drivers! To be safe I would recommend updating your kernel headers, running 'make clean', 'make', and 'sudo make install'.

At this point you should have a working encoder and decoder card. If you do not visit the ivtv website and figure out the problems and fix it. Do not proceed until you get this working.

Here is a good link that I used to get my system setup. http://www.willmer.com/kb/mythtv/. Also this link even though it is mostly for Fedora is great also. http://wilsonet.com/mythtv/fcmyth.php.

I'll be continue with building and install mythtv next. Leave your comments / questions.

Sunday, June 18, 2006

MythTV Pitfalls & Help

If you've been thinking about getting a personal video recorder to improve your TV viewing experience, but are not sure where to begin, perhaps I can help you out. I have recently gone through the process and I think you can benefit from it.

The first thing you should know is that you have options, depending on your technical expertise and requirements.

Option One
When you think PVR, chances are you think TiVo. After all they the "big cheese". They build very easy to use and powerful devices. If you don't want any hassles buy one of these devices. The up front cost is low, just realize that you are going to be paying a monthly fee (currently $12.95) for the rest of the time you own the device. Replay-TV is another maker of similar devices, I don't really know much more about them though.

Option Two
If you don't want a TiVo you can try Microsoft's Media Center. I don't have a lot of details about them, but you can buy a PC from the usual vendors (Dell, HP, Compaq, or Sony) that runs the Media Center version of Windows XP. This is a decent option if you don't want any hassles. It works out of the box and phone support is available if you need it. It is more expensive initially and I don't know if there is are any recurring charges.

Option Three
The last option and the option I chose is to use Linux. There are two main software choices available that will give you a menu driven, "TiVo" style PVR, MythTV and Freevo. I opted for MythTV as it had more of the features I was looking for in a PVR.

Other Considerations

If you are going to go the Linux route here are some things you may want to consider when determining which software package is right for you.

1.) First go to both websites MythTV and Freevo and compare the features offered by each system. I'm not going to list them here because both project are under development and making improvements regularly.
2.) Realize that MythTV is written in C++ so it will be faster, but slightly more complicated to work with and build. Freevo is written in Python which doesn't need to be compiled but can be slightly slower than MythTV.
3.) Look for available binary distributions available with your favorite Linux distro. They are available with some distro's and can save you a ton of time.
4.) Look for support for your TV Tuner Card. (See more below)

There is no right or wrong choice, it just depends on what suites your needs better.

Notes on Tuner Cards
There are a number of Tuner cards that will work under Linux. They can be classified by their abilities: input/tuner, encoding, decoding, output. Minimally you will need a tuner / video input card. Some video cards have these built in, if yours doesn't then you will need to buy an additional PCI or USB card to do this. Better cards offer more types of inputs (Composite, S-Video, Coaxial), better analog to digital converters, and higher data rates. In addition these card may contain an encoder chip. This chip will be used to encode the video into a specific format (MPEG2/4 commonly) in hardware, rather than requiring your CPU to do it.

If your video card does not have a TV output, then you will need to get a tuner card that also has TV out on it. Optionally the output card may decode compressed video (MPEG2/4) in hardware relieving your CPU from the task.

The more of these features you require the more expensive your tuner card will be. For more on tuners see the Wikipedia.

I went with the PVR-350 from Hauppauge. It has a input and output, plus a MPEG2 encoder / decoder in hardware.

My system consisted of an Pentium 4 2.4GHz processor, 512 MB of RAM, a 250GB hard disk, and a wifi card. This is probably overkill since the tuner card has a built in MPEG encoder / decoder, but I'm being cautious since this is the first one I'm building.

That's it for now. I'm going to post a few more articles later this week. Check back for more info.

Wednesday, March 08, 2006

The Mythology of Internet Multimedia Statistics

Just the other day I was reading articles on diggdot.us, a cool content aggregation website consolidating links from Digg, Del.icio.us, and Slashdot, and I found an article about a singer in the UK who is web casting prerecorded shows of her playing music in her basement. The article itself was a short piece describing what she's doing and how successful she's been doing it. I say good for her. That's not the most important issue here. The most important issue is that the article is a total sham.

Let me explain what I mean. According to the 'Times Online UK' article she started web casting shows on February 24th. That's ten days from the Times article's publication, on March 5th. The article goes on to say that she had 70 people watch her first show, and 62,138 people watch her show ten days later. That means she gained at least 62,068 fans over ten days or 6,207 per show on average.

Do you know that the Major League Baseball Cleveland Indians stadium, Jacobs Field, only hold 43,368 people?

I would say that this is a pretty remarkable feat. To go from a nobody, to more than selling out an entire baseball stadium in ten days. I think it is so remarkable, that I'm willing to call it total crap. No, I'm not accusing the woman or the Times journalist of lying, I just believe that they, like most people, have no idea how to interpret the statistics given to them about their on-line media events.

So who am I and why do I think this story is pure shenanigans? Well, I work for a company who provides multimedia streaming of live and prerecorded content on the Internet. We provide about 15,000 live audio broadcasts per year, and we rebroadcast all of these events on demand for our customers. We also broadcast live video, and we are expecting to do at least 500 events over the next year. My job for the company is to manage some of the equipment used to broadcast these events, and to write and maintain the software the provides our customers with accurate and understandable reports on their event usage.

Typical Statistics

As a service provider, my company provides and manages the equipment and bandwidth to broadcast multimedia events over the Internet for our customers. The technical details of how all this is done is outside the scope of this rant. What will be discussed though is the statistics and reporting process.

No matter how you distribute you media, if you do it on the Internet, the process will leave you with detailed log files. In most cases these log file contain information describing the content receiver. Information such as IP address, date, time, duration, and bandwidth is recorded in these logs. The logs are very similar to logs written by a web server, except they contain slightly more information.

The information in the log files is then used to provide useful reports to the service provider's customers. Most service providers will give you the following information on a per day or per event basis: connections, unique IP addresses, bandwidth used, peak bandwidth, average duration, maximum duration, minimum duration, and many other things. So what do these stats really mean?

Connections

A connection results from every media player that successfully receives you event for some period of time. I find that this statistics is the single largest point of confusion for content providers today. The confusion stems from service providers historically and to some extent still today reporting this statistic or some multiple of it to their customers as being an indicator for the number of actual people whom have received a content provider's event. This claim is in undoubtedly false, as it would require you to believe that every media player that connected your event listened for the entire duration of that event. For proof that this is false take a look at the average duration statistic reported by your service provider. For this claim to be true, the average duration would have to be equal to the entire length of your event.

So what good is this statistic really? I find that this statistic can be used to find problems with your broadcasts, as this statistic will peek very sharply when your broadcast is having trouble. If you are familiar with web site statistics, this statistic is comparable in meaning to 'Pages' or 'Page Views'.

Unique IP Addresses

Every computer that connects to your event has an IP address, and the service provider's media server logs these addresses. The unique IP address report, generated by most service providers, results in giving you a unique set of all the IP addresses that received your event for some period of time.

I find that because of the use of network address translation or (NAT), this statistic looses some of its meaning. In spite of this, I usually consider this statistic to be a good indicator of the actual number of people who have received an event. If you are familiar with web site statistics, this statistic is comparable in meaning to 'Unique Visitors'.

Bandwidth

Bandwidth is a very basic statistic that is reported directly from the log files written by the server. Typically a service provider will summarize the bandwidth you've used over your billing period and use this to charge you. For more explanation, see the Wikipedia entry for Bandwidth.

Duration

Every media player that receives your event does so for a specific period of time. This amount of time is the duration. The duration by itself is not very helpful. It is usually shown in conjunction with the connections statistic. This allows your service provider to give you more meaningful statistics such as the average duration, minimum duration, maximum duration, and median duration.

These statistics can be used for a wide range of things, but are usually used to better understand the habits of your listeners or viewers.

The Holy Grail

If you're still reading and I've done my job, then you should have a better understanding of the statistic given by most service providers. What you are still missing and what you really need, are what I consider 'The Holy Grail' of Internet media statistics. I did not just make these up either. They come from many conversations with our marketing department and our customers.

Actual Number of People

Most people do not care about any of the statistics listed above; all they want to know is how many people received my event. Unfortunately there is no definite answer to this question. Why you might be wondering? Well it has to do with the fact that none of the information recorded in log files is actually about people. It is all about the computer and media player that connected to the event. All hope is not lost though. I can recommend some pointers for creating approximations.

The first step to knowing your users is to get some information about them. Don't give away access to your event until your user's have logged into your website. This way you can have email addresses, phone numbers, names, or whatever other information you require. Now that still doesn't give us an actual person count, but it gets us closer.

The second step, now attainable with the data from step one, is to survey your listeners. You can ask them whatever you want, but the most important thing to ask them is 'When you watched or listened to my event, how many people watched or listened with you?'. This is what you need to know to estimate a number of people who have received your event.

Once you receive a good sampling from your survey, take the average number you receive from this question and multiply it by the number of unique IP addresses given to you by your service provider. This will get you a fairly accurate estimate for the actual number of people who have received your event.

Advertising Statistics

If you're looking for advertising statistics then I would recommend using the same metric used with TV and Radio stations, listeners per quarter hour. Fortunately for you, this statistic can be easily calculated and is not an estimate, it is an exact count. Our company provides this report to our clients in the form of a convenient graph, and I'm sure that your service provider should be able to provide you with this report as well. I highly recommend asking for this report as I find it not only interesting, but very useful as a performance metric. It would also be vital for selling any ad spots during your event.

Conclusion

We've come a long way from my initial rant, and hopefully you have all learned a thing or two about Internet media statistics. I feel that it is very important for people to grasp and understand these statistics because if they don't they will end up caught believing the hype and not knowing the truth. To the average person this isn't the end of the world, but to content providers and advertisers this equates to actual dollars and cents.

I hope that after reading my article you have a better grasp of web media statistics, and that you can now see through the hype and bullshit surrounding them on the web.

As always leave me your comments, and let the world know your opinion.

Monday, February 20, 2006

Why You Should Choose Linux!

I've been using Linux for almost seven years. I've seen it progress along, coming from a hacker's best friend into a full fledged power house operating system that even your grandma can use. So why should you use Linux?

In order to make a more compelling argument I've separated this guide into two main sections: reasons to use Linux on a server and reasons to use Linux on a desktop. Some over lap so I encourage you to read both sections.

Linux As A Servers

No expensive licensing fees

Unlike Windows and Mac OS X, every Linux distribution is provided free and can be used or extended as you or your business see fit. Typically this frees from $100 - $4000 dollars for you to spend on something else.

Supports extensive number of server protocols: http, smtp, imap, pop3, samba, nfs, afp, etc...

Linux, through the help of the Open Source Community, offers almost any server you may need to run, and in some cases the Linux server is more reliable, more efficient, and more popular than it's Windows counter part. (Please note that Mac OSX also uses many of the same servers that are available to Linux users.) Here's a list of some of the server protocols supported by Linux: http, smtp, imap, pop3, samba, afp, ftp, ssh, telnet, sip, mgcp, and many others.

Added On 2006-03-07:
As requested here are some links to great server products
www.apache.org
www.postfix.org
www.courier-mta.org/imap
www.samba.org
netatalk.sourceforge.net
www.openssl.org
www.asterisk.org

Secure out of the box

Linux is naturally secure out of the box. Most distributions come with a suite of security features, including a firewall, IPSec, and Security-Enhanced Linux, which is a super secure version of the Linux kernel developed by the NSA. In addition to its security features, Linux is also much more resilient to attach by viruses and worms, and tends to receive security fixes much faster than other operating systems.

Enterprise support contracts available

There are a large number of companies that offer support for Linux; including IBM, Novell, and RedHat. The large number of choices can enable your business to find a solution customized to its exact needs.

Large friendly communities

In case you can't fork over the money for professional support, you can turn to the open source communities. These are usually bulletin boards, email lists, or IRC chat rooms where groups of users congregate to help each other with problems and make the software they all use better. Everyone is encouraged to participate, and it's free.

Many individual variations available (distributions)

There are hundreds or even thousands of variations of Linux available. They come in all shapes and sizes, and they all do things differently. This is great for the user because now you can find the one that fits your needs the best. If you want a full featured large distribution, try Suse, Fedora, Mandriva, or Ubuntu. Want a CD distribution, a USB memory stick distribution, or even a distribution that runs on an Linksys Router? Because distribution for all of those currently exist. For a large list of current Linux distributions check out DistroWatch.

Configurable to your exact specifications

Let's just say that after checking through hundreds of distributions you still can't find one exactly to your specifications. Then you are entitled to change an existing distribution or create a new one to fit your exact needs.

Server Virtualization

With the increase in cheap, powerful hardware server virtualization is becoming an attractive way to maximize the use of equipment. There are a few open source project devoted to making this available on Linux.

RAID & High Availability

Linux has support for a large variety of RAID hardware and kernel support for software RAID. In addition there are several projects working on high availability servers through server clustering.

Linux As A Desktop / Media Center

No licensing fees

The reasons are the same as listed above, who wants to pay for a copy of Windows XP which is FIVE years old!

There are open source equivalents to most commercial software

Most commercial Windows products have a open source equivalent. Instead of using MS Office, you can try Open Office. Instead of Dreamweaver, you can try NVU. Instead of Internet Explorer, you can use Firefox. Instead of Windows Media Player, try XINE, MPlayer, or VideoLan Player. Instead of iTunes, MusicMatch, or WinAMP; try Amorak or XMMS. There are also a host of instant messaging, email, and other programs. The list just goes on.

WINE can run a large amount of Windows software

In the limited cases where there is no Linux equivalent, you can always try using WINE. It is able to run many popular Windows applications natively in Linux. Check out their website for performance comparisons and a full list of applications known to work with WINE. WineHQ.

Software you don't get with Windows

In addition to doing what Windows does, Linux does what Windows doesn't. It provides you with the source code and all of the tools needed to change it. You get several great programming languages and development environments for them. If you're an aspiring computer student you can't pass this up.

Excellent multimedia support
Linux has excellent multimedia support. Thanks to the work of many daring open source projects you can watch or listen to almost all formats of video or audio. In addition to decoding these formats you can also encode many of these format, which is nice if you have any interest in video / audio editing.

Great performance
Linux has many of the great features of other modern operating systems including support for 32 and 64 bit processors, virtual memory (swap), advanced memory management and file buffering, multi-threading, preemptive multitasking, symmetric multiprocessing, real time process scheduling, several advanced journaling file systems, and many other great features.

Secure out of the box

As I mentioned above, Linux is secure out of the box. It comes with native security software and is much more resilient to viruses and spyware / adware than other popular operating systems.

Ease of Use

Check out some of the latest distributions from Suse, Ubuntu, and Mandriva. They are very slick and easy to use, easily performing the tasks of normal computer users much safer and faster than other operating systems. Firefox for web browsing, Thunderbird for email, plug-in your digital camera and hotplug recognizes it with no configuration, type papers, make spreadsheets, and presentations with Open Office, and listen to music with Amorak or XMMS. I can't think of any more things an average computer user would do, but I'm sure other people have and they have already included software to do it with Linux.

Summary

Still not convinced that you should use Linux? Then you probably work for Microsoft or Apple. But seriously, try a Live CD distribution link Knoppix (all you have to do is burn a CD, and reboot your computer, it doesn't disrupt Windows / Mac OS at all) and see for yourself.

Please leave your comments below. Feedback is always appreciated.

Thursday, February 16, 2006

First Blog

Welcome to my first blog. It's pretty meaningless, but I just need to buy some time till I can write something more interesting.

I think you should check back in a couple of day, there should be something better up by then.

If you're wondering what my blog is going to be about, wonder no more. It's mostly going to be about technology and computers, but I may throw in other topics just to keep things interesting.