Previous Table of Contents Next


UNIX

Let’s say you’re a Linux user, and you want to check your available memory and swap. You can simply type this:

   moria:/$ free

              total     used     free     shared     buffers
   Mem:       7220      6948     272      2524       3356
   Swap:      16416     2396     14020

Most UNIX users can check real-time resource use through the vmstat command, like so:

   $ vmstat 1

   procs   memory        page       faults      cpu
   ------  ------------  ---------- --------- ------------------------
   r  b    avm   fre re  pi po fr   sr cy in    sy   cs   us  sy id  wa
   0  0    13376 233 0   0  0  2    6  0  144   807  81   4   5  84  7
   0  0    13376 233 0   0  0  0    0  0  129   757  89   2   8  89  2
   0  0    13376 233 0   0  0  0    0  0  143   768  85   2   7  91  0
   0  0    13376 233 0   0  0  0    0  0  140   567  124  5   1  94  0
   0  0    13376 233 0   0  0  0    0  0  147   387  39   1   3  96  0

This output looks like Greek, but it’s not too terrible once you know the translation. Here are the salient points you should look for:

avm Active virtual pages (amount of swap plus physical memory)
pi Page in activity per second (how much overflow goes to swap)
po Page out activity per second (how much overflow drains out)
fre The free memory list
us CPU utilization by users
sy CPU utilization by system processes
id CPU idle time
wa CPU time spent waiting for disk activity

If you want a report, you should check out the sar command; using it will show you a report similar to this:

   smp smp 4.0 2 PENTIUM    09/17/98
   00:00:00    %usr    %sys    %wio   %idle
   07:00:00    0       0       3      97
   08:00:00    0       1       4      95
   08:10:00    1       2       9      87
   08:20:00    2       4       11     83
   08:30:00    3       5       57     35
   08:40:00    2       5       23     69
   08:45:00    3       6       61     30

Notice how the situation starts to get really ugly at 8:20 (when everyone’s had their coffee and is now tearing into things)? At 8:30, the system is only 35 percent idle, as opposed to 97 percent idle at 7:00. As you can see, the sar command can help you with long-term monitoring. Both sar and vmstat have manual pages that you can access online by typing this:

   man <sar or vmstat>

NetWare

If you’re a NetWare user, unfortunately, you have no long-term resource monitoring solution provided by Novell, although third-party solutions are available. You can, however, use the NetWare monitor screen to check out various resources. Simply type

   load monitor

at your console prompt, and you’ll see the processor utilization on the front page. Go to the Processor, Memory, or Resource Utilization submenus for more details.

Probably the most important thing to keep track of is the number of cache buffers, which you can track from the Resource menu. If the number of cache buffers falls below 40 percent or so, you’ll probably experience problems.


There’s no swap or virtual memory to check in NetWare 3.x or 4.x.

Summary

Knowing how to troubleshoot basic hardware problems can save you loads of time. PCs as a whole are reasonably simple beasts, consisting of pluggable electronic components, some of which can be reseated. Poorly designed cases or motherboards can cause problems, so you can avoid problems by avoiding these.

Keeping clean is just as important as your mother told you; all hardware components react badly to dirt. Use a vacuum or canned air on visibly dusty components; use a pencil eraser on board contacts that seem to have dirt or oxidation on them.

Swapping components is an integral part of hardware troubleshooting. As with the fuel pump on your car, you don’t need to know how it works, just that your problem goes away once you swap it.

Unshielded twisted pair cable (UTP) is the most common network cable type. It’s fairly sensitive to external electromagnetic interference (EMI). Therefore, you should buy rather than make your own cables.

If your workstation is running out of gas, it can hardly be expected to drive down the street, much less to the onramp of your personal information superhighway. Knowing how to check your system’s resources is really useful, no matter which operating system you run.

Workshop

Q&A

Q Shouldn’t I leave this hardware stuff to a hardware tech? I might break it!

A If this was stuff that cost thousands to millions per component, I might agree with you. If you’re completely out at sea on this issue, grab a hardware troubleshooting book for good details. But really, if you destroy a floppy disk drive or a video card, you’re out $50–$100, and believe me, you’ll never make that particular mistake again. Just be careful with static electricity, powering off before you work, and putting components back in the same orientation, and you should be just fine.

Quiz

1.  How do you get into most PC BIOS setup screens?
A.  Spacebar
B.  Compose-Compose-Execute
C.  F5, Ctrl+Alt+Del, or Enter
D.  F1, F2, or Del
2.  True or false? Power should always be on when you’re working on a hardware device.
3.  You can ground yourself by touching which of the following?
A.  The plastic of the PC case
B.  The screw of your wall outlet
C.  The chassis of your PC (while plugged in)
D.  The dirt in your plants
4.  True or false? Marginal or incompatible memory can cause network-related problems.
5.  To verify a cable’s integrity, you can run a _________ test.
A.  Compatibility
B.  Continuity
C.  Craftsmanship
D.  Culling

Answers to Quiz Questions

1.  D
2.  False
3.  C. Surprisingly, the screw on your wall outlet is not always grounded.
4.  True
5.  B


Previous Table of Contents Next