2007-12-27

Ubuntu on a Ramdisk!

Ubuntu on a RAMDISK

Running embedded immutable linux distros have always been concerned about minimizing. Now that RAM is so inexpensive you can run the whole Ubuntu OS and your working apps all out of a Ramdisk. There are several benefits to doing it this way:

  1. Speed!
  2. Noise! No spinning hard disks and their associated fans!
  3. Security.
    1. No matter how secure you think your server is it is still hackable. Clearing out the hacks to the base system is a reboot away. (Assuming you are booting off a CDROM.)
    2. The data can be diffed against previous backups. The hacker may have been able to steal information but it's much harder for them to permanently corrupt the data. The security is highly dependent on the sophistication of the scripts. I'll include the basics but they will need tweaking depending on the use.
  4. Separation of system and data files! The data, including personal preferences, goes on a USB stick and the OS on a CD ROM. This clear separation makes many tasks much easier.
  5. Restore points. By saving past CD ROMs and USB directories it's possible to confidently know you can boot up from a past snapshot.

A fantastic how-to is provided by IBM here. I will be adding the scripts needed to make new CD ROM images with the latest updates, keep your sensitive information on a USB stick, and automated steps to ensure integrity. So you get to keep your important information with you wherever you go.

I have not set a time frame on finishing this article. For the time being it's a placeholder.

CraigsList

Using CRAIGS LIST

Yeah, this is a wimpy topic. It's more for me than you. I can't afford server hardware so I use craigslist and patience. My startup on firefox pulls up a search looking at San Diego, Orange County, and Los Angeles. It looks like this "http://sandiego.craigslist.org/search/sys?query=ecc|http://orangecounty.craigslist.org/search/sys?query=ecc|http://losangeles.craigslist.org/search/sys?query=ecc". I search for ECC. I figure that's a good enough search term to get most everything that might be of interest to me. If anybody has better suggestions let me know...

2007-12-25

Server RAM

Server Memory

THE PRESENT: RDDR2 (PC2-****R) ECC RAM

Intel says they will not be going to DDR3 for their servers so the following RAM is what everybody should be looking for. (However the hardware market is full of reversals.) The prices are quite reasonable, perhaps too reasonable, so cross check with the memory Intel has verified before buying:

Name PC2-XXXXMem clock Cycle I/O Bus clock Data transfers per second Peak rate
DDR2-400 PC2-3200100 MHz 10 ns 200 MHz 400 Million 3200 MB/s
DDR2-533 PC2-4300133 MHz 7.5 ns 266 MHz 533 Million 4266 MB/s
DDR2-665 PC2-5400166 MHz 6 ns 333 MHz 667 Million 5333 MB/s
DDR2-665 PC2-6000
DDR2-800 PC2-6400200 MHz 5 ns 400 MHz 800 Million 6400 MB/s
DDR2-900 PC2-7200
DDR2-1000 PC2-8000
DDR2-1066 PC2-8500266 MHz 3.75 ns 533 MHz 1066 Million 8533 MB/s
DDR2-1150 PC2-9200
DDR2-1200 PC2-9600

For use in PCs, DDR2 SDRAM is supplied in DIMMs with 240 pins and a single locating notch. DIMMs are identified by their peak transfer capacity (often called bandwidth). Note: DDR2-xxx (or DDR-xxx) denotes data transfer rate, and describes raw DDR chips, whereas PC2-xxxx (or PC-xxxx) denotes theoretical bandwidth (though it is often rounded up or down), and is used to describe assembled DIMMs. Bandwidth is calculated by taking transfers per second and multiplying by eight. This is because DDR2 memory modules transfer data on a bus that is 64 data bits wide, and since a byte comprises 8 bits, this equates to 8 bytes of data per transfer.

In addition to bandwidth and capacity variants, modules can

  1. Optionally implement ECC, which is an extra data byte lane used for correcting minor errors and detecting major errors for better reliability. Modules with ECC are identified by an additional ECC in their designation. PC2-4200 ECC is a PC2-4200 module with ECC.
  2. Be "registered", which improves signal integrity (and hence potentially clock speed and physical slot capacity) by electrically buffering the signals at a cost of an extra clock of increased latency. Those modules are identified by an additional R in their designation, whereas non-registered (a.k.a. "unbuffered") RAM may be identified by an additional U in the designation. PC2-4200R is a registered PC2-4200 module, PC2-4200R ECC is the same module but with additional ECC.
So this is all quite simple and easy to understand, yet if you do a search for "pc2-5400r ecc" you'll find results that turn up stores in other countries. Apparently the rest of this world goes by this spec but Americans list memory in an almost unique way at every store it's sold at.
Note: registered and unbuffered SDRAM generally cannot be mixed on the same channel.

THE FUTURE: RDDR3 (PC3-****R) ECC RAM

Some are pontificating new chip sets will be developed for ECC RDDR3 memory in the first half of 2008. And of course this memory will need to be produced. Apparently the TDP (Thermal Power Design) of RDDR2 is about 8 times higher than RDDR3. Then there's the possibility a cooler chip can pack in much more memory at higher clock speeds. Coupled with the fact AMD does not support RDDR2 for their servers it is a good bet RDDR2 only has a few years of life. It's almost 2008 now so it might not be too surprising to see RDDR3 by 2010 as a standard uniting AMD and Intel. Until then RDDR2 ECC is the obvious and even inexpensive standard we can live with.

Valgrind

Valgrind is an award-winning suite of tools for debugging and profiling Linux programs. With the tools that come with Valgrind, you can automatically detect many memory management and threading bugs, avoiding hours of frustrating bug-hunting, making your programs more stable. You can also perform detailed profiling, to speed up and reduce memory use of your programs.

The Valgrind distribution currently includes four tools: a memory error detector, a cache (time) profiler, a call-graph profiler, and a heap (space) profiler. It runs on the following platforms: X86/Linux, AMD64/Linux, PPC32/Linux, PPC64/Linux.

2007-12-23

Interpreting the Latency Numbers

Interpreting the Latency Numbers There are many DRAM timing parameters used by the memory controller in your PC's chipset (or integrated into AMD processors), but you can adjust only a few parameters in the system BIOS. For DDR and DDR2 memory, vendors specify four minimum timing parameters, measured in memory clock cycles:
  • CAS Latency (tCL): Column access (READ) until data is available
  • RAS to CAS Delay (tRCD): Row access (ACTIVATE) until CAS (READ)
  • RAS Precharge Delay (tRP): Precharge until row access (ACTIVATE)
  • Precharge Delay (tRAS): Row access (ACTIVATE) until precharge
For instance, a high-performance DDR memory module with 2-2-2-5 timing would have a minimum CAS latency of 2 clocks, a RAS to CAS delay of 2 clocks, a RAS precharge delay of 2 clocks, and a precharge delay of 5 clocks. A high-performance DDR2 module might have 5-5-5-12 timing, illustrating the point that latency (when measured in memory clocks) has actually increased in the latest memory generation DDR2 may have more clock cycles of latency, but the clock rates will scale much higher than with DDR because of slightly relaxed timing constraints and improved signal integrity. More importantly, lower voltages and smaller page sizes have cut back on the power consumed by an active page. Lower-power architecture becomes important as DDR2 speeds scale to 800 MHz, even though the underlying memory cell will still run at a measly 200 MHz. .

2007-12-22

Managed Services

Canonical is preparing a managed service platform that will allow VARs and solutions providers to remotely manage Ubuntu-based small business servers. The managed service will “be a standard way for solutions providers and systems integrators to easily manage and support servers either locally or remotely,” according to March Shuttleworth, CEO of Canonical — the company behind Ubuntu.

2007-12-20

Thunderbird with GoDaddy

The following was copied out of the GoDaddy's help documentation. Obviously the documentation is old but it somewhat works. I suffered through it and it worked on the first try.

This tutorial will help you set up the Mozilla Thunderbird e-mail client to work with your e-mail account.

