Previous | Table of Contents | Next |
UNIX
Lets say youre 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 its 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 everyones 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 youre 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 youll 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, youll probably experience problems.
Theres no swap or virtual memory to check in NetWare 3.x or 4.x.
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 dont 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. Its 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 systems resources is really useful, no matter which operating system you run.
Q Shouldnt 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 youre 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, youre out $50$100, and believe me, youll 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.
Previous | Table of Contents | Next |