HomeFreeBSD

Colorize zpool status output

Description

Colorize zpool status output

If the ZFS_COLOR env variable is set, then use ANSI color
output in zpool status:

  • Column headers are bold
  • Degraded or offline pools/vdevs are yellow
  • Non-zero error counters and faulted vdevs/pools are red
  • The 'status:' and 'action:' sections are yellow if they're displaying a warning.

This also includes a new 'faketty' function in libtest.shlib that is
compatible with FreeBSD (code provided by @freqlabs).

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #9340

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Dec 20 2019, 12:26 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 20 2019, 12:26 AM
Parents
rG5e8ac0559046: ZTS: Various test case fixes
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG9fb2771aa5f5: Colorize zpool status output (authored by Tony Hutter <hutter2@llnl.gov>).Dec 20 2019, 12:26 AM