To Set Up Your E-mail Account in Mozilla Thunderbird

  1. In Mozilla Thunderbird, select Tools > Account Settings.
  2. Select "Email account " and click Next.
  3. Enter your name and e-mail address.
  4. Select "POP" as the type of incoming server you are using. Your incoming server is pop.secureserver.net. Click Next.
  5. Enter your e-mail address for the "Incoming User Name," and "Outgoing User Name." Click Next.
  6. Enter a name for your e-mail account and click Next.
  7. Verify your account information and click Finish.
  8. In the Account Settings window, select "Outgoing Server" listed below your new account.
  9. Enter "smtpout.secureserver.net" for the "Server Name" and change the "Port" setting to 80.
  10. NOTE: "smtpout.secureserver.net" is an SMTP relay server. In order to use this server to send e-mails, you must first activate SMTP relay on your e-mail account. Log on to your Manage Email Accounts page to set up SMTP relay. If you do not have SMTP relay set up and your Internet Service Provider (ISP) allows it, you can use the outgoing mail server for your Internet Service Provider. Contact your Internet Service Provider to get this setting.

  11. Select "Use name and password" and enter your e-mail address. Thunderbird will ask you for your password the first time you try to send mail. Click OK.

Thunderbird with GMail

Google supplies step-by-step instructions on setting up Thunderbird with Google. Unfortunately they don't keep it updated. So I'll update it here.
  • 1) "Enable IMAP in your Gmail account." *Not a problem.
  • 2) "Open Thunderbird, and select Tools > Account Settings." *That works.
  • 3) " Click Add Account." *Good.
  • 4) "Select the Email account radio button and click Next. The Identity screen appears." *Well there's a radio button for "gmail" but we'll go with google's instructions since they probably have the details.
  • 5) "Enter your full name in the Your Name field. Enter your full Gmail email address (username@gmail.com) in the Email Address field, and click Next." *Ok, I'll enter my full gmail email address in both and hope. (Not just my name as described in this step.)
  • 6)"Select IMAP as the type of incoming server you are using. Enter imap.gmail.com in the Incoming Server field." *It is at this step the instructions differ. Thunderbird at this step is asking for the "Incoming User Name:" which google supplies in step 8 as the full email address. *Then it asks for an account name. There is nothing in googles documentation for this so I again use my email address. *When next is impressed it asks for verification and you'll notice the outgoing user name is different than what google says it should be in step 8 of their documentation. There's no fixing that at this point so you have to click finish. *Now double click on "Outgoing Server (SMTP) and then edit the google settings and change the "User Name:" to your full email address as Google describes.
  • 7) "Set the Outgoing Server to smtp.gmail.com, and click Next." *It should already be correct but verify by following the last part of the remedies to step 6.
  • 8) "Enter your Gmail username (including @gmail.com) in the Incoming User Name and Outgoing User Name fields, and click Next." * We already did this.
  • 9) "Enter a name for your email account in the Account Name field, and click Next.". * We already did this too.
  • 10) "Verify your account information in the dialog box, and click Finish." * Yeah, already done.
  • 11) "Select Server Settings from the folder list below your new account." * Just double click on it.
  • 12) " Update the Port value to 993." * ok.
  • 13) "In the Security Settings section, select SSL from the Use secure connection options." * Ok. Would be nice if they said something about "Use Secure authentication" check off box but their documentation is lacking. Their picture of this shows it unclicked and it's also the default so I'll hope...
  • 14) " Select Check for messages at startup and Automatically download new messages" *...
  • 15) "Click Outgoing Server (SMTP) in the folder list " * ok,
  • 16) "Select the smtp.gmail.com (Default) entry from the list and click Edit. The SMTP Server page appears." * yep.
  • 17) "Enter smtp.gmail.com as the Server Name and set the Port to 587." *Already done.
  • 18) "Select User name and password and enter your Gmail username (including @gmail.com) in the User Name field." * Done.
  • 19) "Select TLS from the Use secure connection radio buttons and click OK.' * Already done.
  • 20) "Click OK to save your changes and exit the Account Settings dialog. " *ok.

Thunderbird

Thunderbird is similar to M$ Outlook except Thunderbird runs on all platforms. There are alternatives but for starting out it's hard to go wrong with Thunderbird attached to a GMAIL account. Actually if you are just starting out then get a GMAIL account and work with it for a while. As time goes on you may want to have multiple accounts and a good set of tools for working with them and then you'll need something like Thunderbird. Imap is useful because it allows you to treat your mail account like a file system. Thunderbird is useful because you can view multiple email accounts at the same time. Combining the two together allows you to move email from one server to the next by simply dragging and dropping. This allows you to keep all your email througout the years accessible. You are no longer dependent on laborious email backups when you change broadband providers, email providers, or a particular hard disk. Thunderbird Extensions
  1. OpenPGP message encryption and authentication for Thunderbird and Seamonkey.

    Enigmail adds OpenPGP message encryption and authentication to your email client. It features automatic encryption, decryption and integrated key management functionality. Enigmail requires GnuPG (www.gnupg.org) for the cryptographic functions. Note: GnuPG is not part of the installation.

