dbuck(1)

πŸ“¦
version 2.2.1 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– dbuck(1) β€” the manual, but make it make sense πŸ’–

okay so bestie, welcome to dbuck from the General Commands Manual β€” she's giving utility, she's giving histograms, she's literally about to change your whole pdsh life. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

dbuck β€” format output from pdsh command or similar


🌸 SYNOPSIS 🌸

dbuck [OPTIONS] <DATA
dbuck [OPTIONS] --previous

πŸ¦‹ DESCRIPTION πŸ¦‹

She reads data from stdin (or from a cache file if you pass --previous) and prints a human readable report on stdout. iconic behaviour, no notes.

dbuck is like dshbak's cooler cousin, except she's targeted at numerical data β€” think temperatures, power consumption, loadavg, all that good stuff. The output is a bucket sorted table, a sort of histogram. very main character energy fr fr.

So the data is assumed to be N lines of column wise space separated integers or decimal numbers. By default dbuck will autodetect the column to use (picking the first valid one) and sort everything into five (linear) buckets. Any line that's missing numerical data at the targeted column just gets ignored, no drama. And a complete copy of the data also gets saved for future use (see --previous) β€” she's thoughtful like that πŸ’….


✨ OPTIONS ✨

  • -h, --help β€” prints the help message. the classic.
  • -a, --anonymous β€” anonymous data, she only handles data (this implies --bars and allows -k to be any value including zero). peep example 2 below πŸ‘‡
  • -b, --bars β€” draws histogram style bars instead of a list of keys. can be scaled down to fit your terminal with -S,--chop-long-lines.
  • --color=WHEN β€” allow colors in output; WHEN can be 'always', 'never', 'auto' (default: 'auto')
  • --no-cache β€” do not save a copy of the data in a cache file. by default dbuck saves data in a per user per session cache file for later use with --previous.
  • --highlight=HOSTLIST, --highlight-hostlist=HOSTLIST β€” highlight the specified HOSTLIST in the output table using colors. make your faves pop ✨
  • -r LOW-HI, --range=LOW-HI β€” explicitly specify a range from minimum value of lowest bucket to maximum value of highest bucket (default: minimum value to maximum value seen in input data). both LOW and HI can be negative numbers (integers or decimal).
  • -k KEY, --key=KEY β€” use data at position KEY (default: auto). dbuck counts from 0 but field 0 is normally reserved for index/hostname. which means in normal mode -k can range from 1 to the number of fields, while in anonymous mode (-a/--anonymous) -k can also be 0.
  • -z, --zero β€” make dbuck generate buckets from zero (0.0) instead of the lowest value seen in indata.
  • -o, --show-overflow β€” include two extra buckets for overflow and underflow. ⚠️ this option is only valid with a custom range (--range or --zero). default behavior is to otherwise only count the over- and underflows and present them in the statistical summary.
  • -n NBUCKETS, --nbuckets=NBUCKETS β€” number of buckets to use (default: 5)
  • -p, --previous β€” read data from cache file instead of from stdin. cache files are saved by default per user per session unless disabled by --no-cache.
  • -s, --statistics β€” output a statistical summary (min, max, mean, sum, ...)
  • -S, --chop-long-lines β€” chop too long lines / enforce one output line per bucket
  • -t FIELD_SEPARATORS, --field-separators=FIELD_SEPARATORS β€” additional field separators, space not optional (default: "")
  • -v, --verbose β€” be verbose. spill the tea β˜•
  • --debug β€” output debugging information

πŸŽ€ EXAMPLE 1 πŸŽ€

$ cat test/dbuck.testdata
 n1: 139 W
 n11: 128 W
 n13: 127 W
 n9: 127 W
 ...
$ cat test/dbuck.testdata | ./dbuck -s -n 4 --verbose
        Info: auto-detect unanimously selected key: 1
        Info: Creating simple linear bucket set
        Statistical summary
        --------------------------------------
        Number of values         : 30
        Number of rejected lines : 0
        Min value                : 115.000000
        Max value                : 209.000000
        Mean                     : 135.466667
        Median                   : 127.005617
        Standard deviation       : 25.807956
        Sum                      : 4064.000000

           LOW-    HI: CNT  HOSTLIST
        --------------------------------------
        115.00-138.50:  24  n[7-30]
        138.50-162.00:   2  n[1,3]
        162.00-185.50:   1  n6
        185.50-209.00:   3  n[2,4-5]

🌈 EXAMPLE 2 🌈

process resident size and total vm size from ps using the --anonymous option. unlike the example above there's no hostname associated with each data point so this implies --bars. slay.

$ ps -eo rss,vsize | ./dbuck --anonymous --chop-long-lines --verbose
        Info: auto-detect unanimously selected key: 0
        Info: rejected line: "RSS    VSZ"
              LOW-       HI: CNT  HOSTLIST
        --------------------------------------------------------------
             0.00-116425.60: 271  ####################################
        116425.60-232851.20:  16  ##
        232851.20-349276.80:   3
        349276.80-465702.40:   3
        465702.40-582128.00:   1

allowing dbuck to automatically find data, she picked up the RSS value (selected key: 0). now we'll specify "-k 1" to select the vsize data in column 1.

$ ps -eo rss,vsize | ./dbuck --anonymous --chop-long-lines -k 1
                0.00- 53763877.60: 293  ##############################
         53763877.60-107527755.20:   0
        107527755.20-161291632.80:   0
        161291632.80-215055510.40:   0
        215055510.40-268819388.00:   1

πŸ‘‘ AUTHOR πŸ‘‘

written by Peter KjellstrΓΆm <cap@nsc.liu.se>.

the program is published part of python-hostlist at http://www.nsc.liu.se/~kent/python-hostlist/


πŸ’œ SEE ALSO πŸ’œ

hostlist (1) pdsh (1) dshbak (1)


and that's the whole thing bestie 🫢 this was Version 2.2.1, dated dbuck(1) β€” go bucket-sort something gorgeous. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from