2024-01-25 20:14:22 +01:00
|
|
|
# Timetracker
|
|
|
|
|
|
2024-01-25 20:22:00 +01:00
|
|
|
Tracks every 15 minutes if system is running to store the beginning and end of using the system.
|
2024-01-25 20:14:22 +01:00
|
|
|
|
2024-01-25 20:28:21 +01:00
|
|
|
[](https://github.com/ronnyfriedland/timetracker/actions/workflows/anchore-syft.yml)
|
|
|
|
|
[](https://github.com/ronnyfriedland/timetracker/actions/workflows/codeql.yml)
|
|
|
|
|
|
2024-01-25 20:14:22 +01:00
|
|
|
## Parameters
|
|
|
|
|
|
|
|
|
|
The timetracker application provides the following arguments which can be passed:
|
|
|
|
|
|
|
|
|
|
| Property | Description |
|
|
|
|
|
|---------------|----------------------------------------------------------------------------|
|
2025-03-19 20:51:09 +01:00
|
|
|
| archivedata | Enables archiving timetracker status to excel archive file, default: false |
|
2024-01-25 20:14:22 +01:00
|
|
|
| configpath | Defines the location of the necessary files, default: /var/lib/timetracker |
|
|
|
|
|
|
|
|
|
|
## Execution
|
|
|
|
|
|
|
|
|
|
The application is triggered by a systemd timer which triggers the application via systemd unit.
|
|
|
|
|
|
2025-06-04 11:54:36 +02:00
|
|
|
*Note:* Running timetracker with systemd unit uses the default property values. To change it you have use the appropriate alternative.
|
|
|
|
|
|
|
|
|
|
### Switch alternative
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
update-alternatives --config timetracker
|
|
|
|
|
```
|
2025-03-19 20:51:09 +01:00
|
|
|
|
2024-01-25 20:18:16 +01:00
|
|
|
To enable the timer you have to (requires root privileges):
|
|
|
|
|
|
|
|
|
|
### enable the timer
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
systemctl enable timetracker.timer
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### start the timer
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
systemctl start timetracker.timer
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To verify if the timer is running you can check it using:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
systemctl list-timers
|
|
|
|
|
```
|
|
|
|
|
|
2024-02-06 20:21:11 +01:00
|
|
|
### Show results
|
|
|
|
|
|
|
|
|
|
The aggregated data can be displayed using `journalctl`:
|
|
|
|
|
```shell
|
|
|
|
|
journalctl -u timetracker.service -t timetracker
|
|
|
|
|
```
|
|
|
|
|
|
2024-01-25 20:14:22 +01:00
|
|
|
## License
|
|
|
|
|
|
2024-02-06 20:21:11 +01:00
|
|
|
This application is published under the [MIT license](LICENSE).
|