RE: How to tell size of database?
Posted in 2004
Topics: General Discussion
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3DF5D.B3C3EBE0 Content-Type: text/plain; charset="iso-8859-1" I'm sure there's a bunch of scripts on the iiug website to calculate the size. Here's a little script I use to calculate the size in Kbytes. Brian Minnick bminnick@belletire.com Database Administrator Belle Tire Distributors ############################################################################ #### # onsize - Calcualte the total size of an Informix-Online instance # in Kbytes. # ############################################################################ #### $INFORMIXDIR/bin/onstat -d | grep PO | grep -v bpages | sort +2 -3 -n |awk '{printf("%s%s\\t%s%s\\t%s%s\\t%s%.2f \\n", " Online Size=", totsz+=$5*2, "Free=", totfree+=$6*2, "Used=", totused+=($5-$6)*2,"Full=", totpcnt=((totused/totsz)*100))}'>/tmp/tmp1; grep -n Size= /tmp/tmp1>/tmp/tmp2; tail -1 /tmp/tmp2 | awk '{printf("%s %s %s %s %s\\n", $2, $3"K", $4"K", $5"K", $6"%")}'; rm /tmp/tmp1 /tmp/tmp2 -----Original Message----- From: henri.straforelli@customerworks.net [mailto:henri.straforelli@customerworks.net] Sent: Monday, January 19, 2004 7:02 PM To: informix-list@iiug.org Subject: How to tell size of database? Is there an "easy" way to find out what is the total size of an informix database in gigabytes? Thanks! ------_=_NextPart_001_01C3DF5D.B3C3EBE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2654.45"> <TITLE>RE: How to tell size of database?</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>I'm sure there's a bunch of scripts on the iiug = website to calculate the size.</FONT> <BR><FONT SIZE=3D2>Here's a little script I use to calculate the size = in Kbytes.</FONT> </P> <P><FONT SIZE=3D2>Brian Minnick</FONT> <BR><FONT SIZE=3D2>bminnick@belletire.com</FONT> <BR><FONT SIZE=3D2>Database Administrator</FONT> <BR><FONT SIZE=3D2>Belle Tire Distributors</FONT> </P> <BR> <P><FONT = SIZE=3D2>###############################################################= #################</FONT> <BR><FONT SIZE=3D2># onsize - = Calcualte the total size of an Informix-Online instance</FONT> <BR><FONT = SIZE=3D2># &n= bsp; in Kbytes.</FONT> <BR><FONT SIZE=3D2># </FONT> <BR><FONT = SIZE=3D2>###############################################################= #################</FONT> <BR><FONT SIZE=3D2>$INFORMIXDIR/bin/onstat -d | grep PO | grep -v = bpages | sort +2 -3 -n |awk '{printf("%s%s\\t%s%s\\t%s%s\\t%s%.2f = \\n", " Online Size=3D", totsz+=3D$5*2, = "Free=3D", totfree+=3D$6*2, "Used=3D", = totused+=3D($5-$6)*2,"Full=3D", = totpcnt=3D((totused/totsz)*100))}'>/tmp/tmp1;</FONT></P> <P><FONT SIZE=3D2>grep -n Size=3D /tmp/tmp1>/tmp/tmp2;</FONT> <BR><FONT SIZE=3D2>tail -1 /tmp/tmp2 | awk '{printf("%s = %s %s %s %s\\n", $2, = $3"K", $4"K", $5"K", = $6"%")}';</FONT> <BR><FONT SIZE=3D2>rm /tmp/tmp1 /tmp/tmp2</FONT> </P> <P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: henri.straforelli@customerworks.net</FONT> <BR><FONT SIZE=3D2>[<A = HREF=3D"mailto:henri.straforelli@customerworks.net">mailto:henri.strafor= elli@customerworks.net</A>]</FONT> <BR><FONT SIZE=3D2>Sent: Monday, January 19, 2004 7:02 PM</FONT> <BR><FONT SIZE=3D2>To: informix-list@iiug.org</FONT> <BR><FONT SIZE=3D2>Subject: How to tell size of database?</FONT> </P> <BR> <P><FONT SIZE=3D2>Is there an "easy" way to find out what is = the total size of an</FONT> <BR><FONT SIZE=3D2>informix database in gigabytes?</FONT> </P> <P><FONT SIZE=3D2>Thanks!</FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01C3DF5D.B3C3EBE0-- sending to informix-list
This script calculates the amount of space used in an instance. There may, of course, be multiple databases in the instance. Brian Minnick <BMinnick@belletire.com> wrote in message news:<bujcvl$4s7$1@terabinaries.xmission.com>... > This message is in MIME format. Since your mail reader does not understand > this format, some or all of this message may not be legible. > > ------_=_NextPart_001_01C3DF5D.B3C3EBE0 > Content-Type: text/plain; > charset="iso-8859-1" > > I'm sure there's a bunch of scripts on the iiug website to calculate the > size. > Here's a little script I use to calculate the size in Kbytes. > > Brian Minnick > bminnick@belletire.com > Database Administrator > Belle Tire Distributors > > > ############################################################################ > #### > # onsize - Calcualte the total size of an Informix-Online instance > # in Kbytes. > # > ############################################################################ > #### > $INFORMIXDIR/bin/onstat -d | grep PO | grep -v bpages | sort +2 -3 -n |awk > '{printf("%s%s\\t%s%s\\t%s%s\\t%s%.2f \\n", " Online Size=", totsz+=$5*2, > "Free=", totfree+=$6*2, "Used=", totused+=($5-$6)*2,"Full=", > totpcnt=((totused/totsz)*100))}'>/tmp/tmp1; > grep -n Size= /tmp/tmp1>/tmp/tmp2; > tail -1 /tmp/tmp2 | awk '{printf("%s %s %s %s %s\\n", $2, $3"K", $4"K", > $5"K", $6"%")}'; > rm /tmp/tmp1 /tmp/tmp2 > > -----Original Message----- > From: henri.straforelli@customerworks.net > [mailto:henri.straforelli@customerworks.net] > Sent: Monday, January 19, 2004 7:02 PM > To: informix-list@iiug.org > Subject: How to tell size of database? > > > Is there an "easy" way to find out what is the total size of an > informix database in gigabytes? > > Thanks! > > ------_=_NextPart_001_01C3DF5D.B3C3EBE0 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> > <HTML> > <HEAD> > <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = > charset=3Diso-8859-1"> > <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = > 5.5.2654.45"> > <TITLE>RE: How to tell size of database?</TITLE> > </HEAD> > <BODY> > > <P><FONT SIZE=3D2>I'm sure there's a bunch of scripts on the iiug = > website to calculate the size.</FONT> > <BR><FONT SIZE=3D2>Here's a little script I use to calculate the size = > in Kbytes.</FONT> > </P> > > <P><FONT SIZE=3D2>Brian Minnick</FONT> > <BR><FONT SIZE=3D2>bminnick@belletire.com</FONT> > <BR><FONT SIZE=3D2>Database Administrator</FONT> > <BR><FONT SIZE=3D2>Belle Tire Distributors</FONT> > </P> > <BR> > > <P><FONT = > SIZE=3D2>###############################################################= > #################</FONT> > <BR><FONT SIZE=3D2># onsize - = > Calcualte the total size of an Informix-Online instance</FONT> > <BR><FONT = > SIZE=3D2># &n= > bsp; in Kbytes.</FONT> > <BR><FONT SIZE=3D2># </FONT> > <BR><FONT = > SIZE=3D2>###############################################################= > #################</FONT> > <BR><FONT SIZE=3D2>$INFORMIXDIR/bin/onstat -d | grep PO | grep -v = > bpages | sort +2 -3 -n |awk '{printf("%s%s\\t%s%s\\t%s%s\\t%s%.2f = > \\n", " Online Size=3D", totsz+=3D$5*2, = > "Free=3D", totfree+=3D$6*2, "Used=3D", = > totused+=3D($5-$6)*2,"Full=3D", = > totpcnt=3D((totused/totsz)*100))}'>/tmp/tmp1;</FONT></P> > > <P><FONT SIZE=3D2>grep -n Size=3D /tmp/tmp1>/tmp/tmp2;</FONT> > <BR><FONT SIZE=3D2>tail -1 /tmp/tmp2 | awk '{printf("%s = > %s %s %s %s\\n", $2, = > $3"K", $4"K", $5"K", = > $6"%")}';</FONT> > <BR><FONT SIZE=3D2>rm /tmp/tmp1 /tmp/tmp2</FONT> > </P> > > <P><FONT SIZE=3D2>-----Original Message-----</FONT> > <BR><FONT SIZE=3D2>From: henri.straforelli@customerworks.net</FONT> > <BR><FONT SIZE=3D2>[<A = > HREF=3D"mailto:henri.straforelli@customerworks.net">mailto:henri.strafor= > elli@customerworks.net</A>]</FONT> > <BR><FONT SIZE=3D2>Sent: Monday, January 19, 2004 7:02 PM</FONT> > <BR><FONT SIZE=3D2>To: informix-list@iiug.org</FONT> > <BR><FONT SIZE=3D2>Subject: How to tell size of database?</FONT> > </P> > <BR> > > <P><FONT SIZE=3D2>Is there an "easy" way to find out what is = > the total size of an</FONT> > <BR><FONT SIZE=3D2>informix database in gigabytes?</FONT> > </P> > > <P><FONT SIZE=3D2>Thanks!</FONT> > </P> > > </BODY> > </HTML> > ------_=_NextPart_001_01C3DF5D.B3C3EBE0-- > sending to informix-list
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- ontape -p/r with changed ROOTPATH
- Migrate from HP PA-RISC to HP ITANIUM by ontape