Mar 7 2002


                    LINUX NEWS
        Resources & Links From CramSession.com
             Thursday, March 7, 2002


TABLE OF CONTENTS

1) Sean’s Notes

2) Linux News

It's Hammer Time
Linux Will Prevail
I'm Not the Only One
Open Source - Now!

3) Linux Resources

CVS Book
Put That Alpha to Good Use
More Uses for Alphas
Bootable CD Firewall
Summary:  Don't Delete libc

4) App o’ the Week

~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~

Serebra Learning Corporation knows that it’s true, you get paid more if you have the skills. Learn at your own pace with our dynamic training programs for the skills needed to succeed in today’s IT market. The Best Way to Learn Anything, Anywhere, Anytime. Check out this month’s specials!

http://ad.brainbuzz.com/?RC06&AII71

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For information on how to advertise in this newsletter please contact mailto:adsales@CramSession.com or visit http://cramsession.com/marketing/default.asp


1) Sean’s Notes

In the past, I’ve written about the various ways to deal with your system when it’s slow. The “top” command gives you a real-time look at the processes running on your system, ranked in order of CPU usage. The load average, which appears at the top of the “w” or “uptime” commands gives you a look at the size of the run queue - how many processes are waiting for the CPU. The “free” command will show you where Unix has allocated your memory, if the applications use it all, you’re going to have to hit the disk for swap space.

What I haven’t touched on is how to tell if you’ve overloaded your machine? Disk too slow? Not enough CPU or memory?

The “vmstat” command is a great tool to show you your disk, swap, and CPU activity all at once. The main option used with vmstat is how many seconds to wait between measurements; I usually choose 5 seconds.

$ vmstat 5 procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 2 0 0 7156 4620 53276 124432 0 0 22 12 96 168 2 7 90 2 0 0 7156 4620 53300 124432 0 0 0 22 1014 2316 2 3 95 1 0 0 7156 4620 53308 124560 0 0 26 2 987 2198 1 3 96

One thing to remember is that the first line represents the average values since your system has booted, and subsequent lines are instantaneous readings. If you want to see how everything is doing at this instant, then you’ll skip over the first line.

The information from vmstat has to be divided into columns representing the various measurements (top row). Each column heading is right-justified such that procs refers to r, b, and w (second row), and memory refers to swpd through cache.

“procs” gives you an indication of how many processes are running, but not in the same sense that the load average does. The “r” column tells you how many processes are waiting right now to be run (note that unlike top, vmstat excludes itself from this count). “b” is the processes that are blocking on IO (ie waiting for disk or some other device). We’re going to ignore “w” for now.

A high number of “r” processes tells us we’ve got a lot of processes waiting for the CPU at this instant. Over time, this will translate to a high load average. Lots of blocked processes means your processes are twiddling their thumbs, waiting for external resources.

If you run vmstat for a bit, then stop it and run “free”, you’ll see the four memory values repeated, which might make it easier to figure out how it all adds up. Linux will try to allocate all your memory for something, so it’s normal to see a small amount of memory reported as free. The two columns to the right, buff and cache, are where most of your “free” memory normally is (buffering data, or caching data for later use). If your applications need it, Linux takes memory away from here and gives it to them. Thus, the “free” column is derived from your physical memory minus what’s been allocated to applications, buffer, and cache. The memory space left for your applications to grow is then the sum of the free, buff, and cache columns.

Warning flags here are high values of “swpd”, meaning that memory is being swapped to disk. Since disk is significantly slower than memory, excessive swap usage can cause a huge performance hit.

Speaking of swap, the “si” and “so” give you more details on the rate (in kbytes/sec) at which memory is being swapped in and out from the disk. High values of “si” means that your memory is swapped to disk, and you’re forced to bring it into RAM. “so” means you’re busy dumping RAM to disk in order to free it for other uses. Practically, high swap usage is a sign you might need more RAM, so it doesn’t matter if it’s going in or out to disk.

Next we have “bi” and “bo”, which refer to disk blocks in and out respectively. If you have multiple drives, this is derived from the activity of all your drives. Each block is a kilobyte (on a hard drive), so high numbers mean you’re working the disks hard. The level at which you become concerned depends on the hardware, and the layout of the disks. Numbers above your normal average would prompt you to delve deeper into your disk statistics with other utilities such as “iostat”.

