iujl@liujl-laptop:~$ sudo netstat -antup
[sudo] password for liujl:
激活Internet连接 (服务器和已建立连接的)
Proto Recv-Q Send-Q Local Address 
          Foreign Address         State       PID/Program name
tcp            0 0.0.0.0:24101           0.0.0.0:*               LISTEN      10459/qq       
tcp            0 127.0.0.1:7634          0.0.0.0:*               LISTEN      15995/hddtemp  
tcp            0 127.0.0.1:631           0.0.0.0:*               LISTEN      1438/cupsd     
tcp            0 10.10.86.114:46676      212.58.224.89:80        CLOSE_WAIT  14323/gvfsd-http
tcp            0 127.0.0.1:7634          127.0.0.1:36612         TIME_WAIT               
tcp            0 10.10.86.114:47933      202.108.23.238:80       ESTABLISHED 2261/firefox   
tcp            0 127.0.0.1:24101         127.0.0.1:52166         ESTABLISHED
。。。  。。。
PID为端口号远行进程的号
#sudo kill PID(进程码)


liujl@liujl-laptop:~$ ps -e
  PID TTY          TIME CMD
    1 ?        00:00:01 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 migration/1
    7 ?        00:00:02 ksoftirqd/1
    8 ?        00:00:00 watchdog/1
    9 ?        00:00:00 events/0
   10 ?        00:00:00 events/1
   11 ?        00:00:00 cpuset
   12 ?        00:00:00 khelper
   13 ?        00:00:00 netns
。。。 应该是查看所有程序的进程号
下边列出其说明:
liujl@liujl-laptop:~$ ps --help
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
all processes on this terminal     -s processes in the sessions given
all w/ tty, including other users  -t by tty
OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
only running processes             processes for specified users
processes w/o controlling ttys     by tty
*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   signal          --group --user --sid --rows --info
-O,O preloaded -o  virtual memory  --cumulative --format --deselect
-l,l long          user-oriented   --sort --tty --forest --version
-F   extra full    registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      list format codes  ASCII art forest
-m,m,-L,-T,H  threads   children in sum    -y change -l format
-M,Z  security data     true command name  -c scheduling class
-w,w  wide output       numeric WCHAN,UID  -H process hierarchy

posted on 2011-03-05 15:40  steffily  阅读(27756)  评论(1编辑  收藏  举报