dbuck(1)
π 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--barsand allows-kto 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;WHENcan be'always','never','auto'(default:'auto')--no-cacheβ do not save a copy of the data in a cache file. by defaultdbucksaves data in a per user per session cache file for later use with--previous.--highlight=HOSTLIST,--highlight-hostlist=HOSTLISTβ highlight the specifiedHOSTLISTin 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). bothLOWandHIcan be negative numbers (integers or decimal).-k KEY,--key=KEYβ use data at positionKEY(default:auto).dbuckcounts from 0 but field 0 is normally reserved for index/hostname. which means in normal mode-kcan range from 1 to the number of fields, while in anonymous mode (-a/--anonymous)-kcan also be 0.-z,--zeroβ makedbuckgenerate 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 (--rangeor--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 fromstdin. 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
- debian trixie: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- ubuntu resolute: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- ubuntu stonking: python3-hostlist 2.2.1-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms