Tsm db

madunix

ADSM.ORG Member
Joined
Aug 5, 2008
Messages
91
Reaction score
1
Points
0
How can I check the size of TSM Database, and the daily TSM Database growth?

Thanks
 
do you mean: Q DB

tsm db growth: there is no command for that, maybe you can use tsm OR for historical summaries.
 
to calculate the growth: asigned capacity / pct_util * 100 is it correct? select PCT_UTILIZED DB_util from db DB_UTIL ------- 77.0 ----------------------------- q db f=d Available Space (MB): 7,600 Assigned Capacity (MB): 7,600
 
Last edited:
yes you can do it with sql
select (capacity_mb / 100 * pct_utilized/1024) as dbsize from db

it's quick format that I wrote, you can fix it too
 
to calculate the growth: asigned capacity / pct_util * 100 is it correct?

example:

2000 MB (ass. cap) / 5,4 (pct util) * 100 = 37037,037 -> *confused*

EDIT: nezih was faster ;-) ... but he's right!
 
absolute in my case select (capacity_mb / 100 * pct_utilized/1024) as dbsize from db = 5.714843750000000000 Thanks
 
I fix it to see it better;
select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,2)) as dbsize from db
;)
 
Great! I updated the sql statement it looks better NOW
 
One thing, I sent this command through email to others in the mail he get the following entries, how can i send only the DBsize only not other Session established with server TSM1_SITEA_SERVER1: Windows Server Version 5, Release 5, Level 0.0 Server date/time: 02/26/2009 11:03:05 Last access: 02/26/2009 11:02:15 ANS8000I Server command: 'select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,2)) as dbsize from db' DBSIZE ---------------- 5.71 I do it in this way CHECK=GROWTH SELECT=`$tsmCmd "select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,2)) as dbsize from db"` updatemail MAILBODY= tsmCmd="dsmadmc -id=usr -pa=pass;
 
dsmadmc -id=user-pa=password-dataonly=yes "select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,
2)) as dbsize from db" > outfile

and cat this outfile to mailbody
 
I ll try it now, to rewrite the script they way you described...
 
it works now, but it wont look good if i submit in the email multiple sql's, i mean the output comes swapped in each other, no clear separation between multiple sqlstatement, example: "LINUX6.LAN 44 LINUX7.LAN 23 TSMDB 7,600 7,600 0 1,428 4,096 1,945,600 1,498,382 77.0 81.3 GROWTH 5.71" ------------------- How can separate the multiple SQL statement and give each one Header/description? Thanks
 
"remove: -dataonly=yes" with this option it works but i still have other stuff of like header and version
Session established with server TSM1_SITEA_SERVER1: Windows
Server Version 5, Release 5, Level 0.0
Server date/time: 02/26/2009 12:15:59 Last access: 02/26/2009 11:36:34
 
#!/bin/sh
updatemail() {
MAILBODY=`echo "$MAILBODY $CHECK $SELECT"`
}

sendtsmmail() {
echo "$MAILBODY"|mail -s "Daily TSM Backup Report" [email protected]
}

MAILBODY=
tsmCmd="dsmadmc -id=one -pa=pass "


CHECK=LISTNODES
SELECT=`$tsmCmd "select NODE_NAME, domain_name, platform_name, client_version, client_release, client_level, client_sublevel from nodes"`
updatemail

CHECK=POLICIES
SELECT=`$tsmCmd "select DOMAIN_NAME,SET_NAME,DEFMGMTCLASS,DESCRIPTION from policysets"`
updatemail

CHECK=GROWTH
SELECT=`$tsmCmd "select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,2)) as dbsize from db"`
updatemail

sendtsmmail
 
ANS8002I Highest return code was 0. TSMDB IBM Tivoli Storage Manager Command Line Administrative Interface - Version 5, Release 4, Level 0.0
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.

Session established with server TSM1_SITEA_SERVER1: Windows
Server Version 5, Release 5, Level 0.0
Server date/time: 02/26/2009 14:12:50 Last access: 02/26/2009 14:12:05

ANS8000I Server command: 'q db'

Available Assigned Maximum Maximum Page Total Used Pct Max.
Space Capacity Extension Reduction Size Usable Pages Util Pct
(MB) (MB) (MB) (MB) (bytes) Pages Util
--------- -------- --------- --------- ------- --------- --------- ----- -----
7,600 7,600 0 1,428 4,096 1,945,600 1,498,635 77.0 81.3

ANS8002I Highest return code was 0. GROWTH IBM Tivoli Storage Manager Command Line Administrative Interface - Version 5, Release 4, Level 0.0
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.

Session established with server TSM1_SITEA_SERVER1: Windows
Server Version 5, Release 5, Level 0.0
Server date/time: 02/26/2009 14:12:55 Last access: 02/26/2009 14:12:05

ANS8000I Server command: 'select cast(float(capacity_mb / 100 * pct_utilized)/1024 as decimal(14,2)) as dbsize from db'

DBSIZE
----------------
5.71
 
attached the output, I would like to make it to look more pretty than what i have at the moment
 

Attachments

  • TSMpic.JPG
    TSMpic.JPG
    168.2 KB · Views: 10
ah ok; with the -dataonly option you getting this:

7,600 7,600 0 1,428 4,096 1,945,600 1,498,382 77.0 81.3 GROWTH 5.71?

If yes, try to use a select statement for q db:
Select avail_space_mb as "avail",capacity_mb "as cap", pct_utilized as "util", max_pct_utilized as "max util",last_backup_date as "last bck" FROM db

and i think, you need to insert a blank line in your mail to seperate your output!


EDIT *aaaaargh* I was to fast ;-) can you post a output with -dataonly option?
 
Back
Top