Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undocumented arbtt-stats --dump-samples vs arbtt-dump #44

Open
pas-calc opened this issue Jan 29, 2021 · 3 comments
Open

undocumented arbtt-stats --dump-samples vs arbtt-dump #44

pas-calc opened this issue Jan 29, 2021 · 3 comments

Comments

@pas-calc
Copy link

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
Copy link
Author

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
?

@nomeata
Copy link
Owner

nomeata commented Jan 30, 2021

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.

@pas-calc
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants