Need help
Posted in 2001
Topics: Storage & Space Management
--------------832E4E2A803A27BDE04C0809 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I need to write a simple "perl" script to calculate the free spaces in (%). But I am facing a problem in adding up (chksize) for the dbsnum =11 (there are 2 chunks over here). How should add up the 2 chunks ? dbsnum name chksize nfree 1 jkta_root_dbs 512000 344953 2 jkta_log_dbs 1024000 4043 3 jkta_tmp_dbs1 1024000 1011167 4 jkta_tmp_dbs2 1024000 1001103 5 gop_dbs1 128000 45975 6 gop_dbs2 179200 126211 7 gop_dbs3 332800 140117 8 sam_dbs1 409600 29184 9 sam_dbs2 921600 175717 10 sam_dbs3 870400 127687 11 sam_dbs4 1024000 19650 11 sam_dbs4 665600 354779 12 sis_sd_dbs 256000 0 13 sis_sd_idx 102400 6959 14 sis_sas_dbs 51200 51147 15 sis_sas_idx 51200 19803 16 sis_gen_dbs 1024000 0 17 sis_gen_idx 512000 97133 18 sis_gas_dbs 153600 153547 --------------832E4E2A803A27BDE04C0809 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> Hi all, <p>I need to write a simple "perl" script to calculate the free spaces in (%). But I am facing a problem in adding up (chksize) for the dbsnum =11 (there are 2 chunks over here). How should add up the 2 chunks ? <br> <br> <br> <p>dbsnum name chksize nfree <p> 1 jkta_root_dbs 512000 344953 <br> 2 jkta_log_dbs 1024000 4043 <br> 3 jkta_tmp_dbs1 1024000 1011167 <br> 4 jkta_tmp_dbs2 1024000 1001103 <br> 5 gop_dbs1 128000 45975 <br> 6 gop_dbs2 179200 126211 <br> 7 gop_dbs3 332800 140117 <br> 8 sam_dbs1 409600 29184 <br> 9 sam_dbs2 921600 175717 <br>10 sam_dbs3 870400 127687 <br><b>11 sam_dbs4 1024000 19650</b> <br><b>11 sam_dbs4 665600 354779</b> <br>12 sis_sd_dbs 256000 0 <br>13 sis_sd_idx 102400 6959 <br>14 sis_sas_dbs 51200 51147 <br>15 sis_sas_idx 51200 19803 <br>16 sis_gen_dbs 1024000 0 <br>17 sis_gen_idx 512000 97133 <br>18 sis_gas_dbs 153600 153547 <br> <br> </html> --------------832E4E2A803A27BDE04C0809--
Tham Huei Hwan wrote: > > --------------832E4E2A803A27BDE04C0809 > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > > Hi all, > > I need to write a simple "perl" script to calculate the free spaces in > (%). But I am facing a problem in adding up (chksize) for the dbsnum =11 > (there are 2 chunks over here). How should add up the 2 chunks ? Ah, hmmm, ... using "+"? Do you know how to write perl? Perhaps you would be better off using sysmaster SMI and SQL. HTH Brett Randall > > dbsnum name chksize nfree > > 1 jkta_root_dbs 512000 344953 > 2 jkta_log_dbs 1024000 4043 > 3 jkta_tmp_dbs1 1024000 1011167 > 4 jkta_tmp_dbs2 1024000 1001103 > 5 gop_dbs1 128000 45975 > 6 gop_dbs2 179200 126211 > 7 gop_dbs3 332800 140117 > 8 sam_dbs1 409600 29184 > 9 sam_dbs2 921600 175717 > 10 sam_dbs3 870400 127687 > 11 sam_dbs4 1024000 19650 > 11 sam_dbs4 665600 354779 > 12 sis_sd_dbs 256000 0 > 13 sis_sd_idx 102400 6959 > 14 sis_sas_dbs 51200 51147 > 15 sis_sas_idx 51200 19803 > 16 sis_gen_dbs 1024000 0 > 17 sis_gen_idx 512000 97133 > 18 sis_gas_dbs 153600 153547 > <snip> #include <please_dont_post_mime.plea> </snip>