:: [linux] Gathering Information about your RH 8.0 System. ::
HOME


[Date Prev][Date Next][Date Index]

[linux] Gathering Information about your RH 8.0 System.


Here are some useful commands to consider.. It is summary from here
 
1. ps aux | less
 This will list all the processes.. below is an example'
 
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  1396  484 ?        S    Apr23   0:04 init
root         2  0.0  0.0     0    0 ?        SW   Apr23   0:00 [keventd]
root         3  0.0  0.0     0    0 ?        SWN  Apr23   0:00 [ksoftirqd_CPU0]
root         4  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kswapd]
root         5  0.0  0.0     0    0 ?        SW   Apr23   0:00 [bdflush]
root         6  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kupdated]
root         7  0.0  0.0     0    0 ?        SW   Apr23   0:00 [mdrecoveryd]
root        11  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kjournald]
root        59  0.0  0.0     0    0 ?        SW   Apr23   0:00 [khubd]
root       164  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kjournald]
root       165  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kjournald]
root       166  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kjournald]
root       167  0.0  0.0     0    0 ?        SW   Apr23   0:00 [kjournald]
root       401  0.0  0.0     0    0 ?        SW   Apr23   0:00 [eth0]
root       473  0.0  0.0     0    0 ?        SW   Apr23   0:00 [eth1]
root       553  0.0  0.1  1460  556 ?        S    Apr23   0:00 syslogd -m 0
root       557  0.0  0.0  1388  444 ?        S    Apr23   0:00 klogd -x
root       617  0.0  0.2  3344 1464 ?        S    Apr23   0:00 /usr/sbin/sshd
root       631  0.0  0.1  2032  824 ?        S    Apr23   0:00 xinetd -stayalive -reuse -pidfile /va
lp         644  0.0  0.2  4704 1100 ?        S    Apr23   0:00 [lpd]
root       665  0.0  0.4  5600 2464 ?        S    Apr23   0:00 [sendmail]
smmsp      674  0.0  0.4  4948 2092 ?        S    Apr23   0:00 [sendmail]
root       684  0.0  0.0  1428  452 ?        S    Apr23   0:00 gpm -t imps2 -m /dev/mouse
root       695  0.0  1.3 16816 7000 ?        S    Apr23   0:00 /usr/sbin/httpd
root       704  0.0  0.1  1596  696 ?        S    Apr23   0:00 crond
root       711  0.0  0.2  4216 1148 ?        S    Apr23   0:00 /bin/sh /usr/bin/safe_mysqld --datadi
mysql      743  0.0  0.3 19072 1876 ?        S    Apr23   0:00 [mysqld]
mysql      759  0.0  0.3 19072 1876 ?        S    Apr23   0:00 [mysqld]
 
2. top
Gives good info about the system usage.. Below is an example.
 
 11:33am  up 19:15,  3 users,  load average: 0.00, 0.00, 0.00
97 processes: 94 sleeping, 2 running, 1 zombie, 0 stopped
CPU states:  0.4% user,  0.1% system,  0.0% nice, 37.5% idle
Mem:   513244K av,  373824K used,  139420K free,       0K shrd,   94636K buff
Swap: 1044216K av,       0K used, 1044216K free                  132680K cached
 
  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 6653 root      15   0   948  948   740 R     0.9  0.1   0:00 top
    1 root      15   0   484  484   432 S     0.0  0.0   0:04 init
    2 root      15   0     0    0     0 SW    0.0  0.0   0:00 keventd
    3 root      34  19     0    0     0 SWN   0.0  0.0   0:00 ksoftirqd_CPU0
    4 root      15   0     0    0     0 SW    0.0  0.0   0:00 kswapd
    5 root      25   0     0    0     0 SW    0.0  0.0   0:00 bdflush
    6 root      15   0     0    0     0 SW    0.0  0.0   0:00 kupdated
    7 root      25   0     0    0     0 SW    0.0  0.0   0:00 mdrecoveryd
 
U can use the following keys with top
Command Description
[Space] Immediately refresh the display
[h] Display a help screen
[k] Kill a process. You will be prompted for the process ID and the signal to send to it.
[n] Change the number of processes displayed. You will be prompted to enter the number.
[u] Sort by user.
[M] Sort by memory usage.
[P] Sort by CPU usage.
 
3. Memory usage can be got by using
 
%>free -m
 
[shashank@mia /usr]# free -m
             total       used       free     shared    buffers     cached
Mem:           501        365        136          0         92        129
-/+ buffers/cache:        143        358
Swap:         1019          0       1019
 
 
4. file system can be read using (use discheck utility to keep a tag on disk usage)
 
[shashank@mia /usr]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda6             372M  308M   44M  88% /
/dev/hda1              45M   37M  7.0M  84% /boot
/dev/hda5              11G  3.3G  7.0G  32% /home
none                  251M     0  250M   0% /dev/shm
/dev/hda2              24G  3.3G   19G  15% /usr
/dev/hda7             251M  216M   21M  91% /var
 
 
 
5. use lspci -vv (or -v) to view your hardware.
 
Regards
Shashank
http://mia.ece.uic.edu/~papers