banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Examples

banshee/examples-collection/examples/mechanics/

selection

Example: per and its default selection, all but ignore; the space used per file system.

  • example
  • per
  • selection
  • ignore
  • disk
  • ssh

par banshee1 installation2 versions

v2Dernière

Publiée le 28 octobre 2026. One naming convention across collections; documentation completed.

Selection: per and ignore

per makes a collector return one value per element, here per file system, and sets the default selection of the probe: all of them, except those that match a pattern of ignore.

How to read it

  • per('filesystem', 'File systems', array('ignore' => array('/boot*', '/snap/*'))): the name of the elements, the word the screen shows for them (plural), and the patterns left out by default. A collector declares one per at most.
  • 'per' => 'filesystem' on an output: its value is returned once per element, value('used-percent', …, $f[5]), the third argument naming the element, here the mount point.
  • The code never filters on the selection: it returns every file system that is a disk, leaving out only those in memory (tmpfs, devtmpfs) and those of size zero. The poller sets aside, before judging, what the selection of the probe leaves out. The administrator changes the selection on the probe: all, all except, or only.
  • A pattern follows text.like: * any characters, ? one, the rest itself, case counting.
  • Leaving out tmpfs in the code is not a selection: those are not disks at all.

To adapt it

  • only instead of ignore makes the default "only these" (see examples/mechanics/selection-only).
  • Without options, the default is all.