HOME            INDEX

An email response to a question about finding out what processor and memory is in an unknown box running Xandros 3 Linux.
My explanations of what some of these commands stand for (i.e. grep - get report) may not be accurate, but they seem good ways to remember them for me. 

The easiest way to find these things is from the command line.
Memory is simple - just type "free"
bill@dimension:~> free
                        total       used       free     shared    buffers     cached
Mem:       2073692    1724812     348880          0     107000    1295244
-/+ buffers/cache:     322568    1751124
Swap:      2104504          0    2104504
bill@dimension:~>

For the cpu speed type "dmesg | grep processor"
bill@dimension:~> dmesg | grep processor
Detected 2793.102 MHz processor.
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Total of 1 processors activated (5591.58 BogoMIPS).
bill@dimension:~>

Also try "dmesg | grep CPU0"
bill@dimension:~> dmesg | grep CPU0
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
CPU0 attaching sched-domain:
bill@dimension:~> 
dmesg on it's own shows everything the kernel has found on the system - interesting, but rather thickly detailed.
The | character means pipe the output to;
grep (get report) - display all lines containing xxxxxx

For instance "dmesg | grep usb"  will show something about any usb device plugged in.

Another useful command is "df -h" (disk freespace - human readable)
bill@dimension:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb2             6.9G  4.8G  1.8G  74% /
udev                 1013M  104K 1013M   1% /dev
/dev/sdb4             354G  158G  178G  48% /home
/dev/sda1             299G  291G  7.9G  98% /movies
/dev/sdb1              98G   16G   83G  16% /winxp
bill@dimension:~>

There is a nice list of most of the bash commands here :- http://www.ss64.com/bash/
Some are potentially dangerous if you are logged in as root - so experiment with care.

One command that is very useful is "top" - by itself it will display most running processes. Adding -u username will display all processes belonging to that user. Type q to quit the top display. You can also type k to kill a stuck process.
It will ask for the PID (process ID) displayed in the left hand column.