location: Diff for "arbtt_time_tracking"

Institute of Mathematics - PublicMathWiki:

Differences between revisions 13 and 14
Revision 13 as of 2019-12-15 11:47:45
Size: 3900
Editor: megger
Comment:
Revision 14 as of 2021-02-01 10:50:22
Size: 3441
Editor: eseide
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
Line 7: Line 6:
== Start deamon manually == == Start daemon manually ==
In Terminal type :
Line 9: Line 9:
In Terminal type : {{{ {{{
Line 12: Line 12:

Line 15: Line 13:
Line 18: Line 15:
In Terminal type : {{{ In Terminal type :

{{{
Line 21: Line 20:

Line 24: Line 21:

After Starting Arbtt the first time you can create a minimal configuration file with the following command:
After starting Arbtt the first time you can create a minimal configuration file with the following command:
Line 30: Line 26:
Line 37: Line 32:
Total time per tag Total time per tag
Line 50: Line 45:
Line 52: Line 46:
Line 56: Line 49:
Line 60: Line 54:
Line 62: Line 55:
Line 72: Line 64:
Line 80: Line 71:
Line 85: Line 75:
Tag,Time,Percentage Tag,Time,Percentage

Arbtt

The Automatic Rule-Based Time Tracker Arbtt is a desktop daemon that runs in the background and, every minute, records what windows are open on your desktop, what their titles are, which one is active and on which workspace you are.

Note: Please be aware that Arbtt may track sensitive data. It is not possible to specify which data Arbtt should track, you can only filter it after everything has been recorded.

Start daemon manually

In Terminal type :

(arbtt-capture &)

Start automatically after login

(Session restart required)

In Terminal type :

cp /usr/share/doc/arbtt/examples/arbtt-capture.desktop ~/.config/autostart/

read statistics

After starting Arbtt the first time you can create a minimal configuration file with the following command:

printf "{\n\$idle > 300 ==> tag inactive,\n tag Desktop:\$desktop,\n tag Program:\$current.program\n}" > ~/.arbtt/categorize.cfg

Note: This configuration file does not specify what actions are recorded. Instead it configures how the recorded data ist tagged and displayed using the program arbtt-stats.

Then you may use arbtt-stats to see your statistics:

> arbtt-stats
Total time per tag
==================
__________________Tag_|___Time_|_Percentage_
         Desktop:TEMP | 33m00s |      60.00
Program:google-chrome | 28m00s |      50.91
          Desktop:GRC | 21m00s |      38.18
Program:mate-terminal | 12m00s |      21.82
 Program:sublime_text | 11m00s |      20.00
        Program:gedit |  2m00s |       3.64
         Program:caja |  1m00s |       1.82
       Program:Tomboy |  1m00s |       1.82
          Desktop:WS1 |  1m00s |       1.82

filter statistics by month

arbtt-stats --for-each month

From the manual:

--for-each PERIOD
This is not a report of its own, but causes the selected report to be executed for each of the given PERIOD (which can be minute, hour,day, month or year) where there exist selected samples. All the reports will then be printed one after another or, in the case of CSV output, with an additional column.

configuration file

Before we read the statistics above, we have created the configuration file ~/.arbtt/categorize.cfg

{
$idle > 300 ==> tag inactive,
tag Desktop:$desktop,
tag Program:$current.program
}
  • The first line indicates that the data is not counted if the user was idle for more than 60 seconds. (idle = no mouse / keyboard action)
  • The second line creates a tag for the workspaces. It created lines such as Desktop:WS1 |  1m00s |  1.82 in the above statistical output

  • The third line creates a tag for the programs. It created lines such as Program:gedit |  2m00s |   3.64 in the above statistical output

The syntax of the configuration file is very powerful. You may find a complete manual at Abtt Config Manual

statistics export

Output Arbtt statistics in a CSV format with arbtt-stats --output-format=csv:

> arbtt-stats --output-format=csv
Tag,Time,Percentage
Desktop:TEMP,0:45:00,67.16
Program:google-chrome,0:39:00,58.21
Desktop:WS2,0:21:00,31.34
Program:mate-terminal,0:13:00,19.40
Program:sublime_text,0:11:00,16.42
Program:gedit,0:02:00,2.99
Program:caja,0:01:00,1.49
Program:Tomboy,0:01:00,1.49
Desktop:WS1,0:01:00,1.49

PublicMathWiki: arbtt_time_tracking (last edited 2021-02-01 10:50:22 by eseide)