The system section tells you about your hardware. “in” is the number of interrupts per second your computer is generating, and “cs” is the context switches per second. A context switch happens when the scheduler switches processes on the CPU, or the process transfers control to the kernel (ie a system call). Interrupts and context switches are basically overhead. Lots of interrupts might be from devices such as busy network cards. More advanced cards, such as some of the 3COMs, are more efficient on interrupts, using DMA to transfer larger amounts of data.

CPU, as the name implies, refers to the processor itself. The last three columns should add up to 100, give or take rounding errors. “us” means the percentage of the CPU that is tied up with user tasks, “sy” the percentage devoted to system (i.e. kernel) tasks, and “id” is the percentage idle. A system that sits at zero idle and high “us” is begging for more or faster CPUs.

Your computer is a complex device, and its smooth operation involves watching many key figures for signs of a bottleneck. vmstat is an efficient tool for telling you what general area is causing you problems, be they memory, IO, CPU, or other. Like most performance related utilities, numbers vary widely from system to system. Periodically running vmstat for a few samples can give you a baseline from which to compare the next time things slow down.

Long live the Penguin,

Sean mailto:swalberg@cramsession.com


2) Linux News


It’s Hammer Time

AMD’s next generation of processors, using the so called “x86-64” technology, will enjoy support and optimizations from the stock Linux kernel. SuSE are the ones making the patches, and odds are that they’ll find their way into the 2.4 kernel.

http://news.com.com/2100-1001-847560.html


Linux Will Prevail

It’s always good to hear opinions on what is needed to make Linux succeed on the desktop. The author of this article brings up a couple of new points, though, that are worth a read.

http://zdnet.com.com/2100-1107-841870.html


I’m Not the Only One

Looks like I’m not the only author to ditch his trusty email client in favour of Evolution. Citing ease of use and features, this guy went from Sylpheed to Evolution, and seems to be happy.

http://www.linuxworld.com/site-stories/2002/0222.evolution.html


Open Source - Now!

This is an interesting advocacy project started by Red Hat. They’re targeting schools, and why not? That’s where many habits and preferences are formed, not to mention that it would save school systems money that could be better spent on teachers.

http://www.redhat.com/opensourcenow/


3) Linux Resources


CVS Book

While there are many documents out there on how to use CVS to keep track of changes to files, this one is unique in that it focuses on how to administer a CVS server, and to deal with uncommon uses of CVS.

http://cvsbook.red-bean.com/cvsbook.html


Put That Alpha to Good Use

x86 isn’t the only architecture that Linux runs on, but it’s the most popular. Old Alpha boxes can be had for a song on eBay, and can provide great experience on running Linux on non-standard hardware. This article explains how to get Debian running on Alpha hardware.

http://www.debianplanet.org/article.php?sid=5


More Uses for Alphas

If Linux isn’t your thing (then why are you reading this?), but you still want to do something with that Alpha, maybe VMS is more your style. Unix and VMS have quite the history together (mostly as competitors), and I’ve found using VMS makes me appreciate Linux even more!

http://www.yrl.co.uk/~phil/vms/vms.html


Bootable CD Firewall

This is a brilliant idea: making a bootable CD that runs as a firewall. No worries about anything being changed on a read-only medium! Though the example is for FreeBSD, all the concepts are the same for Linux–only the files are different.

http://www.bsdtoday.com/2002/March/Features646.html


Summary: Don’t Delete libc

This is an interesting account of a user deleting an important symlink from /lib. Learn from his mistake, trust me. If you do want to try it out for real, make sure it’s on a machine you don’t mind losing.

http://www.newsforge.com/article.pl?sid/03/05/1530211


4) App o’ the week

Webmin is a system to allow you to manage your system over the web. Users can be assigned privileges, so one user can edit DNS, while not being able to add users, and so on. Between the standard modules and the third-party modules, there is very little you can’t do.

http://www.webmin.com/


(C) 2002 BrainBuzz.com, Inc. All Rights Reserved.


     This message is from CramSession.com.

You are currently subscribed to the Hottest Linux News and Resources as: sean@ertw.com

To un-subscribe from this newsletter by e-mail: send a blank email message to: mailto:leave-linuxnews-3825955Y@list.cramsession.com


To Subscribe to this newsletter by e-mail: send a blank email message to:

mailto:join-linuxnews@list.cramsession.com