ps 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. .TH PS 1
  2. .SH NAME
  3. ps, psu \- process status
  4. .SH SYNOPSIS
  5. .B ps
  6. [
  7. .B -apr
  8. ]
  9. .PP
  10. .B psu
  11. [
  12. .B -apr
  13. ]
  14. [
  15. .I user
  16. ]
  17. .SH DESCRIPTION
  18. .I Ps
  19. prints information about processes.
  20. .I Psu
  21. prints only information about processes started by
  22. .I user
  23. (default
  24. .BR $user ).
  25. .PP
  26. For each process reported,
  27. the user,
  28. process id,
  29. user time,
  30. system time,
  31. size,
  32. state,
  33. and command name are printed.
  34. State is one of the following:
  35. .TP \w'\fLno\ \fIresource\ \ \ 'u
  36. .B Moribund
  37. Process has exited and is about to have its
  38. resources reclaimed.
  39. .TP
  40. .B Ready
  41. on the queue of processes ready to be run.
  42. .TP
  43. .B Scheding
  44. about to be run.
  45. .TP
  46. .B Running
  47. running.
  48. .TP
  49. .B Queueing
  50. waiting on a queue for a resource.
  51. .TP
  52. .B Wakeme
  53. waiting for I/O or some other kernel event to wake it up.
  54. .TP
  55. .B Broken
  56. dead of unnatural causes; lingering
  57. so that it can be examined.
  58. .TP
  59. .B Stopped
  60. stopped.
  61. .TP
  62. .B Stopwait
  63. waiting for another process to stop.
  64. .TP
  65. .B Fault
  66. servicing a page fault.
  67. .TP
  68. .B Idle
  69. waiting for something to do (kernel processes only).
  70. .TP
  71. .B New
  72. being created.
  73. .TP
  74. .B Pageout
  75. paging out some other process.
  76. .TP
  77. .I Syscall
  78. performing the named system call.
  79. .TP
  80. .BI no " resource
  81. waiting for more of a critical
  82. .IR resource .
  83. .PD
  84. .PP
  85. The
  86. .B -r
  87. flag causes
  88. .I ps
  89. to print, before the user time, the elapsed real time for the process.
  90. .PP
  91. The
  92. .B -p
  93. flag causes
  94. .I ps
  95. to print, after the system time, the baseline and current priorities of each process.
  96. .PP
  97. The
  98. .B -a
  99. flag causes
  100. .I ps
  101. to print the arguments for the process. Newlines in arguments will be translated to spaces for display.
  102. .SH FILES
  103. .B /proc/*/status
  104. .SH SOURCE
  105. .B /sys/src/cmd/ps.c
  106. .br
  107. .B /rc/bin/psu
  108. .SH "SEE ALSO"
  109. .IR acid (1),
  110. .IR db (1),
  111. .IR kill (1),
  112. .IR ns (1),
  113. .IR proc (3)