1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
Peter Rajnoha ded279f826 report: add support for time (basic)
This patch adds support for time values used in reporting fields.
The raw values are always stored as number of seconds since epoch.

The support that comes with this patch is the basic one which allows
only for recognition of strictly formatted date and time in selection
criteria (the format follows a subset of formats defined by ISO 8601):

  date time timezone

  date:
    YYYY-MM-DD (or shortly YYYYMMDD)
    YYYY-MM (shortly YYYYMM), auto DD=1
    YYYY, auto MM=01 and DD=01

  time:
    hh:mm:ss (or shortly hhmmss)
    hh:mm (or shortly hhmm), auto ss=0
    hh (or shortly hh), auto mm=0, auto ss=0

  timezone (always with + or - sign):
    +hh:mm or -hh:mm (or shortly +hhmm or -hhmm)
    +hh or -hh

Or directly the time (number of seconds) since Epoch (1970-01-01 00:00:00 UTC)
when the number value is prefixed by "@":

   @number_of_seconds_since_epoch

This patch also adds aliases for comparison operators
used together with time values which are more intuitive
to use:
  since (as alias for >=)
  after (as alias for >)
  until (as alias for <=)
  before (as alias for <)

For example:

$ lvmconfig --type full report/time_format
time_format="%Y-%m-%d %T %z %Z [%s]"

$ lvs -o name,time vg
  LV    Time
  lvol0 2015-06-28 21:25:41 +0200 CEST [1435519541]
  lvol1 2015-06-30 03:25:43 +0200 CEST [1435627543]
  lvol2 2015-04-26 14:52:20 +0200 CEST [1430052740]
  lvol3 2015-06-30 14:52:23 +0200 CEST [1435668743]

$ lvs vg -o name,time -S 'time since "2015-04-26 15:00" && time until "2015-06-30"'
  LV    Time
  lvol0 2015-06-28 21:25:41 +0200 CEST [1435519541]
  lvol1 2015-06-30 03:25:43 +0200 CEST [1435627543]
  lvol3 2015-06-30 14:52:23 +0200 CEST [1435668743]

$ lvs vg -o name,time -S 'time since "2015-04-26 15:00" && time until "2015-06-30 6:00"'
  LV    Time
  lvol0 2015-06-28 21:25:41 +0200 CEST [1435519541]
  lvol1 2015-06-30 03:25:43 +0200 CEST [1435627543]

$ lvs vg -o name,time -S 'time since @1435519541'
  LV    Time
  lvol0 2015-06-28 21:25:41 +0200 CEST [1435519541]
  lvol1 2015-06-30 03:25:43 +0200 CEST [1435627543]
  lvol3 2015-06-30 14:52:23 +0200 CEST [1435668743]

This is basic time recognition support that is directly a part of
libdevmapper. Recognition of more free-form expressions will be a
part of subsequent patches.
2015-06-30 15:15:10 +02:00
autoconf autoconf: Update config.guess/sub to 2014-01-01. 2014-01-21 22:00:15 +00:00
conf configure: set DEFAULT_FALLBACK_TO_LVM1 in configure and use it in config_settings.h 2015-06-30 14:09:05 +02:00
daemons lvmetad: add invalidation method 2015-06-23 16:36:33 -05:00
doc doc: mention new invalid states in lvmetad_design 2015-06-23 16:48:28 -05:00
include makefiles: better clean 2015-05-18 12:45:42 +02:00
lib report: add support for time (basic) 2015-06-30 15:15:10 +02:00
libdaemon makefiles: avoid bash == operator syntax, use = instead 2015-06-26 22:11:45 +02:00
libdm report: add support for time (basic) 2015-06-30 15:15:10 +02:00
liblvm makefiles: better clean 2015-05-18 12:45:42 +02:00
man lvmconfig: display comment about value from existing config being used 2015-06-25 13:51:54 +02:00
nix nix: socat for f18, nc for f17 2015-05-14 15:01:01 +02:00
old-tests report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
po makefiles: disable po file targes 2015-05-14 14:19:40 +02:00
python python: Check for NULL value before constructing string property 2015-05-06 08:51:04 -05:00
report-generators add copyright notices to new files 2010-07-28 12:20:38 +00:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts cleanup: avoid printing gcc warning 2015-06-23 11:06:02 +02:00
spec spec: new man page 2015-05-15 21:31:28 +02:00
test tests: tests needs pre 1.13 thin-pool extorg 2015-06-26 22:16:01 +02:00
tools lvmconfig: add --type full to display full tree of settings 2015-06-25 13:33:52 +02:00
udev makefiles: compile files on make 2014-04-18 16:38:49 +02:00
unit-tests cleanup: use DM_ARRAY_SIZE 2014-04-08 11:00:15 +02:00
.gitignore gitignore: Ignore files ending in ~ 2012-06-11 16:13:02 +01:00
acinclude.m4 configure: detect st_ctim 2015-03-18 13:42:24 +01:00
aclocal.m4 configure: LOCALEDIR needs evaluated value 2015-05-18 13:06:34 +02:00
configure configure: set DEFAULT_FALLBACK_TO_LVM1 in configure and use it in config_settings.h 2015-06-30 14:09:05 +02:00
configure.in configure: set DEFAULT_FALLBACK_TO_LVM1 in configure and use it in config_settings.h 2015-06-30 14:09:05 +02:00
COPYING Outline docs 2001-12-31 16:12:40 +00:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in makefiles: use bash subshell 2015-05-20 09:33:51 +02:00
Makefile.in makefiles: use fullpath when in assign 2015-05-14 00:19:32 +02:00
README README: fix link to lvm-devel mailing list 2015-03-31 15:44:00 +02:00
VERSION post-release 2015-06-20 01:05:21 +01:00
VERSION_DM post-release 2015-06-20 01:05:21 +01:00
WHATS_NEW conf: make time format configurable 2015-06-29 14:30:35 +02:00
WHATS_NEW_DM report: add support for time (basic) 2015-06-30 15:15:10 +02:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

The source code is stored in git:
  http://git.fedorahosted.org/git/lvm2.git
  git clone git://git.fedorahosted.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.