pcp-htop.5.in 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. .TH "PCP-HTOP" "5" "2024" "@PACKAGE_STRING@" "File Formats"
  2. .SH "NAME"
  3. \f3pcp-htop\f1 \- pcp-htop configuration file
  4. .SH "DESCRIPTION"
  5. .B pcp-htop
  6. is a customizable performance metrics reporting tool.
  7. It has a dynamic architecture, where a set of configuration files
  8. provide additional, optional meters and columns to extend the fixed
  9. set of display options provided by regular
  10. .BR htop .
  11. .LP
  12. These configuration files can be provided from both system-wide
  13. locations (first
  14. .I @sysconfdir@/pcp/htop
  15. then
  16. .IR @datarootdir@/pcp/htop )
  17. and below the user's home directory (usually
  18. .IR ~/.config/htop ).
  19. Within these locations the
  20. .I meters
  21. and
  22. .I columns
  23. are scanned for dynamic Meter and Column specifications.
  24. .LP
  25. Meters are displayed in the top part of the
  26. .B pcp-htop
  27. window, and columns are displayed in the lower part.
  28. Meters tend to display system-wide metrics, and Columns
  29. display metrics about individual processes.
  30. .LP
  31. The formats are similar but have slightly different requirements.
  32. Both formats follow the common ini-style. Blank lines are ignored.
  33. Lines starting with the "#" character are treated as comments.
  34. .SH "METERS"
  35. The following is an example configuration for a new Redis meter:
  36. .LP
  37. .ft CW
  38. .nf
  39. .in +0.5i
  40. [redisclient]
  41. caption = Redis clients
  42. type = bar
  43. blocked.metric = redis.blocked_clients
  44. blocked.color = blue
  45. blocked.label = blk
  46. clients.metric = redis.connected_clients
  47. clients.color = green
  48. clients.label = conn
  49. .in
  50. .fi
  51. .ft 1
  52. .LP
  53. A configuration file can contain multiple meter definitions.
  54. Each definition begins with a identifying name enclosed by
  55. square brackets \-
  56. .I redisclient
  57. in this example.
  58. The name is used internally within
  59. .B pcp-htop
  60. and must be unique, must begin with an alphabetic character,
  61. and may subsequently only contain alphanumeric characters or
  62. the underscore character.
  63. No whitespace or other characters are allowed.
  64. .LP
  65. There are several parameters that define the way the meter
  66. will be displayed to the user.
  67. .TP 5
  68. .B caption
  69. This value is displayed on the Setup screen once the meter
  70. has been selected.
  71. A truncated version of the
  72. .I caption
  73. will also be displayed (followed by a colon) on the primary
  74. display while the meter is updating.
  75. .TP
  76. .B description
  77. This can be used to provide more detail during the meter
  78. selection process on the Setup screen, and if present it is
  79. displayed in the "Available Meters" column.
  80. If not present, the
  81. .B caption
  82. will be used for this.
  83. If neither is present, the internal (mandatory)
  84. .B name
  85. will be used.
  86. .TP
  87. .B type
  88. This setting allows a preferred default meter type to be specified.
  89. The associated value must be one of
  90. .IR bar ,
  91. .IR text ,
  92. .IR graph ,
  93. or
  94. .IR led .
  95. If no value is provided for a dynamic meter, the default value of
  96. .IR text
  97. will be used.
  98. .TP
  99. .B maximum
  100. A numeric value can also be set to size the meter, such that
  101. values (e.g. for a
  102. .I bar
  103. type meter display) will be scaled within range zero to
  104. .IR maximum .
  105. .LP
  106. The remaining definition syntax describes the individual
  107. metric(s) which will be used to animate the meter.
  108. One or more metrics must be specified for each meter and
  109. there are several properties associated with each.
  110. Once again, these metrics must be named (the same rules
  111. described above for meters apply here) and the following
  112. properties can be configured:
  113. .TP 5
  114. .B name.metric
  115. This is the only mandatory field and associates a PCP metric
  116. with the meter.
  117. Values sampled for each metric at runtime provide the
  118. animation visible in the
  119. .B pcp-htop
  120. display.
  121. The metric specification can be either a PCP metric name as
  122. listed by
  123. .BR pminfo (1)
  124. or a "derived" metric expression.
  125. The format for derived metric expressions is described on the
  126. .BR pmRegisterDerived (3)
  127. manual page.
  128. .TP
  129. .B name.color
  130. Setting color to be used when rendering metric values.
  131. Possible values are
  132. .IR red ,
  133. .IR green ,
  134. .IR blue ,
  135. .IR cyan ,
  136. .IR magenta ,
  137. .IR yellow ,
  138. .IR gray ,
  139. .I darkgray
  140. or
  141. .IR white .
  142. .TP
  143. .B name.label
  144. An optional, short label to display before the metric value.
  145. The ":" character will be appended to the
  146. .I label
  147. before the metric value part of the display.
  148. .TP
  149. .B name.suffix
  150. An optional, short suffix to display after the metric value.
  151. Commonly used to indicate values as a percentage using a "%"
  152. .I suffix
  153. value and to provide the base unit of measurement.
  154. Note that since PCP maintains units for metrics, for those
  155. metrics that have dimension in "space" (bytes, kilobytes,
  156. megabytes, etc), a suffix will be automatically appended.
  157. .SH "COLUMNS"
  158. The following is an example configuration for a new column
  159. showing open file descriptors for each process:
  160. .LP
  161. .ft CW
  162. .nf
  163. .in +0.5i
  164. [openfds]
  165. heading = FDS
  166. caption = FDCOUNT
  167. description = Open file descriptors
  168. metric = proc.fd.count
  169. width = 3
  170. .in
  171. .fi
  172. .ft 1
  173. .LP
  174. A configuration file can contain multiple column definitions.
  175. Each definition begins with a identifying name enclosed
  176. by square brackets \-
  177. .I openfds
  178. in this example, and the same rules apply as described above
  179. for meter names.
  180. .LP
  181. Each column must specify a metric.
  182. Optional parameters can also be set.
  183. .TP 5
  184. .B metric
  185. As with meters, the metric value must be either a PCP metric
  186. name as listed by
  187. .BR pminfo (1)
  188. or a derived metric.
  189. The metric must have an instance domain (set of values) and
  190. that instance domain must map to the set of processes with
  191. the instance identifier being PIDs (process identifiers).
  192. Typically this will be metrics from the
  193. .I proc
  194. or
  195. .I hotproc
  196. namespace (\c
  197. .BR pmdaproc (1)),
  198. but metrics from other domains (\c
  199. .BR pmdabcc (1),
  200. .BR pmdabpf (1),
  201. etc) that have per-process values are equally applicable.
  202. .TP
  203. .B width
  204. Column width to use when displaying values for the metric.
  205. A negative value can be used to specify left alignment.
  206. An upper column limit of 28 characters is enforced.
  207. The default column width is 5 characters.
  208. .TP
  209. .B heading
  210. The short title that will be displayed at the head of the
  211. column \- usually a short, cryptic, all uppercase string.
  212. .TP
  213. .B caption
  214. A short identifying word presented to users on the Setup
  215. screen under both the Available and Active Columns lists.
  216. .TP
  217. .B description
  218. Text that assists users to understand the meaning of this
  219. column when it is being presented via the Setup screen in
  220. the Available Columns list.
  221. .SH "SEE ALSO"
  222. .BR pcp-htop (1),
  223. .BR pminfo (1),
  224. .BR pmcd (1),
  225. .BR pmdaproc (1),
  226. .BR pmdabcc (1),
  227. .BR pmdabpf (1)
  228. and
  229. .BR pmRegisterDerived (3).
  230. .SH "AUTHORS"
  231. .B htop
  232. was originally developed by Hisham Muhammad.
  233. Nowadays it is maintained by the community at <htop@groups.io>.
  234. .LP
  235. .B pcp-htop
  236. is maintained as a collaboration between the <htop@groups.io> and <pcp@groups.io>
  237. communities, and forms part of the Performance Co-Pilot suite of tools.