android命令@ps

来自个人维基
跳转至: 导航搜索
$adb shell ps 
USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
root      1     0     676    348   ffffffff 00000000 S /init
root      2     0     0      0     ffffffff 00000000 S kthreadd
root      3     2     0      0     ffffffff 00000000 S ksoftirqd/0
root      6     2     0      0     ffffffff 00000000 S migration/0
root      16    2     0      0     ffffffff 00000000 S khelper
root      17    2     0      0     ffffffff 00000000 S fs_sync
root      18    2     0      0     ffffffff 00000000 S suspend
root      19    2     0      0     ffffffff 00000000 S sync_supers
root      20    2     0      0     ffffffff 00000000 S bdi-default
root      21    2     0      0     ffffffff 00000000 S kblockd
root      22    2     0      0     ffffffff 00000000 S khubd
root      23    2     0      0     ffffffff 00000000 S _mtkfb
shell     142   1     1052   304   c00680e8 4012a3c8 S /system/bin/batterywarning
system    144   121   1056   300   ffffffff 00000000 S /system/bin/6620_launcher
system    310   1     1060   316   ffffffff 00000000 S /system/xbin/BGW
media     311   1     4572   384   ffffffff 00000000 S /system/bin/iss_daemon
root      312   1     8744   456   ffffffff 00000000 S /system/bin/vivo_daemon
root      314   1     11312  520   ffffffff 00000000 S /system/bin/atcid
system    316   1     4700   500   ffffffff 00000000 S /system/bin/dm_agent_binder
bluetooth 317   1     4468   404   ffffffff 00000000 S /system/bin/mtkbt
system    319   1     4680   400   ffffffff 00000000 S /system/bin/GoogleOtaBinder
system    322   1     4636   400   ffffffff 00000000 S /system/bin/nvram_agent_binder
system    324   1     1084   280   ffffffff 00000000 S /system/bin/thermal
system    325   1     1048   280   ffffffff 00000000 S /system/bin/thermald
root      328   1     3404   308   ffffffff 00000000 S /system/bin/vivo_em_svr
system    348   1     3108   288   ffffffff 00000000 S /system/bin/orientationd
system    402   1     1084   280   ffffffff 00000000 S /system/bin/geomagneticd
radio     488   1     15440  376   ffffffff 00000000 S /system/bin/gsm0710muxd
shell     489   1     2432   320   ffffffff 40137ad8 S /system/bin/mdlogger
shell     24806 24540 1320   456   00000000 40104a58 R ps

USER, PID, PPID无需多说

  • VSIZE: 进程所用虚拟内存
  • RSS:所用实际内存
  • WCHAN:nwchan WCHAN address of the kernel function where the process is sleeping (use wchan if you want the kernel function name). Running tasks will display a dash ('-') in this column.
——这是linux中的解释,即, 如果进程处于内核睡眠状态,则显示其内核对应函数的地址,运行状态则显示 - (android中显示00000000)
  • PC:若在运行状态,则显示其在用户空间中的函数地址

附 linux ps图解:

Wk 27932dee13a2f6163c9bf38dfb02e56f 0.png

    VSS - Virtual Set Size 虚拟耗用内存(包含共享库占用的内存)
    RSS - Resident Set Size 实际使用物理内存(包含共享库占用的内存)
    PSS - Proportional Set Size 实际使用的物理内存(比例分配共享库占用的内存)
    USS - Unique Set Size 进程独自占用的物理内存(不包含共享库占用的内存)