Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: SAP ASE database growth analysis on a monthly/weekly basis.

$
0
0

Hi,

 

this works for me - maybe you have to rework the line with the calculation of the percentage. This is the calculation: ( $var2 - $var1 ) / $var_sz  meaning (new_data_used - old_data_used) / data_total

 

My input files are called inp1 and inp2.


#!/bin/ksh

 

 

# assume 2 header rows; so start with row 3

 

for dbname in `tail +3 inp1 | cut -f1 -d " "`

do

var_sz=`cat inp1 | grep $dbname | awk '{print $3}'`

var1=`cat inp1 | grep $dbname | awk '{print $4}'`

var2=`cat inp2 | grep $dbname | awk '{print $4}'`

var3=`echo "scale=2; ( $var2 - $var1 ) / $var_sz" | bc`

echo $dbname $var3 %

done

 

Best regards,

Juergen


Viewing all articles
Browse latest Browse all 3587

Trending Articles