1 | 2 | page 3 | 4 | 5
List of all processes currently running on your server.

[brucelee@192.168.224.109 ~]% ps ax

PID TTY STAT TIME COMMAND
1 ? Ss 3:57 init [3]
2 ? S< 0:00 [kthreadd]
3 ? S< 0:09 [migration/0]
8461 ? S 0:00 /usr/sbin/httpd
8465 ? S 0:00 /usr/sbin/httpd
8705 ? S 2:02 ./runpovd
8726 ? S 1:47 ./rungimpd
8773 ? S 0:00 pop3-login
31302 ? Ss 0:55 sendmail: accepting connections


If you want to cancel a command currently running (stop a process), find out the equivalent process id (pid) of the command from ps ax, and use the following synyax: kill pid. You must be the owner of the process or have root authority to kill a process. Processes running as services can also be stopped, but this is not recommended, since the service may not free its allocated memory correctly, and may affect the stability of the system (use service name stop instead). The following example stops the process runpovd (pid 8705) as shown above.

[brucelee@192.168.224.109 ~]% kill 8705

List of all processes in a tree format.

[brucelee@192.168.224.109 ~]% pstree -A
init-+-atd
|-automount---4*[{automount}]
|-avahi-daemon---avahi-daemon
|-console-kit-dae---61*[{console-kit-dae}]
|-dbus-daemon
|-dhcdbd
|-dovecot-+-dovecot-auth
| |-3*[imap-login]
| `-3*[pop3-login]
|-gpm
|-hald---hald-runner-+-hald-addon-acpi
| |-hald-addon-cpuf
| `-2*[hald-addon-keyb]
|-hcid
|-hidd
|-httpd---20*[httpd]
|-klogd
|-milter-greylist---3*[{milter-greylist}]
|-6*[mingetty]
|-mysqld_safe---mysqld---8*[{mysqld}]
|-pcscd
|-rpc.idmapd
|-rpc.statd
|-rpcbind
|-rungimpd
|-runpovd
|-sdpd
|-2*[sendmail]
|-smartd
|-smbd---smbd
|-sshd---sshd---sshd---bash---pstree
|-syslogd
|-udevd
`-vsftpd




List of currently open ports.
[brucelee@192.168.224.109 ~]% netstat -nl

In the following example, ports 3306, 139, 111, 80, 21, and 445 are open and being listened to by various server processes.

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 72.167.47.133:80 0.0.0.0:* LISTEN
tcp 0 0 72.167.47.131:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN


The command netstat without any arguments will list all established connections and potential connections (visitors) to your server.

[brucelee@192.168.224.109 ~]% netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 local.ip.se:http 200-122-41-2:vocaltec-admin ESTABLISHED
tcp 0 0 local.ip.se:http g52151.upc-g.chello.n:63285 TIME_WAIT
tcp 0 0 local.ip.se:http g52151.upc-g.chello.n:63287 TIME_WAIT
tcp 0 0 local.ip.se:http 66-215-170-173.dhcp.c:49313 ESTABLISHED


Verify whether an IP address is responding.
You need to verify that all IP addresses provided by your hosting provider are usable. This can be easily verified by using ping IP address. A typical successful response looks like the following partial listing with the percentage of data transmission packets sent and received. To break out the screen output result of the command ping, type Control C (press down Ctrl and then C at the same time) from the keyboard. If there is no packet loss (0%), your IP address is available for connection.

[brucelee @192.168.224.109 ~]$ ping 192.168.224.110
PING 192.168.224.110 (192.168.224.110) 56(84) bytes of data.
64 bytes from 192.168.224.110: icmp_seq=0 ttl=64 time=3.33 ms
64 bytes from 192.168.224.110: icmp_seq=1 ttl=64 time=1.63 ms

--- 192.168.224.110 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3013ms rtt min/avg/max/mdev = 1.557/2.039/3.333/0.749 ms, pipe 2
1 | 2 | page 3 | 4 | 5