Results 1 to 11 of 11
Thread: Time Taken for back up
-
02-26-2010, 03:04 AM #1Member
- Join Date
- Jul 2007
- Posts
- 161
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Time Taken for back up
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
-
02-26-2010, 03:13 AM #2Senior Member
- Join Date
- Jul 2008
- Location
- Birmingham, UK
- Posts
- 529
- Thanks
- 0
- Thanked 4 Times in 4 Posts
Hi
Try adding this in somewhere
substr(char(start_time-end_time,11),4,
as Duration
Cheers
-
02-26-2010, 03:15 AM #3Senior Member
- Join Date
- Jul 2008
- Location
- Birmingham, UK
- Posts
- 529
- Thanks
- 0
- Thanked 4 Times in 4 Posts
grrr it shouldn't have put a smiley in there...
that should be
, number eight ) as Duration
Cheers
-
02-26-2010, 03:27 AM #4Member
- Join Date
- Jul 2007
- Posts
- 161
- Thanks
- 0
- Thanked 0 Times in 0 Posts
script
Code:it fails tsm: TAG_TSM1>SELECT entity AS "Node name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,2)) AS "GB xfer", SUBSTR (CAST(min (star t_time) AS char(29)),1,10) AS "start date", SUBSTR (CAST(min (start_time) AS char(29)),12,8) AS "start time", SUB STR (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 substr(c har(start_time-end_time,11),4,8,) as Duration ANR2905E Unexpected SQL identifier token - 'SUBSTR'. | ............................V.................................. - 24 hours GROUP BY entity substr(char(start_time-end_time,11)
-
02-26-2010, 03:36 AM #5
try:
edit: typing errors ...tsm: TSM_SERVER1>SELECT entity AS "Node name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,2)) AS "GB xfer",(e
nd_time-start_time) as Duration,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,start_time,end_time
-
02-26-2010, 04:59 AM #6Senior Member
- Join Date
- Jul 2008
- Location
- Birmingham, UK
- Posts
- 529
- Thanks
- 0
- Thanked 4 Times in 4 Posts
put
start_time> current_timestamp - 24 hours GROUP BY entity substr(char(start_time-end_time,11),4,8 ) as Duration
before the "FROM SUMMARY" part of the sql statement
-
02-26-2010, 05:45 AM #7Member
- Join Date
- Jul 2007
- Posts
- 161
- Thanks
- 0
- Thanked 0 Times in 0 Posts
script
Code:Sorry still getting error tsm: TAG_TSM1>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 dat e", 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" start_time> current_timestamp - 24 hours GROUP BY entity substr(char(start_time-end_time,11),4,8 ) as Duration FR OM summary WHERE activity='BACKUP' AND start_time> current_timestamp - 24 hours GROUP BY entity ANR2905E Unexpected SQL identifier token - 'START_TIME'. | ..........................V.................................... (29)),12,8) AS "end time" start_time> current_timestamp - 24 ho Also this wont allow me to save in the scripts section on the TSM console getting this error Single and double quotation marks cannot be used in the same line of a scripted command. Use the continuation character (-) to split the command so that a line contains only single or double quotation marks. For example, split this line: select node_name as "Locked Node" from nodes where locked='YES' into these lines: select node_name as "Locked Node"- from nodes where locked='YES' Can you add this without going through console?
-
02-26-2010, 05:57 AM #8
copy & paste thisSELECT entity AS "Node name", CAST(sum(bytes/1024/1024/1024) AS decimal(8,2)) AS "GB xfer", -
(end_time-start_time) as Duration,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 "enddate", 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,start_time,end_time
-
02-26-2010, 06:02 AM #9Member
- Join Date
- Jul 2007
- Posts
- 161
- Thanks
- 0
- Thanked 0 Times in 0 Posts
script
Code:Toxy thanks thats works great!! but i still cant save through the TSM console get the error i posted how do i add to scripts manualy please Treds
-
02-26-2010, 06:23 AM #10Member
- Join Date
- Jul 2007
- Posts
- 161
- Thanks
- 0
- Thanked 0 Times in 0 Posts
script
thanks worked it out
-
05-15-2012, 07:37 AM #11Member
- Join Date
- Jun 2010
- Posts
- 84
- Thanks
- 2
- Thanked 1 Time in 1 Post
Hello ,
The statement output is for one node. it is raely work.
select entity AS \"Node name\",CAST(sum(bytes/1024/1024) AS decimal(8,2)) AS \" SIZE MB \",SUBSTR (CAST(min (start_time) AS char(29)),1,10) AS \"start date\", SUBSTR (CAST(min (start_time) AS char(29)),12,
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,
AS \"end time\" FROM summary WHERE (activity='BACKUP' AND start_time >= current_timestamp - 24 hours)and entity='NODENAMEXXX' group by entity
Similar Threads
-
Point in time restore taking extremely long time to complete
By mketcham in forum Restore / Recovery DiscussionReplies: 3Last Post: 11-03-2008, 03:45 PM -
admin sched start time end time
By influx in forum ScriptingReplies: 16Last Post: 03-14-2008, 10:00 AM -
Does hsm only recall files back one at a time?
By SANMAN in forum Hierarchical Storage ManagementReplies: 0Last Post: 03-31-2007, 05:11 PM -
Impact on TSM while changing system time to 12 hours back!!!!
By khurram in forum TSM ServerReplies: 3Last Post: 05-08-2006, 01:03 PM -
Point in time restore bringing back directories and files that have been deleted
By sean.m.stack in forum Backup / Archive DiscussionReplies: 3Last Post: 06-03-2003, 10:35 AM


Reply With Quote