2007-12-19

Version Control

Overview: There are many version control systems available. RCS is a basic ubiquitous system I highly recommend. Especially when you have many disparate files located across multiple directories. However if you have a project that is located in a single directory one of the newer version control systems might be better suited. RCS:

Samba

Proxies

IRC

OVERVIEW: IRC is a time sink. Chatting in real time with potentially hundreds of others at the same time does not get you very far. The signal to noise ratio will suck you dry. However, that having been said, you might want to log some channels so you can search through it. However many of the channels log it for you so you can search through it. Saving you the effort.

Distros

Introduction

I try to keep track of the following OSs.

  • FreeBSD. I see this OS as secure yet not having all the support say Ubuntu has for hardware and certainly none of the flash. Not to mention this is BSD not Linux.
  • CentOS. If you want security in a Linux OS this is the OS for you. Asterisk PBX and such assumes you are installing on this OS for robustness purposes.
  • Ubuntu. This is the Linux OS for the masses. The VolksOS if you will. It has all the script kiddies who have never heard of vi clamoring about Linux. Ubuntu is "cool", very easy and graphical to use, and a great replacement for M$. With the huge following and 6 month release cycle this is the OS to use. Unless you like fixing bugs yourself.
  • Knoppix Traditionally this has been a great CD to pop in a computer that is having problems. You can fix many of problems with Knoppix.

References

  1. http://distrowatch.com/.

Switches

Google Docs

It's very nice to avoid using your own hard disk for storing data. Too often locally stored data gets lost over time. Keeping data on globally accessible servers means as the decades go by it will always be there. Currently docs.google.com offer this. Soon however Open Office will be doing the same.

VMWare

RSS Aggregators

Cables

KVM Switches

VNC

GPG

The GNU Privacy Guard

GnuPG is the GNU project's complete and free implementation of the OpenPGP standard as defined by RFC4880 . GnuPG allows to encrypt and sign your data and communication, features a versatile key managment system as well as access modules for all kind of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications. A wealth of frontend applications and libraries are available. Version 2 of GnuPG also provides support for S/MIME.

GnuPG is Free Software (meaning that it respects your freedom). It can be freely used, modified and distributed under the terms of the GNU General Public License .

GnuPG comes in two flavours: 1.4.7 is the well known and portable standalone version, whereas 2.0.7 is the enhanced and somewhat harder to build version.

Project Gpg4win provides a Windows version of GnuPG. It is nicely integrated into a installer and features several frontends as well as (German) manuals.

Video Cards

Sparkle Announces Passively Cooled 1 GB GeForce 8800 GT Card

This card seems to have it all!
  1. One of the fastest chip sets available.
  2. Passively cooled!
  3. 1GB of RAM!
Wolfgang Gruener December 21, 2007 13:49 Sparkle introduced a new GeForce 8800 GT version which comes with 1 GB of memory, instead of the standard 512 MB, as well as passive cooling. The "Cool-pipe 3" card specifications follow the Nvidia reference card, which include a core clock of 600 MHz and a memory clock of 1800 MHz. The stream processor clock is set at 1500 MHz. Pricing has not been announced. http://www.tomshardware.com/2007/12/21/sparkle_announces_passively_cooled_1_gb_geforce_8800_gt_card_/

Cases

I think there are only two options for server equipment.

The not so professional solution is to go with a tower. It's a pain to add more towers to your house. It does not scale well. However it will work. Towers that handle extended ATX motherboards are rare. For instance Antec only makes two.

  1. P190+1200
  2. Titan 650. I ordered this tower from Amazon, with the power supply, for $118. Unfortunately the shipping was almost another $80. Still this comes out to be almost $30 cheaper than what I can buy it from the local Fry's electronics. It handles MBs up to 12” x 13”.
I mention Antec since they have a reputation of producing quiet enclosures.

The more professional option in my mind is a rack. Antec makes a rack solution too. I'd love to have a rack solution that I can add more servers too as I expand. I'd like to have a separate server on the rack for each and every 24/7 service I run. Dream on... Notice how there are five rack mounted enclosures that can handle extended ATX motherboards. Rack Mounted Antec Enclosures.

