This site will look much better in a browser that supports web standards, but should be accessible to any browser or Internet device.

>> To Part Two >>

Week Four: Part One

System Info & Monitoring: Processes

All right!!!  Snoopy stuff!  And Butzi, I saw you on the server....nanner, nanner

There are two other users surfacing at this point and they may actually be the same lady because the user name is the same except that one version has the letter *p* added to the end.  And she's still stuck in jail.   I know from our user names that these aren't added to servers alphabetically, so my guess is this is one person with two accounts or two login names.

This section looks like it will be fun and useful.  [insert evil grin]

<< ps >> command

Note: The letter *d* at the end of the process names stands for daemon.

 
PID  TTY          TIME CMD
8093 pts/1    00:00:00 bash
8147 pts/1    00:00:00 ps
myusername@gemini [~]# ps -A
  PID TTY          TIME CMD
[only a few processes listed as examples]
   12 ?        00:05:21 kupdated
   13 ?        00:00:00 mdrecoveryd
  238 ?        00:00:00 kjournald
 1478 tty6     00:00:00 mingetty
 1484 ?        00:00:31 netsaint_statd
 9433 ?        00:00:00 httpd <defunct>
myusername@gemini [~]# ps -aux
USER   PID %CPU %MEM   VSZ  RSS TTY    STAT START   TIME COMMAND
root  13686  0.0  0.0  8044 1384 ?      S    May24   0:40 chkservd
root  28334  0.0  0.4 22412 9524 ?      S    May30   6:01 /usr/local/apache
named 13942  0.0  3.9 108568 81920 ?    S    Jun01  25:05 named -u named
root   5463  0.0  0.0  1608  556 ?      S    Jun05   0:00 CROND
root  24157  0.1  0.3 12232 7868 ?     SN   Jun05   6:35 cpanellogd - slee
myusername 8092  0.0  0.0  6688 2016 ?      S    00:49   0:00 /usr/sbin/sshd
myusername  8093  0.0  0.0  5192 1360 pts/1  S    00:49   0:00 -bash

<< top >> command

This little bugger will keep refreshing until you Ctrl + C out.  [hop, hop, refresh, refresh]

myusername@gemini [~]# top
  1:27am  up 78 days,  2:39,  1 user,  load average: 1.08, 1.17, 1.25
174 processes: 167 sleeping, 2 running, 5 zombie, 0 stopped
CPU0 states:  2.1% user,  3.0% system,  0.0% nice, 93.1% idle
CPU1 states:  9.1% user,  1.0% system,  0.0% nice, 88.1% idle
CPU2 states:  5.1% user,  1.1% system,  0.0% nice, 92.0% idle
CPU3 states: 14.1% user,  1.1% system,  0.0% nice, 83.0% idle
Mem:  2064136K av, 1992128K used,   72008K free, 0K shrd,  145028K buff
Swap: 2040244K av,  288196K used, 1752048K free            1166876K cached
PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
28334 root       8   0 11132 9524   820 S    25.6  0.4  22:35 httpd
 5399 mailnull   9   0 10060  888   628 S     1.9  0.0   1:59 MailScanner
 7073 mailnull   9   0   916  916   680 S     1.9  0.0   0:15 exim
26698 mailnull  14   0   772  772   616 R     1.9  0.0   0:00 clamscan
24896 myusername10   0  1092 1092   760 R     1.4  0.0   0:01 top
11506 mysql      9   0 31856  19M  1484 S     0.4  0.9  25:10 mysqld
26023 nobody     9   0     0    0     0 Z     0.4  0.0   0:00 httpd <defunct>
[rest of list deleted]

<< jobs >> & << fg >> commands

myusername@gemini [~]# jobs
[1]-  Stopped                 top
[2]+  Stopped                 pico -z
[used << fg >> here to reopen pico]
myusername@gemini [~]# jobs
[1]+  Stopped                 top

<< du >> command

myusername@gemini [~]# du -sh ./public_html/anb
4.5M    ./public_html/anb

<< quota >>

myusername@gemini [~]# quota
Disk quotas for user myusername (uid XXXXX):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda3  165288  384000  384000            8765       0       0
myusername@gemini [~]# quota -v
Disk quotas for user myusername (uid XXXXX):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda3  165288  384000  384000            8765       0       0
myusername@gemini [~]# quota -q
myusername@gemini [~]# find ~ -type f -size +500
[list deleted for space]

<< users >> command

myusername@gemini [~]# users
  myusername

<< who >> & << w >> commands

myusername@gemini [~]# who
myusername   pts/1        Jun  8 02:03 (user-11fa6c7.dsl.mindspring.com)
myusername@gemini [~]# w
  2:23am  up 78 days,  3:34,  1 user,  load average: 1.43, 1.43, 1.32
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
myusername   pts/1    user-11fa6c7.dsl  2:03am  0.00s  0.03s  0.01s  w

<< whoami >> command

myusername@gemini [~]# whoami
myusername

<< su >> command

myusername@gemini [~]# su myusername
-bash: /bin/su: Permission denied

<< last login >> & << last >> commands

I am wondering what pts/1, pts/2, pts/3 means. <<whatis>> tells me nothing appropriate. Tty is something about the terminal connection, but I am unclear here.  The lesson says it shows the type of connection to the host from teletype days, but I am still clueless.

myusername@gemini [~]# last login
wtmp begins Tue Jun  1 09:09:21 2004
myusername@gemini [~]# last
myusername   pts/1        user-11fa6c7.dsl Tue Jun  8 02:03   still logged in
butzisname   pts/1        user-38lc4se.dia Mon Jun  7 16:47 - 17:08  (00:20)
root         pts/1        c-24-129-32-74.s Sun Jun  6 09:52 - 09:52  (00:00)
otheruser    pts/3        24.107.150.106.c Sun Jun  6 02:38 - 04:52  (02:14)
otheruserp   pts/2        24.107.150.106.c Thu Jun  3 00:13 - 00:13  (00:00)
[one for each user noted. It appears otheruser and otheruser with intial p 
added are the same person]

<< finger >> command

myusername@gemini [~]# finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
myusername            pts/1       Jun  8 02:03 (user-11fa6c7.dsl.mindspring.com)
myusername@gemini [~]# finger butzisname
Login: butzisname                     Name: (null)
Directory: /home/butzisname           Shell: /bin/bash
Never logged in.
No mail.
No Plan.
myusername@gemini [~]# finger otheruser
Login: otheruser                    Name: (null)
Directory: /home/otheruser          Shell: /usr/local/cpanel/bin/jailshell
Never logged in.
No mail.
No Plan.
myusername@gemini [~]# finger otheruserp
Login: otheruserp                   Name: (null)
Directory: /home/otheruserp         Shell: /usr/local/cpanel/bin/jailshell
Never logged in.
No mail.
No Plan.
[I think I must be getting the server name wrong.  I can't get the @whatever.com 
command to work. Tried several configurations, but no luck. Results below.]
myusername@gemini [~]# finger myusername@gemini.hmnsgroup.com
finger: Name or service not known: host 'gemini.hmnsgroup.com', service 'finger'
[on others]
finger: cannot create socket / connect host
myusername@gemini [~]# finger -lms
Login: myusername                           Name: (null)
Directory: /home/myusername                 Shell: /bin/bash
On since Tue Jun  8 02:03 (EDT) on pts/1 from user-11fa6c7.dsl.mindspring.com
No mail.

>> To Part Two >>