Visit Our UNIX and Linux User Community


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


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users how to figure out the size in MB for an informix database
# 1  
Old 08-31-2001
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.

Code:
Chunks
address  chk/dbs offset   size     free     bpages   flags pathname
5003e1f8 1   1   0        250000   177177            PO-   /database/link_cw_p01_rootdbs
5003e494 2   2   256      250000   241891            PO-   /database/link_cw_p01_dbs1
5003e570 3   3   256      250000   159038            PO-   /database/link_cw_p01_dbs2
5003e64c 4   4   256      250000   49869             PO-   /database/link_cw_p01_ithdbs
 4 active, 2047 maximum

hostname: onstat -b

Informix Dynamic Server Version 7.30.UC5   -- On-Line -- Up 17 days 21:01:13 -- 429568 Kbytes

Buffers
address  userthread flgs pagenum  memaddr  nslots pgflgs xflgs owner    waitlist
 92 modified, 0 resident, 90000 total, 131072 hash buckets, 4096 buffer size

actual_size=((size-free)*4096)/1024

link_cw_p01_rootdbs=292mb
link_cw_p01_dbs1=325
link_cw_p01_ithdbs=801
link_cw_p01_cw_dbs2=364
# 2  
Old 09-01-2001
No bet

Optimus,

I am not sure myself but I would not bet on 4096 as 'block size' for the chunks. Are you not using LVM where you could e.g. use lvdisplay (HP-UX) to determine the size of a logical volume? From there you could possibly make a link to the chunk sizes etc.
# 3  
Old 09-04-2001
i beleave i understand yourstatement. I already have the size of the Logical Volume. I am trying to find out the actual size of the db space used. that way i can reduce the lv size acordingly.

the 4096 from what i was told is the size of each page in bytes. the colume for size and free are in pages. this is where i was getting my math from to figure out how big the actual dbspace is.
# 4  
Old 09-07-2001
Hi Optimus,

I think, that it is not good idea to find solution in UNIX side, you can find SQL script for this:

database sysmaster;
select sum(nptotal) npt, sum(npused) npu
,dbsname dbn
from sysptnhdr h, sysptprof p
where h.partnum = p.partnum
-- and dbsname = "ert_refv211c"
and dbsname not like "sys%"
and dbsname not like "tmp%"
group by dbsname
into temp x;
select
npt,npu,dbn[1,9],
round (npt*2/1024,2) mb_total,
round (npu*2/1024,2) mb_used
from x;
select round(sum(npt)*2/1024,2) mbt, round(sum(npu)*2/1024) mb_u from x;
drop table x;

Sincerely,
nailk
# 5  
Old 09-07-2001
Optimus,

Your method is mostly correct, but I am not sure about your math!

acutal_size = free * 4096 = bytes

/ 1024 = Kbytes
/ 1024 = Mbytes
/ 1024 = GBytes.

Thats makes the total size of a chunk at 0.9gb

Free:

692mb
944mb
621mb
194mb

Do these numbers seem familiar? Plug them into a spread sheet for more accurate results.

Plus, be very careful when changing the disk allocations of logical volumes underneath Informix' nose. If you screw up, Informix won't like it and a level 0 archive/restore might not cut it either. Do a dbexport to disk or tape. It may take a while, and the restoration, with dbimport, may be a bit trickier with large tables. The benefit would be that the format (dbschema + unload files) is simple and does not rely on the underlying instance configuration on being exactly the same.

MBB.



# 6  
Old 09-07-2001
thank you all for your suggestions. i am reading up on informix databases befor i actually do anything. In the end i might not have to reorginize anything.

Previous Thread | Next Thread
Test Your Knowledge in Computers #364
Difficulty: Medium
vi first appeared in 1BSD.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with change significant figure to normal figure command

Hi, Below is my input file: Long list of significant figure 1.757E-4 7.51E-3 5.634E-5 . . . Desired output file: 0.0001757 0.00751 0.00005634 . . . (10 Replies)
Discussion started by: perl_beginner
10 Replies

2. UNIX for Dummies Questions & Answers

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... (4 Replies)
Discussion started by: jnrpeardba
4 Replies

3. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: jnrpeardba
2 Replies

4. UNIX for Dummies Questions & Answers

Debian - Connect To Informix Database

Can anyone point me toward information on setting up a Debian server ODBC connection to an Informix server? I have a Windows server set up with the Informix drivers in ODBC and I'd like to do the same thing on Debian so that my Rails apps can query the database beneath our call-logging software. ... (1 Reply)
Discussion started by: badmoon75
1 Replies

5. HP-UX

how to identify the size of a informix db(in kb/mb)?

I just used the dbsize command to find the size, but i guess, it doesn't gets me what i look for. (0 Replies)
Discussion started by: dvah
0 Replies

6. UNIX and Linux Applications

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.................. (1 Reply)
Discussion started by: asalman.qazi
1 Replies

7. HP-UX

know the size of database

Hi all , How to know the size of a oracle database running in hp-ux server. (1 Reply)
Discussion started by: megh
1 Replies

8. Shell Programming and Scripting

unix command to find the version of Informix database

Hi All Please let me know if there is command to check the version of the informix database installed..? Thanks in advance. Suresh (4 Replies)
Discussion started by: sureshg_sampat
4 Replies

9. Solaris

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 .... (6 Replies)
Discussion started by: ppass
6 Replies

10. UNIX for Dummies Questions & Answers

accessing the informix database

How do I access Informix from unix? It's been about 2 years since I've last used unix and I've forgotten the command. (2 Replies)
Discussion started by: pbouknight
2 Replies

Featured Tech Videos