Code:
Hi i have a nice script that gives me start and stop times for all my nodes on back up.But i would like to add the time taken in as well. Can any one please add to this script to give me the desired result.
SELECT entity AS "Node name", CAST(sum(bytes/1024/1024/1024)
AS decimal(8,2)) AS "GB xfer", SUBSTR (CAST(min
(start_time) AS char(29)),1,10) AS "start date", SUBSTR
(CAST(min (start_time) AS char(29)),12,8) AS "start time",
SUBSTR (CAST(max (end_time) AS char(29)),1,10) AS "end
date", SUBSTR (CAST(max (end_time) AS char(29)),12,8) AS
"end time" FROM summary WHERE activity='BACKUP' AND
start_time> current_timestamp - 24 hours GROUP BY entity
thanks in advance
Treds