天天看點

Android ps指令執行後的各項參數含義

直接輸入ps後可以看到如下資訊:

  1. # ps  
  2. ps  
  3. USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME  
  4. root      1     0     276    188   c0099f1c 000086e8 S /init  
  5. root      2     0     0      0     c004df64 00000000 S kthreadd  
  6. root      3     2     0      0     c003fa28 00000000 S ksoftirqd/0  
  7. root      4     2     0      0     c004abc0 00000000 S events/0  
  8. root      5     2     0      0     c004abc0 00000000 S khelper  
  9. root      6     2     0      0     c004abc0 00000000 S suspend  
  10. root      7     2     0      0     c004abc0 00000000 S kblockd/0  
  11. root      8     2     0      0     c004abc0 00000000 S cqueue  
  12. root      9     2     0      0     c01780d0 00000000 S kseriod  
  13. root      10    2     0      0     c004abc0 00000000 S kmmcd  
  14. root      11    2     0      0     c006efa8 00000000 S pdflush  
  15. root      12    2     0      0     c006efa8 00000000 S pdflush  
  16. root      13    2     0      0     c0073480 00000000 S kswapd0  
  17. root      14    2     0      0     c004abc0 00000000 S aio/0  
  18. root      22    2     0      0     c0175900 00000000 S mtdblockdc  

那麼這些項各代表着什麼意思呢?

  1. USER:  程序的目前使用者;
  2. PID   : 毫無疑問, process ID的縮寫,也就程序号;
  3. PPID  :process parent ID,父程序ID
  4. VSIZE  : virtual size,程序虛拟位址空間大小;
  5. RSS    : 程序正在使用的實體記憶體的大小;
  6. WCHAN  :程序如果處于休眠狀态的話,在核心中的位址;
  7. PC  : program counter,
  8. NAME: process name,程序的名稱