Where Does the Time Go?
We’ll close this chapter with a brief look at a nice utility that
can be useful for keeping track of how you spend your time, information
that system administrators will find comes in handy all too often. It is
called plod and was written by
Hal Pomeranz (see http://bullwinkle.deer-run.com/~hal/plod/). While there
are similar utilities with a GUI interface (e.g., gtt and karm, from the Gnome and KDE window manager
packages, respectively), I prefer this simpler one that doesn’t require
a graphical environment.
plod works by maintaining a log
file containing time stamped entries that you provide; the files’
default location is ~/.logdir/yyyymm, where yyyy and mm indicate the current year and month,
respectively. plod log files can
optionally be encrypted.
The command has lots of options, but its simplest form is the following:
$ plod [text]If some text is included on the command, it is written to the log file (tagged with the current date and time). Otherwise, you enter the command’s interactive mode, in which you can type in the desired text. Input ends with a line containing a lone period.
Once you’ve accumulated some log entries, you can use the
command’s -C, -P, and -E
options to display them, either as continuous output, piped through a
paging command like more (although
less is the default), or via an
editor (vi is the default). You can
specify a different paging program or editor with the PAGER and EDITOR environment variables
(respectively).
You can also ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access