## find the size of a database by counting all the used pages

find the size of a database by counting all the used pages
# 1
03-10-2009
find the size of a database by counting all the used pages

Hi all,

I am looking to find the size of the database by counting all the used pages.

1. I have a file which reads like below
16384 4750850
32768 165
The first column is the pagesize and the second column is the number of pages associated.

So what i am trying is to do is read the file and put the values in 4 variables A,B,C,D....if A = 16384 then E = \$A * \$B(4750850)

So how do i read 16384 into A and so on....

 family_guy View Public Profile for family_guy Find all posts by family_guy
# 2
03-10-2009
Are you familiar with awk?
You could try
\$1 would be the first field, \$2 would be the second, etc.
 R.T. View Public Profile for R.T. Find all posts by R.T.
# 3
03-10-2009
can you guide me in reading those values into variables...like putting 16384 into A and 32XXX into B etc
 family_guy View Public Profile for family_guy Find all posts by family_guy
# 4
03-10-2009

Last edited by R.T.; 03-10-2009 at 05:54 PM.. Reason: Needed code tags
 R.T. View Public Profile for R.T. Find all posts by R.T.
# 5
03-10-2009
How can i get the grand total?

awk '{A=\$1;B=\$2;print A" x "B" = "A*B}' out
16384 x 4750850 = 7.78379e+10
32768 x 165 = 5406720

Looking for a total ( 7.7XXXX + 5406720)
 family_guy View Public Profile for family_guy Find all posts by family_guy
# 6
03-10-2009

Last edited by R.T.; 03-10-2009 at 09:32 PM.. Reason: dropped a }
 R.T. View Public Profile for R.T. Find all posts by R.T.
# 7
03-10-2009
you rock

you rock bud...thnx a ton
 family_guy View Public Profile for family_guy Find all posts by family_guy

## Scrape 10 million pages and save the raw html data in mysql database

I have a list of 10 million page urls. I want those pages scraped and saved in the mysql database as raw html. I own a Linux VPS server with 1GB RAM and WHM/cPanel. I would like to scrape at least 100,000 urls in 24 hours. So can anyone give me some sample shell scripting code?

## Help with Database size script

Hello, I'm not very good at scripting as my job is an DBA for a small firm, but now I'd like to implement a few cron jobs which access and report on the databases on an automatic basis. This is my SQL TEXT # -- Total size of Database Size in GB set echo off feedback off verify off...

## Help with Database size script

Hello, I'm not very good at scripting as my job is an DBA for a small firm, but now I'd like to implement a few cron jobs which access and report on the databases on an automatic basis. This is my SQL TEXT # -- Total size of Database Size in GB set echo off feedback off verify off pause...

## NMON 12a Size of proc in 4k pages?

Hi running NMON 12a under AIX. Lately I get some out of mem errors from a java machine running "-xmx 1024" which means it can hold up to 1GB mem. Monitoring the process in NMON shows under TOP -> SIZE KB -> 250M I've found nothing in the documentation so I'd like to ask here if anyone...

## Database Size

Can anybody tell me how to look for the size of the database on the solariis servers. I am using Solaris 5.6 and Solaris 1.1.1 Any help will be appreciated..................

## know the size of database

Hi all , How to know the size of a oracle database running in hp-ux server.

## command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server...

## command(s) to find size of mysql database?

hello, i'm trying to figure out the size of a mysql database shelling into my server with putty / command line. is there / are there any commands that will return the size of a database, in MB? thanks.

## database image size

hi , we are using Veritas netbackup 5 to backup all databases at our site. i noticed lately that a specific filesystem on the netbackup servers in running critically out of space , after some investigations i found that there are images that are increasing in size everytime a backup is taken ....

## how to figure out the size in MB for an informix database

This is the info i have so far. please if you are dead positive can u let me know if i my math/process is correct. Chunks address chk/dbs offset size free bpages flags pathname 5003e1f8 1 1 0 250000 177177 PO- /database/link_cw_p01_rootdbs 5003e494 2 ...