Skip to content

Commit

Permalink
v0.0.9rc2: environment variables. see --help page.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryran committed Nov 11, 2012
1 parent cf518e9 commit 0c05168
Showing 1 changed file with 321 additions and 215 deletions.
Loading

1 comment on commit 0c05168

@ryran
Copy link
Owner Author

@ryran ryran commented on 0c05168 Nov 11, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog

ENVIRONMENT VARIABLES! See all the shiny new environment variables in the first 100 lines or so. They're documented there and they're also named in the --help page.

  • Colors
    • XSOS_COLOR_RESET -- color to reset terminal to after using other colors
    • XSOS_COLOR_H1 -- color for content modules' primary header
    • XSOS_COLOR_H2 -- color for content modules' secondary header
    • XSOS_COLOR_H3 -- color for content modules' tertiary header
    • XSOS_COLOR_IMPORTANT -- color for drawing attention to important data
    • XSOS_COLOR_WARN1 -- color for level-1 warnings
    • XSOS_COLOR_WARN2 -- color for level-2 warnings
    • XSOS_COLOR_IFUP -- color for ethtool InterFace "up"
    • XSOS_COLOR_IFDOWN -- color for ethtool InterFace "down"
  • Other behaviors/output funness
    • XSOS_COLORS -- (y/n) enable/disable color -- does not override -x/--nocolor option
    • XSOS_FOLD_WIDTH -- (positive int) controls wrapping width for modules that use it -- defaults to 76
    • XSOS_HEADING_SEPARATOR -- (string) acts as a separator between content modules -- defaults to a blank line
    • XSOS_ALL_VIEW -- str of semicolon-separated variables -- defaults to: bios=y; os=y; cpu=y; mem=y; disks=y; lspci=y; ethtool=y; ip=y; net=y; sysctl=y; ps=y
    • XSOS_DEFAULT_VIEW -- str of semicolon-separated variables as above -- defaults to: os=y; cpu=y; mem=y; lspci=y; ip=y
    • XSOS_UPDATE_CONFIRM -- (y/n) controls whether built-in update function prompts for confirmation
    • XSOS_PS_LEVEL -- (int between 0 and 3) controls verbosity level (3 being highest) in --ps output
    • XSOS_MEM_UNIT -- (str: k, m, or g) sets unit used by --mem

Let's see... what else.

  • --ps:
    • 4 levels of verbosity now. 0-3. Defaults to 1. Running with -v bumps up to level 2. To get level 3, need to use XSOS_PS_LEVEL environment variable
    • Processes in D-state now colorized in warning color (orange).
    • Zombie processes now colorized dark grey to make them stand out, but not STAND OUT.
    • The column command only supports lines up to lengths of 2047 characters (or maybe bytes -- hmm, I should probably check that). This caused column to barf all over the --ps output when there were extremely long lines.
  • A majority of the line changes in this release are due to all the color-changing. Renamed the C color array to c and replaced a whole bunch of simple variables (like $c_0 and $c_imp) -- they're now part of the c color array.
  • Where it made sense, static calls to the orange color where changed to call a warning color variable.

Please sign in to comment.