Identifier for SUMMARY items

admbarry

Newcomer
Joined
Mar 1, 2017
Messages
4
Reaction score
0
Points
0
PREDATAR Control23

Hi everyone,

I'm interested to know if there exists a way of identifying entries in the SUMMARY table when querying via the Tivoli Storage Manager Client (Backup and Archive Client/BA Client), which corresponds to an incremental ID (not necessarily in increments of 1) in a traditional database application.

I've inspected the NUMBER property (https://www.ibm.com/developerworks/.../Tivoli Storage Manager/page/Activity Summary), which hints at being the answer, in that the description for this property is: "The identification number that is associated with the activity", but the values of this property don't seem to be incremental - at least not across different dates, i.e. the value seems to be reset from time to time.

What I'm specifically after is a way of querying Spectrum Protect (TSM) for all summaries which are newer than e.g. SUMMARY.ID 1234, e.g.:

select * from summary where upper(activity) in ('ARCHIVE','BACKUP','RESTORE') and upper(number) >= 1235

And say if the highest ID (number) result of the above query is 2345, I could use this value for my next query, i.e.:

select * from summary where upper(activity) in ('ARCHIVE','BACKUP','RESTORE') and upper(number) >= 2346

My current approach is to use the end_time value, so an hourly query performed at 10:00:00 for summaries which have been added since 09:00:00 could be e.g.:

select * from summary where end_time >= '2017-02-21 09:00:00' and upper(activity) in ('ARCHIVE','BACKUP','RESTORE')

… but the problem with this approach is that sometimes TSM writes the summary for an activity several hours after the activity has ended with the correct end_time, which means that a summary with an end_time of e.g. "2017-02-21 09:50:00" which is written at 10:30:00 will not be included in the results when performing the querying at 11:00:00 for summaries which have been added since 10:00:00, e.g.:

select * from summary where end_time >= '2017-02-21 10:00:00' and upper(activity) in ('ARCHIVE','BACKUP','RESTORE')

Hence, being able to use an ID for a previous query as the offset for a new one, would enable delayed summaries to be included in the results.

So I guess I'm specifically asking:
  1. Is there an incremental identifier for summaries?
  2. If the "NUMBER" property is the way to go, how reliable is it? E.g. how often does it reset (which seems to be the case).
Thank you in advance.

NB: This is a copy (and slight elaboration) of my post from https://www.ibm.com/developerworks/...topic?id=41fb33d0-ae21-4f42-bd15-501670518aab.
 
PREDATAR Control23

I've inspected the NUMBER property (https://www.ibm.com/developerworks/.../Tivoli Storage Manager/page/Activity Summary), which hints at being the answer, in that the description for this property is: "The identification number that is associated with the activity", but the values of this property don't seem to be incremental - at least not across different dates, i.e. the value seems to be reset from time to time.
NUMBER refers to the session number if the activity is a client session and refers to the process number if the activity is a server process. Both reset when the server is restarted. And you will not find either of them sequentially in the summary table because session 1 could run for 10 hours and sessions 2 to 15 could finish before session 1, therefore would be listed earlier. Plus the same numbers will be used. For example, right after the server starts, you will see process number 1 and session number 1. So the values aren't unique.

… but the problem with this approach is that sometimes TSM writes the summary for an activity several hours after the activity has ended with the correct end_time,
I was not aware of that. Are you sure it's supposed to be this way or is it a sign of a problem?

So I guess I'm specifically asking:
  1. Is there an incremental identifier for summaries?
No.
 
PREDATAR Control23

Thank you for the explanation regarding NUMBER. Sorry to hear that there is no identifier for summary logs :(

I'm not sure about much regarding Spectrum Protect/TSM, but people more skilled in TSM than I are responsible for the setup, so I can just conclude the situation occurs (regularly). Below is a an excerpt of items from the SUMMARY table from 2017-01-19 (also attached as a screenshot) which shows that the order of items isn't consistent:

{Summary line number in query}: {start_time} {end_time}
921: 2017-01-19 23:34:18 2017-01-19 23:35:39
922: 2017-01-19 22:09:31 2017-01-19 23:35:53
923: 2017-01-19 23:29:38 2017-01-19 23:36:04
924: 2017-01-19 23:27:54 2017-01-19 23:36:43
925: 2017-01-19 23:36:52 2017-01-19 23:36:59
926: 2017-01-19 19:02:00 2017-01-19 20:57:27
927: 2017-01-19 23:15:03 2017-01-19 23:37:13
928: 2017-01-19 23:37:18 2017-01-19 23:37:25
929: 2017-01-19 23:20:14 2017-01-19 23:37:46

To be specific, the excerpt shows that logs are generally ordered according to their corresponding activity's end_time, but that sometimes a summary for an activity which ended hours earlier appears in the result.
 

Attachments

  • 030733_context.png
    030733_context.png
    74.1 KB · Views: 16
PREDATAR Control23

For the backup you highlighted in you screenshot, look to see how many client sessions were started for that backup and identify their session numbers. I'm wondering if they all get added when the backup finishes, rather than when the session finishes. Just a thought.
 
PREDATAR Control23

For anyone reading this post, I can say that the issues still remains unresolved. Hence, we're still experiencing summaries being written "long" after their related activity has actually ended.

If anyone from the Spectrum Protect developer team happens to stumble across this post, please consider adding an incremental identifier for summaries, i.e. (in user-story format): "As a user, I can easily retrieve all summaries which have been created after a specific summary". Thank you in advance.
 
Top