changeset: 2135:6eeb55920e13 tag: tip user: Tim Foster date: Wed Nov 10 11:32:32 2010 +1300 description: 3419 history command -- ability to specify dates or date ranges desired 17012 pkg history should include boot environment or snapshot information 17013 pkg history subcommand should display boot environment and snapshot information 17222 pkg history could use a -o option
the pkg ‘history’ subcommand now has some new features.
We now record the name of the boot environment the operation was applied to, any ZFS clones created, and any ZFS snapshots taken during the course of the operation.
In addition, pkg history can also accept a comma-separated list of column names to print different output. The known column names at the moment are:
- The name of the boot environment this operation was started on
- The name of the client
- The version of the client
- The command line used for this operation
- The time that this operation finished
- The user id that started this operation
- The new boot environment created by this operation
- The name of the operation
- A summary of the outcome of this operation
- Additional information on the outcome of this operation
- The snapshot taken during this operation. This is only recorded if the snapshot was not automatically removed after successful operation completion
- The time that this operation started
- The total time taken to perform this operation (for operations that take less than a second, “0:00:00″ will be printed)
- The username that started this operation
The old “result” column has been split into “result” and “reason” to preserve field formatting, and the old “time” column has been renamed to “start”. The “time” column now contains the total operation time (“finish” – “start” times) – I figured, that calculating the total operation time might be useful, rather than expecting users to do it manually.
Finally, pkg history gets a ‘-t’ flag, allowing users to specify a comma separated list of dates, or ranges of dates they’re interested in. Previously users could only choose to see all events or the last ‘n’ events with the -n flag.
I really like the history subcommand – I’ve found that being able to see over time which packages have been installed and removed from the system, and which operations have failed or succeeded is extremely useful. Being able to find detailed information about how packages have been managed over time gives quite an insight into how people use software. It’d be interesting to use this as input on deciding how to craft custom distributions of Solaris that contain the software that people use in the real world.
We didn’t have a history function in SVR4 that I’m aware of – another point in favour of IPS. History Lives on in Historic Historyville!