UNIX Load Averages Explained

If you’ve spent much time working in a UNIX environment you’ve probably seen the load averages more than a few times.

load averages: 2.43, 2.96, 3.41

I have to admit that even in my sysadmin days I didn’t fully understand what these numbers were, but Zach did some digging a while ago to try to understand where these numbers are comming from.

In his blog entry from late last year, Zach sums it up quite nicely:

In short it is the average sum of the number of processes waiting in the run-queue plus the number currently executing over 1, 5, and 15 minute time periods.

The formula is a bit more complicated than that, but this serves well as a functional definition. Zach provides a bit more detail in his article and also points out Dr. Neil Gunther’s article on the topic which has as much depth on the topic as anyone could ever ask.

So what does this mean about your system?

Well, for a quick example let’s consider the output below. The load average of a system can typically be found by running top or uptime and users typically don’t need any special privileges for these commands.

load averages: 2.43, 2.96, 3.41

Here we see the one minute load average is 2.43, five minute is 2.96, and fifteen minute load average is 3.41.

Here are some conclusions we can draw from this.

  • On average, over the past one minute there have been 2.43 processes running or waiting for a resource
  • Overall the load is on a down-trend since the average number of processes running or waiting in the past minute (2.43) is lower than the average running or waiting over the past 5 minutes (2.96) and 15 minutes (3.41)
  • This system is busy, but we cannot conclude how busy solely from load averages.

It is important here to mention that the load average does not take into account the number of processes. Another critical detail is that processes could be waiting for any number of things including CPU, disk, or network.

So what we do know is that a system that has a load average significantly higher than the number of CPUs is probably pretty busy, or bogged down by some bottleneck. Conversely a system which has a load average significantly lower than the number of CPUs is probably doing just fine.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

UNIX, systems administration, sysadmin, solaris, linux, load averages, system monitoring, sun, mac, osx

Definition: Metawork

Urban Dictionary offers the following definition for the word ‘metawork’:

Trivial or unnecessary work done to avoid having to perform the real task at hand while simultaneously taking the credit for it.

In the business world, metawork often manifests itself in the form of meetings, mission statements, project planning, or anything else that lets a person become part of the team without actually doing something productive.

I use metawork in a similar sense to refer to work which, though necessary, does not directly result in progress toward project goals. Meetings, project charters, evaluations and timecards all fall into the category of metawork.

Most middle management spends the bulk of their time doing metawork. Ideally this minimizes the amount of metawork their employees must do maximizing the amount of time employees can spend on actual work.

work, office humor, buzzwords, office lingo, definitions

Unpublished Source Code

Recently while stumbling my way through Solaris I came across a command I’m not familiar with. /usr/bin/true is a shell script which when run will return true (execute successfully.)

Now, this code clearly goes back a bit into UNIX history and I was amused to see exactly how the developers coded it. With that in mind, and against all copyrights and rights reservations I now present the complete and unabridged code for /usr/bin/true:

bash-2.03$ more /usr/bin/true
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved

# The copyright notice above does not evidence any
# actual or intended publication of such source code.

#ident "@(#)true.sh 1.6 93/01/11 SMI" /* SVr4.0 1.4 */

Why on earth would you copyright this? Perhaps even more impressive is the point that this is version 1.6! What did previous versions of this look like? And why such a big deal about this being unpublished source code? Hell, it’s not even source code, let alone published.

Well, if you’re curious, this script is all comments, therefore when it is run it does nothing… Of course it does nothing quite successfully, therefore returning ‘true’ for the purposes of evaluating conditions.

I do have to give the developers of this credit for simplicity. I’m sure if it weren’t for the lawyers this could have been a one line file.

unix, solaris, source code, programming, development, opensource

Oracle 9iR2 Data Warehousing

Oracle 9iR2 Data WarehousingAbout a year an a half ago I was right in the middle of researching data warehouse technologies and starting to get quite discouraged on the lack of good technical books on the topic. Then I came across the book “Oracle9iR2 Data Warehousing” by Hobbs, Hillson and Lawande. Here’s the review I put on Amazon on this deep technical book.

In this book, the authors take you swiftly and thoroughly through the entire process of creating a data warehouse. Several other books (I purchased 4 others before this) over-generalize the topic, teaching the vocabulary and business reasons for data warehousing. This book teaches how to implement a warehouse in Oracle 9i Revision 2, while teaching the major concepts through practical application.

It would be easy to get bogged down in the technical details of this book if one were not familiar with the Oracle environment. Those who are familiar with Oracle will find it is much like the courses offered by Oracle. The book consistently, clearly presents the concepts (dimensions, fact tables, summaries, ETL) then delves into such depth it leaves the reader with a complete understanding of not only how to implement each concept, but when, and why to implement them.

The major concepts covered include dimensional modeling, data partitioning, query optimization, materialized views, dimensions, the extract-transform-load process, warehousing tools, ongoing warehouse maintenance, and many more. Furthermore, SQL for the examples used in the book are available from one of the authors websites, affording the reader a hands-on environment in which to observe these concepts.

Overall, I would recommend this book to anyone looking to work with warehousing who already has a firm Oracle background (strong knowledge of schemas, data dictionary, storage conventions, terminology.) This is simply the best book I have found on data warehousing.

I see that there is now a new version of this book out. “Oracle Database 10g Data Warehousing” by the same authors, plus Pete Smith, will go on my short list for tech books to buy.

oracle, data warehouse, database, dba, database administration, data warehousing

Stealth Advertising

Just when I thought I had enough reasons to hate the entertainment industry they come up with an idea like this.

From a recent Reuters article on Boston.com:

A breakthrough in television advertising debuted without fanfare last spring as a brand-name box of crackers appeared on the CBS sitcom ”Yes, Dear” for about 20 seconds, seen but hardly noticed by millions of viewers.

Unbeknownst to them, the image of Kellogg’s Club Crackers had been digitally painted onto the top of a coffee table after the scene was filmed, launching the latest advance in a marketing practice known in the industry as product placement but derided by critics as ”stealth advertising.”

This is worse than the advertisements which now seem to frequent the bottom third of the screen as you’re trying to watch your favorite program. At least when Shrek started popping his ugly head into the frame you knew you were seeing an advertisement!

Now when you see a box of crackers, pop-tarts, a box of trojans, a bottle of Coke, or a BMW in a series you’ll never know if it was put there by a careful writer, a skilled set dresser, or just a network advertising department who has no interest in the artistic integrity of the show.

Now I’m not naive enough to think the entertainment industry hasn’t been taking payoffs for putting brand name products in their shows, but at least it was part of the original composition, not an afterthought. There can be some give-and-take between the advertisers and the writers and, while advertising is inevitable, at least there are some checks.

So where does this end? Well, my bitching probably won’t get them to stop placing ads in more and more programming, so I’d like to offer this suggestion for the future of “stealth advertising.”

Advertising in the news. That’s right, the news. Try these on for size…

Would George W. like a cracker? (or should that be “Is George W. like a cracker?”)


How about some great moments in history? Everyone needs crackers…

There were crackers on the moon right?


What’s a war without crackers?


You can go great places with crackers!


And my personal favorite.


Tasteless? Well, yes, but since we’ve already turned anything artistic into a commercial, what’s left? Just the news.

advertising, internet advertising, humor, funny, stealth advertising, george w. bush, bush, news, entertainment