@leewei 's answer is what you want to do – use the REST API.
I was playing around with the client and it looks like start times and end times are stored under “State” in the “ACTION_STATE_HISTORY” table in the sqlite database actionhistory.db.
You could write an analysis like this:
(preceding texts of first ":" of it as integer, (parenthesized part of matches (regex "ast=(\d*)") of it| "0") as integer * second + ("01 Jan 1970 00:00:00" as local time), (parenthesized part of matches (regex "lat=(\d*)") of it | "0") as integer * second + ("01 Jan 1970 00:00:00" as local time)) of (rows of statement "Select State from ACTION_STATE_HISTORY" of sqlite database of file (pathname of parent folder of client & "\__BESData\__Global\ActionHistory.db") as string)
Which will return results like this:
A: 276, ( Sun, 20 Dec 2015 16:09:30 -0600 ), ( Sun, 20 Dec 2015 16:09:30 -0600 )
A: 275, ( Sun, 20 Dec 2015 16:09:30 -0600 ), ( Sun, 20 Dec 2015 16:12:04 -0600 )
ActionID, Start DateTime, End DateTime.
You could use this and the actionIDs to generate average runtimes for actions across your environment.
But I would still probably do it LeeWei’s way if that’s an option.
<?relevance concatenations of trs of (td of html ("<A name=%22" & (if (exists name of computer of it) then (name of computer of it) else ("Name Missing")) & "%22 href=%22" & (if (exists link href of computer of it) then (link href of computer of it) else ("")) & "%22 target=%22_blank%22>" & (if (exists name of computer of it) then (name of computer of it) else ("Name Missing")) & "</A>") & td of (if (exists id of action of it) then (id of action of it as string) else ("ID Missing")) & td of html ("<A name=%22" & (if (exists name of action of it) then (name of action of it) else ("Action Name Missing")) & "%22 href=%22" & (if (exists link href of action of it) then (link href of action of it) else ("")) & "%22 target=%22_blank%22>" & (if (exists name of action of it) then (name of action of it) else ("Action Name Missing")) & "</A>") & td of (if (exists state of action of it) then (state of action of it) else ("Action State Missing")) & td of (if (exists time issued of action of it) then (((year of it as string & "-" & month of it as two digits & "-" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of time issued of action of it) else ("Issued Time Missing")) & td of (if (exists start date of action of it and exists start time_of_day of action of it) then (((year of it as string & "-" & month of it as two digits & "-" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of ((start date of it as string & " " & start time_of_day of it as string) as local time) of action of it) else (if (exists time issued of action of it) then ((((year of it as string & "-" & month of it as two digits & "-" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of time issued of action of it)) else ("No Start Date"))) & td of (if (exists end date of action of it and exists end time_of_day of action of it) then (((year of it as string & "-" & month of it as two digits & "-" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of ((end date of it as string & " " & end time_of_day of it as string) as local time) of action of it) else ("No End Date")) & td of (if (exists issuer of action of it and exists name of issuer of action of it) then (name of issuer of action of it) else ("Issued By Missing"))) of results of bes actions ?>
Isn’t that session relevance?
And I honestly thought that REST API and session relevance were the same…?
@steini44, When we take an action against a Fixlet/Task, we get a “BES Action” object.
Every computer responding to that will generate a “BES Action Result” object.
“BES Action” has a start and end time. The end time is when the BES Action is to expire.
The “BES Action Result” start and end times are when individual computers performs the action.
This is the one not available through Session Relevance.
Session Relevance can be issued via the REST API with the resource /api/query?relevance=XXX.
The availability of the BES Action Results start/end times is through a special REST API resource.
Side Note: I’d like to see more info in ActionHistory.db … it is very useful, but could be even more so.
Also, the amount of history in the ActionHistory.db seems to be controlled by a Client Setting that defaults to 1 year. I’m considering increasing it to 5 years.
Is it just a timezone issue? Is it off by just a few hours but the minutes and seconds are right?
As long as it is just off by hours that shouldn’t matter because you are talking about the difference between start and end times and not the exact start or exact end time
If this is the case, you can adjust it with relevance. @strawgate might be right about this, it would make the most sense for the times to be stored as UTC but then they can be converted to the local time zone equivalent easily.
It will be perfect to have the “Start Time” and “End Time” showing in the console in the Actions result screen like the “Exit Code”. This way we can export it easily. I contacted IBM and they suggested to open an RFE. Here is the link: http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=102861