Bug 8169 - from-to Time Modifiers doesn't work
Summary: from-to Time Modifiers doesn't work
Status: RESOLVED FIXED
Alias: None
Product: smbta
Classification: Unclassified
Component: smbtad (show other bugs)
Version: unspecified
Hardware: All All
: P5 critical
Target Milestone: ---
Assignee: Holger Hetterich
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 8168 8171
  Show dependency treegraph
 
Reported: 2011-05-26 09:35 UTC by Benjamin Brunner
Modified: 2011-05-27 11:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Brunner 2011-05-26 09:35:05 UTC
Timestamps for time modifiers throughing a segmentation fault.
smbtaquery -M pgsql -N smbtad -S holger -H seizewell -I 0  -d 10 -q 'global from 21-05-2011 to 25-05-2011, usage r;' 
Speicherzugriffsfehler
smbtaquery -M pgsql -N smbtad -S holger -H seizewell -I 0  -d 10 -q 'global since 25-05-2011, usage r;' 
Speicherzugriffsfehler

Shortcuts like yesterday and today are working.
Comment 1 Holger Hetterich 2011-05-26 09:39:03 UTC
segfaulting on this input is a bug

If you use a timestamp as input, please provide a full timestamp including hh:mm:ss.

It should however interpret also input like this.
Comment 2 Benjamin Brunner 2011-05-26 10:19:17 UTC
Then, this is wrong in the documentation. I'll have a look at it by myself.

Time Modifiers
Any functions that are called on objects can make use of time modifiers, that allow to specifiy a time range the function shall work on. The supported keywords must be used on objects and are called: FROM - TO and SINCE.

Example for FROM-TO:
global from 10-10-2010 to today, total rw;

Example for SINCE:
user holger since yesterday, total rw;
Comment 3 Benjamin Brunner 2011-05-26 13:46:24 UTC
The segfault is fixed with commit
299ee027cf195a40be171418275b62852dccce20
in devel.
But it still doesn't parse the time, because of the whitespace.
Comment 4 Holger Hetterich 2011-05-26 17:33:54 UTC
This needs functional qouting support in the interpreter which I'll look at tonight. And yes, this is a critical bug.
Comment 5 Holger Hetterich 2011-05-26 18:08:47 UTC
09b56a4683311efde64b125b49083c2fcaee4d2d

should fix this, it works for me with "since",
Benni could you please check from..to ?

Quoting should be done with '

That means a -q request on smbtaquery can be done like this:
-q "global, total rw;"
or like this:
-q 'global, total rw;'

and... if the user needs to quote:
-q "global since '2011-23-23 00:00:00', total rw;"
Comment 6 Benjamin Brunner 2011-05-27 11:24:01 UTC
Fixed with commit 
6076dbca54755eb80c462d506fc097e6619b5a35
on devel.