• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Calculate occupancy of two stgpools in TSM

combato

ADSM.ORG Member
Hi Pro's

Is it possible to calculate the occupancy from two stgpools in TSM and get the total amount? I Have two stgpools that I want to add and get a result?

SELECT stgpool_name,CAST(FLOAT(SUM(logical_mb))/1024/1024 AS DEC(8,2)) as TB FROM occupancy where stgpool_name='NDMPPOOL' GROUP BY stgpool_name
+
SELECT stgpool_name,CAST(FLOAT(SUM(logical_mb))/1024/1024 AS DEC(8,2)) as TB FROM occupancy where stgpool_name='FILERPOOL' GROUP BY stgpool_name

Regards,

/C
 

marclant

ADSM.ORG Moderator
You are so close. Just need to change your where clause to be one pool or the other pool.
SQL:
... where stgpool_name='NDMPPOOL' or stgpool_name='FILERPOOL' GROUP...
 

marclant

ADSM.ORG Moderator
Actually, that won't give you a grand total, just how much is in each pool. To get the sum of both pools, you would need:
SQL:
SELECT CAST(FLOAT(SUM(logical_mb))/1024/1024 AS DEC(8,2)) as TB -
FROM occupancy -
WHERE stgpool_name='NDMPPOOL' OR stgpool_name='FILERPOOL'
 

combato

ADSM.ORG Member
Actually, that won't give you a grand total, just how much is in each pool. To get the sum of both pools, you would need:
SQL:
SELECT CAST(FLOAT(SUM(logical_mb))/1024/1024 AS DEC(8,2)) as TB -
FROM occupancy -
WHERE stgpool_name='NDMPPOOL' OR stgpool_name='FILERPOOL'
Great!! Thank you @marclant

/C
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 18 18.4%
  • Keep using TSM for Spectrum Protect.

    Votes: 60 61.2%
  • Let's be formal and just say Spectrum Protect

    Votes: 12 12.2%
  • Other (please comement)

    Votes: 8 8.2%

Forum statistics

Threads
31,714
Messages
135,187
Members
21,719
Latest member
rolangpr
Top