Timewarrior is an open source tool that tracks time from the command line. And in this article, I show you how it comes in handy.
My guess is that many sysadmins share the need to spend a specific amount of time on certain projects. For example, let's say I have a contract to work 40 hours a week doing virtualization and cloud computing stuff for 50% of the time, spending 30% of the time on Linux, and another 20% on firewall and load-balancing. Well, that's the plan, at least. To see how this plays out in reality, I need a tool to track my time on these tasks. The tool has to be quick and easy to use, so I don't waste time tracking instead of working.
Prepare the stage for Timewarrior - a tool that I feel is of so much help that I wish I had known it far earlier.
Looking for the full documentation? You'll find it at the Timewarrior web site.
Possible use cases
Nothing is as helpful as some real-world use cases. I'll show you some of mine.
As simple as a stopwatch
To record some random activity, you could use Timewarrior as a simple stopwatch. As you begin the activity, you start the clock:
$ timew start
Tracking
Started 2020-08-19T08:18:23
Current 23
Total 0:00:00
$ timew stop
Recorded
Started 2020-08-19T08:18:23
Ended 20:49
Total 0:02:26
When you're finished with the activity, stop the clock and find the time spent printed to stdout
.
[ Readers also enjoyed: Linux sysadmin basics: User account management ]
Track reoccurring activities using tags
To track time spent on activities like Meetings, Linux, or Firewall, I use tags which I append to the timew start
command. Please look at the following code blocks carefully to understand how this works.
Start the Meeting:
$ timew start Meeting
Tracking Meeting
Started 2020-08-21T10:56:24
Current 24
Total 0:00:00
Start the Virtualization task:
$ timew start Virtualization
Recorded Meeting
Started 2020-08-21T10:56:24
Ended 57:19
Total 0:00:55
Tracking Virtualization
Started 2020-08-21T10:57:19
Current 19
Total 0:00:00
Start Meeting:
$ timew start Meeting
Recorded Virtualization
Started 2020-08-21T10:57:19
Ended 58
Total 0:00:39
Tracking Meeting
Started 2020-08-21T10:57:58
Current 58
Total 0:00:00
Start Linux:
$ timew start Linux
Recorded Meeting
Started 2020-08-21T10:57:58
Ended 58:35
Total 0:00:37
Tracking Linux
Started 2020-08-21T10:58:35
Current 35
Total 0:00:00
Stop tasks:
$ timew stop
Recorded Linux
Started 2020-08-21T10:58:35
Ended 11:00:25
Total 0:01:50
Display the summary:
$ timew summary
Wk Date Day Tags Start End Time Total
W34 2020-08-21 Fri Verw. 6:41:58 6:43:16 0:01:18
Virtualization 6:43:16 6:48:05 0:04:49
Sysmaster 6:48:05 6:50:44 0:02:39
Meeting 10:56:24 10:57:19 0:00:55
Virtualization 10:57:19 10:57:58 0:00:39
Meeting 10:57:58 10:58:35 0:00:37
Linux 10:58:35 11:00:25 0:01:50 0:12:47
Depending on your terminal settings the output looks much nicer as the screenshot from a gnome-terminal should illustrate.

With timew summary
, you get the summary for your current day. As you see, I worked in the early morning today, which I had almost forgotten already.
Would you like to know more about Timewarrior's reporting functionality? Look at the documentation.
[ Free cheat sheet: IT job interview tips ]
Wrap up
Timewarrior is an awesome tool that helps me track time spent on different projects quickly and easily. This information helps to determine whether one person's time is enough to deal with all the work for one task or if more resources are needed to get the job done.
About the author
Jörg has been a Sysadmin for over ten years now. His fields of operation include Virtualization (VMware), Linux System Administration and Automation (RHEL), Firewalling (Forcepoint), and Loadbalancing (F5). He is a member of the Red Hat Accelerators Community and author of his personal blog at https://www.my-it-brain.de.
Browse by channel
Automation
The latest on IT automation for tech, teams, and environments
Artificial intelligence
Updates on the platforms that free customers to run AI workloads anywhere
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
The latest on how we reduce risks across environments and technologies
Edge computing
Updates on the platforms that simplify operations at the edge
Infrastructure
The latest on the world’s leading enterprise Linux platform
Applications
Inside our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Customer support
- Developer resources
- Find a partner
- Red Hat Ecosystem Catalog
- Red Hat value calculator
- Documentation
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit