logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

perpls.8 (6783B)


  1. .\" perpls.8
  2. .\" wcm, 2009.12.03 - 2011.02.01
  3. .\" ===
  4. .TH perpls 8 "January 2013" "perp-2.07" "persistent process supervision"
  5. .SH NAME
  6. perpls \- persistent process service lister
  7. .SH SYNOPSIS
  8. .B perpls [\-hV] [\-b
  9. .I basedir
  10. .B ] [\-cGgrt] [
  11. .I sv ...
  12. .B ]
  13. .SH DESCRIPTION
  14. .B perpls
  15. is used to list the current status of each
  16. .I sv
  17. argument monitored by an active
  18. .BR perpd (8)
  19. supervisor.
  20. .PP
  21. .B perpls
  22. looks for
  23. .I sv
  24. in the directory
  25. .I basedir
  26. if given with the
  27. .B \-b
  28. option,
  29. or as set in the
  30. .B PERP_BASE
  31. environmental variable,
  32. or in the current directory if neither of the previous is given.
  33. If no
  34. .I sv
  35. is given,
  36. .B perpls
  37. reports on all the subdirectories found in the base directory
  38. not beginning with `.'.
  39. .PP
  40. For each service
  41. .IR sv ,
  42. .B perpls
  43. prints a single line reporting on the status of the service.
  44. The report for each service is given in a format similar to the following:
  45. .PP
  46. .RS
  47. .nf
  48. .B # perpls foo
  49. [+ +++ +++] foo uptime: 5s/5s pids: 278/269
  50. .fi
  51. .RE
  52. .PP
  53. The line begins with a ``panel'' for the service,
  54. followed by the name of the service
  55. .IR sv ,
  56. followed by the current uptimes for the main/log processes,
  57. followed by the pids for the main/log processes.
  58. .PP
  59. The ``panel'' is a compact representation of the service status.
  60. It is displayed as a sequence of nine-characters within square brackets:
  61. a single character for the status of the
  62. .BR perpd (8)
  63. supervisor itself,
  64. followed by a pair of triple-character sequences representing
  65. the main and log processes under its supervision.
  66. .PP
  67. The following characters are used in the panel:
  68. .TP
  69. .B +
  70. Ok.
  71. The process is up and running.
  72. In the first position,
  73. shows that the
  74. .BR perpd (8)
  75. supervisor itself is up and running.
  76. If the panel is all `+',
  77. it means all systems are go.
  78. .TP
  79. .B .
  80. Down.
  81. The process is currently down.
  82. .PP
  83. .RS
  84. .nf
  85. .B # perpctl down foo && perpls foo
  86. [+ ... +++] foo uptime: -s/90s pids -/269
  87. .fi
  88. .RE
  89. .TP
  90. .B !
  91. Attention.
  92. Appears in the first position of a triplet sequence
  93. when the service is currently in a state it doesn't want to be in.
  94. There is a problem somewhere,
  95. often indicating that a runscript is not executable.
  96. For example, a service currently down but ``wants'' to be up:
  97. .PP
  98. .RS
  99. .nf
  100. .B # perpctl down foo
  101. .B # chmod -x foo/rc.main
  102. .B # perpctl up foo && perpls foo
  103. [+ !.. +++] foo uptime: -s/90s pids 299/269
  104. .fi
  105. .RE
  106. .TP
  107. .B o
  108. Once.
  109. Appears in the second position of a triplet sequence
  110. when the process is up and running,
  111. but flagged to run only once:
  112. .PP
  113. .RS
  114. .nf
  115. .B # perpctl once foo && perpls foo
  116. [+ +o+ +++] foo uptime: 90s/90s pids 278/269
  117. .fi
  118. .RE
  119. .TP
  120. .B p
  121. Paused.
  122. Appears in the third position of a triplet sequence
  123. when the process is currently paused:
  124. .PP
  125. .RS
  126. .nf
  127. .B # perpctl pause foo && perpls foo
  128. [+ ++p +++] foo uptime: 90s/90s pids 278/269
  129. .fi
  130. .RE
  131. .TP
  132. .B r
  133. Resetting.
  134. Appears in the third position of a triplet sequence
  135. when the service is currently resetting:
  136. .PP
  137. .RS
  138. .nf
  139. .B # perpctl pause foo && perpls foo
  140. [+ ++r +++] foo uptime: 1s/90s pids 299/269
  141. .fi
  142. .RE
  143. .TP
  144. .B -
  145. Not active/available.
  146. In the first position of the panel,
  147. indicates the service definition
  148. .I sv
  149. is not active.
  150. The rest of the panel will be filled by `-' characters,
  151. and no reporting will appear for uptimes and pids.
  152. .PP
  153. .RS
  154. .nf
  155. .B # chmod -t foo && perpls foo
  156. [- --- ---] foo
  157. .fi
  158. .RE
  159. .TP
  160. .B E
  161. Error.
  162. Appears only in the first position for overall status.
  163. Displayed when a problem was encountered in finding the
  164. .I sv
  165. argument or its
  166. .BR perpd (8)
  167. supervisor.
  168. The rest of the panel will be filled by `-' characters,
  169. and followed by a diagnostic message describing the error:
  170. .PP
  171. .RS
  172. .nf
  173. .B # perpls foo
  174. [E --- ---] foo error: failure stat() on service directory (ENOENT)
  175. .fi
  176. .RE
  177. .SS Colorized Listings
  178. On terminals with color support,
  179. .B perpls
  180. may display a ``colorized'' listing when given the
  181. .B \-G
  182. option on the command line,
  183. or if PERPLS_COLORS is defined with a capability string in the environment.
  184. The colorization is applied to the
  185. .I sv
  186. name in the report according to the status found for the service.
  187. Colorization is based on ANSI (ISO 6429) color sequences,
  188. selected from a capability table that defines
  189. the following entries (default values shown in parentheses):
  190. .TP
  191. .B df
  192. Default (df=00).
  193. Applied when a capability is otherwise undefined.
  194. .TP
  195. .B na
  196. Not active (na=00).
  197. Applied when a service is not activated.
  198. .TP
  199. .B an
  200. Active-normal (an=01).
  201. Applied when the main service is active and running normally.
  202. .TP
  203. .B ar
  204. Active-resetting (ar=01;33).
  205. Applied when the main service is resetting.
  206. .TP
  207. .B ap
  208. Active-paused (ap=01;33).
  209. Applied when the main service is paused.
  210. .TP
  211. .B ad
  212. Active-down (ad=01;34).
  213. Applied when the main service is down.
  214. .TP
  215. .B wu
  216. Want-up (wu=01;33).
  217. Applied when the main service is down but wants up.
  218. .TP
  219. .B wd
  220. Want-down (wd=01;33).
  221. Applied when the main service is up but wants down.
  222. .TP
  223. .B er
  224. Error (er=01;31).
  225. Applied when an error encountered.
  226. .TP
  227. .B ex
  228. Exception (ex=01;31).
  229. Applied when an exceptional condition encountered.
  230. .PP
  231. In a default installation,
  232. the capability table will be predefined with the following string:
  233. .PP
  234. .RS
  235. "df=00:na=00:an=01:ar=01;33:ap=01;33:\\
  236. ad=01;34:wu=01;33:wd=01;33:er=01;31:ex=01;31"
  237. .RE
  238. .SH OPTIONS
  239. .TP
  240. .B \-b basedir
  241. Base directory.
  242. Look for
  243. .I sv
  244. in
  245. .IR basedir .
  246. .TP
  247. .B \-c
  248. Current directory.
  249. Look for
  250. .I sv
  251. in the current directory,
  252. even if PERP_BASE is defined in the environment.
  253. .TP
  254. .B \-g
  255. No color.
  256. Do not colorize listing,
  257. even if PERPLS_COLORS is defined in the environment.
  258. .TP
  259. .B \-G
  260. Colorize.
  261. Display a colorized listing.
  262. Use the capability table given by PERPLS_COLORS
  263. if defined in the environment,
  264. or use a built-in capability table if PERPLS_COLORS is not defined.
  265. .TP
  266. .B \-h
  267. Help.
  268. Print a brief usage message to stderr and exit.
  269. .TP
  270. .B \-K
  271. Capability.
  272. Print the current capability table for colorized listings and exit.
  273. The environment variable PERPLS_COLORS must be defined.
  274. Otherwise this option must be combined with the
  275. .B \-G
  276. option to display the built-in capability table.
  277. .TP
  278. .B \-r
  279. Reverse sort.
  280. Display the listing in reverse order.
  281. Normally the listing appears in the order of
  282. .I sv
  283. given on the command line,
  284. or in alphabetical order if no
  285. .I sv
  286. are given.
  287. The
  288. .B \-r
  289. option lists in the reverse of this order.
  290. This option may be combined with the
  291. .B \-t
  292. option.
  293. .TP
  294. .B \-t
  295. Uptime.
  296. Display the listing ordered by uptime of the main service,
  297. shortest uptimes first.
  298. May be combined with the
  299. .B \-r
  300. option to display longest uptimes first.
  301. .TP
  302. .B \-V
  303. Version.
  304. Print the version number to stderr and exit.
  305. .SH AUTHOR
  306. Wayne Marshall, http://b0llix.net/perp/
  307. .SH SEE ALSO
  308. .nh
  309. .BR perp_intro (8),
  310. .BR perpboot (8),
  311. .BR perpctl (8),
  312. .BR perpd (8),
  313. .BR perpetrate (5),
  314. .BR perphup (8),
  315. .BR perpok (8),
  316. .BR perpstat (8),
  317. .BR sissylog (8),
  318. .BR tinylog (8)
  319. .\" EOF perpls.8