There are probably many better solutions than Antec.

  1. Redundant power supply?
  2. Hot swap hard disks?
  3. Noise
  4. Ease of repair
  5. Produced by a company specializing in cases likely to always be in business.

Shells

RAM

Memory types seen in many servers:
  1. DDR-266
  2. SDRAM
  3. DIMM sockets
  4. Ranked DIMMs: Single, Dual,
  5. Ranked DIMMs
  6. Dual Ranked Fully Buffered DIMMs
  7. Single Device Data Correction (SDDC)
  8. memory mirroring
  9. Fully Buffered DIMMs (FBD)
  10. Speeds 533/667/800 MHz
  11. PC2100
  12. Error correcting code (ECC)
  13. DDR-1, DDR-2, DDR-3
  14. Registered Vs Unregistered

CPUs

There are so many many CPUs to choose from. However a small business needs ECC RAM. And the only standard is FBD (Fully Buffered DDR2). Intel with their Xeon chips support this and say they have no plans of upgrading newer boards to use DDR3. So though I like AMD much more than Intel there's really no choice unless you don't mind losing your RAM investments.

So check out for a list of XEON CPUs. Though it is Wikipedia it is a good start.

Keyboards

Mice

Look for:
  1. Wires. Never have to worry about synchronization, batteries, interference, range, etc..
  2. As much resolution as possible
Look Out for:
  1. Microsoft. I don't remember how many of their laser mice I've bought. They were the best you could get but they would self-destruct after a few years.
  2. Wireless mice. They all have issues at some point. I have better things to do than fret about why my mouse quit working. Or wondering why it lags or does strange thing when I put my cell phone near it.
My Favorites:
  1. Logitech G5 which I use on most of my PCs.
  2. Logitech G9 which I will buy and try out in the near future hopefully.
General comments: Ubuntu unfortunately does not handle all of the mice buttons and scroll wheel properly. Maybe someday in the future they will. It does not matter to me though. I am simply interested in a reliable good mouse. The G5 is the best out of the 40 or so I have bought for myself over the decades and of the hundreds I've used at various companies.

Printers

SSH

Podcasts

Linux Reality is excellent. Though the idiots who call in with tips drive me crazy and I wish he would filter them out. Yes there is such a thing as a stupid question and a stupid user tip. And I do get tired of his constant drivel. Congratulating, thanking, and making small talk takes up far too much time. However it's a good introduction and he does touch upon important topics and reference other sources. The best part of it is his voice which soothes the listener into a productive state that allows you to plow through boring tasks. He's hypnotizing...

Gimp

Javascript

blah blah

Much needed CSS

blah blah

HTML memory jogger

Tables

SQLITE

Sqlite is very useful. It's as fast in many situations as Mysql, Postgres, and Oracle.

SCREEN! No, don't scream.

Placeholder for all those useful screen commands.

PHP

PHP is the primary scripting language that should be used whenever possible. This page will hold those things that is frequently needed.
  • String concatenation operator is the '.' period

VIM

Overview:

Folding: This week I learned of a new feature called "folding". If I remember it correctly. It allows you to hide lines of code. You can either manually define what's to be hidden or you can specify certain syntax. So for instance you could hide all but the class names. If I understand it correctly you can then expand the class and see just the method names. And then show a particular method if you like. All very cool. I'm going to use that with some of the records I keep track of when I get the time.

General tips. I was burning time at the bookstore the other night. The shelves were full of books dedicated to M$ and non-free software. There were *nix books but they were too basic. I read one on Asterisk and decided I'd find better information online. Then I went to the magazine rack and looked at some *nix mags. I got through two of the three before I needed to go. The only thing those two mags had of interest, besides the adverts, were vim tips. Some were good. Like smart search. The mag was not worth buying just for some VIM tips especially when there are so many online. The following are what I consider most interesting.

UBUNTU Mail Server

Placeholder for setting up Ubuntu as a mail server.

UBUNTU APACHE SERVER

How to setup apache as a webserver in ubuntu

Ubuntu and GRUB

Placeholder for using grub to do the things we want!

RAID

Place holder for setting up a RAID system on a Ubuntu server.

Ubuntu as a Dual Wan Firewall.

Placeholder on how to set up a server as a firewall and load balance across two or more broadband connections.