ADSM-L

[ADSM-L] help on script calculation

2012-09-05 12:53:55
Subject: [ADSM-L] help on script calculation
From: Robert Ouzen <rouzen AT UNIV.HAIFA.AC DOT IL>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 5 Sep 2012 16:47:59 +0000
Hi to all

Long time ago I wrote 2 script to get the amount of data backup.

1.       For the storage pools

2.       For Specific contact  (I use the contact field to filter the faculties 
in our organization Haifa University)

When I look now at my scripts for:


1.       select cast(stgpool_name as varchar(18)) as "Stg Pool", 
cast(Description as varchar(70)) as "Desription" , 
cast((est_capacity_mb*pct_utilized/100.0)/1024 as numeric(8,2)) as "GB Used"  
from stgpools



2.       select  cast(sum(occ.total_mb)/1000 * 1.024 as decimal(10,2)) as 
"BACKUP_GB On Postback server" from  nodes n , auditocc occ where 
n.node_name=occ.node_name  and contact='$1'

select cast(n.node_name as varchar(16)) as "Nodename",  
cast(sum(occ.backup_mb)/1024  as varchar(16)) as "BACKUP_GB", 
cast(sum(occ.archive_mb)/1024 as varchar(16)) as "ARCHIVE_GB" , -

cast(n.TCP_ADDRESS as varchar(20)) as "TCPIP Address" , cast(n.platform_name as 
varchar(16)) as "Platform" from nodes n , auditocc occ where 
n.node_name=occ.node_name and contact='$1' group by -

n.node_name , n.TCP_ADDRESS , n.PLATFORM_NAME  order by 2

I am not sure my calculation  as /100)*1024 for my first script or /1000*1024 
for my second one and in the second select /1024 are the correct division or 
multiplication.
Tried to get the amount of data in GB but I don’t remember if those calculation 
are correct !

Anybody can take a look and advise some corrections
T.I.A Regards

Robert

<Prev in Thread] Current Thread [Next in Thread>
  • [ADSM-L] help on script calculation, Robert Ouzen <=