arbtt icon indicating copy to clipboard operation
arbtt copied to clipboard

undocumented arbtt-stats --dump-samples vs arbtt-dump

Open pas-calc opened this issue 5 years ago • 3 comments

man arbtt-stats does not list the option --dump-samples. However it is referenced in the docs.

What is the difference between arbtt-dump besides that this supports "-l" to restrict to latest logs? .

My configuration: arbtt version from official repos:

$ apt-cache policy arbtt 
arbtt:
  Installiert:           0.10.2-0.1build2
  Installationskandidat: 0.10.2-0.1build2
  Versionstabelle:
 *** 0.10.2-0.1build2 500
        500 http://ftp.stw-bonn.de/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

and

$ arbtt-stats -V
arbtt-stats 0.10.2

and system:

$ inxi -S
Kernel: 5.4.0-64-generic x86_64 bits: 64 Desktop: MATE 1.24.0 Distro: Linux Mint 20 Ulyana

pas-calc avatar Jan 29 '21 16:01 pas-calc

arbtt-dump does not seem to use cfg file, which command is more suitable to analyze often used programs: $ arbtt-dump | fgrep '(*)' | sort | uniq --count | sort --general-numeric-sort |tail -n10 vs $ arbtt-stats --dump-samples | fgrep '(*)' | sort | uniq --count | sort --general-numeric-sort |tail -n10 ?

pas-calc avatar Jan 29 '21 16:01 pas-calc

arbtt-stats --dump-samples also lists the tags, and you can filter (by tags or time or whatever) using -f.

arbtt-dump is, as you noticed, a low-level tool that really just dumps the stored data.

nomeata avatar Jan 30 '21 10:01 nomeata

Ok good to know, just saying that this option (or which combinations are valid) it is not documented in man arbtt-stats.

Notes:

  1. if you have an almost empty cfg file (like the one referenced in the Example2), it is more useful to use arbtt-dump instead of arbtt-stats --dump-samples so that not each entry needs lookup and regex pattern match (CPU intensive) to only check which title was used most. In the first place (at the very beginning when no idea of config file is known), it is the only what makes sense to use the pure arbtt-dump to check which window was opened most times (marked with (*) asterisk) , using "-l" one can constain on the last samples
  2. In the case you have a cfg with many rules file and want to check either what is unclassified (unmatched) or where are many entries that need to be narrowed down more , referncing to this tip, one could add in the end of each config file (in the case for me I am working with category "Graph") the tag Graph:unmatched, and then run arbtt-stats --dump-samples |grep -A4 "Graph:unmatched" |grep "Debug:" | sort | uniq --count | sort --general-numeric-sort | tail -n20 , then one does not need to exclude a dozens of categories (which might be a lot to exclude), later one can remove this tagging

pas-calc avatar Jan 30 '21 16:01 pas-calc