# Output Formats

### Basic Formatting

By design, collectl gathers more data than is possible to display in an efficient, easy to read, compact form. However, most user want their data displayed in such a form for easy interpretation. Therefore, collectl will attempt to display all data in a single line, often choosing a subset of the complete data for each subsystem. If the user has selected too many systems, each line may exceed the display width and wrap. When this happens either make the terminal window wider (maybe even using a smaller font) or choose less subsystems. This is referred to as brief format and is collectl's display format of choice and therefore the default. Verbose mode displays more information and results in multiple lines of output.

Collectl will try its best to select a format consistent with the user's selection criteria, using brief mode whenever possible unless explicitly told no to do so. However there are several instances when this mode doesn't make sense. For example, detail data will always be displayed in verbose mode since it takes multiple lines for each sample. When this occurs, collectl will automatically use verbose which can also be manually forced for non-detail data using --verbose.

One should note that these formats are not just for interactive use and can also applied to playback mode as well.

An additional feature of brief output is subtotal mode. If one hits the enter key at any time, the next line of output will be the subtotals (or averages on non-counters) of all columns since the start of collectl OR the last time the counters were zeroed. To zero the counters enter Z followed by a carriage return. Furthermore, if you type A followed by the enter key, the averages will be reported. The averages/totals can also be displayed during playback in brief mode by specifying -oA.

To get a better idea of what the output actually looks like, see the examples.

You can even export your own custom output.

### Additional Control

There are several switches that provide even more control over the look of the output in addition to --verbose as described above. They are:

- --home moves the cursor to the home position before displaying verbose output at the start of each interval. Only available in interactive mode, this results in a look-and-feel similar to the top command.
- --procfilt and --slabfilt effect the output format for those respective output formats in that these typically cause a much smaller number of processes or slabs (if used in conjunction with --slabopts S) to be displayed, sometimes as little as a line or two and it was felt repeating the interval header when only processes or slabs are the only data being reporting, was too distracting and so it left off. Be sure to try it with -oT for better clarity.
- --top is very similar to the linux top command in that it shows a small subset of processes sorted by the top consumers of the cpu, I/O or even page faults. You can even use -s to add subsystems to the display in brief or verbose mode as well. By default this format sorts by the top CPU users but you can choose virtually field. If you choose one of the slab field names it will show the top slabs sorted by that field name.

The best way to really understand how these work in conjunction with each other is to try them out. And don't forget you can use --top with playback too!

updated Feb 21, 2011