Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Question: how to list which chunks belong to which dbspace when there are ~200 chunks and ~20 dbspaces, without repeated onstat -d greps. Answers: onstat -d's second section (chunks) includes the dbspace number, which maps back to the dbspace list in the first section; alternatively query sysmaster, joining sysdbspaces and syschunks on dbsnum to show dbspace name plus chunk path/size/free. The poster confirmed the sysmaster join worked and posted his final query (filtering on a given dbspace name and unloading the results).
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Hi All,
Is there any way i can check (using onstat) which chunk is associated to a
dbspace? I have around 200 chunks currently configured and around 20 dbspaces.
I did "onstat -d |grep rootdbs0000" and then, get the number column on the
below columns...
Dbspaces
address number flags fchunk nchunks flags owner name
4910e7d8 1 0x20001 1 1 N informix rootdbs0000
49237c08 2 0x20001 2 1 N informix logdbs0000
From there, i will do again "onstat -d |grep "number of the dbspace", e.g. 1
or 2 for the example above.
I did try to use oncheck -pr but it's not helpful on the output i want.
Is there a single command?
onstat -d|grep ????
Hi,
"onstat -d" output has 2 sections, the first
lists the dbspaces, the second the chunks.
In the second section, the chunks listing,
there is a column that contains the dbspace
number. This correlates to the dbspace
number in the first section, the listing of
dbspaces. From there you find the dbspace
name also, if that is desired.
Regards, Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland Research & Development GmbH
Chairman of the Supervisory Board: Martin Jetter
Board of Management: Erich Baier
Corporate Seat: Boeblingen, Germany
Reg.-Gericht: Amtsgericht Stuttgart, HRB 243294
ids-bounces@iiug.org wrote on 10/28/2009 10:27:17 AM:
>
> Hi All,
>
> Is there any way i can check (using onstat) which chunk is associated to
a
> dbspace? I have around 200 chunks currently configured and around
> 20 dbspaces.
> I did "onstat -d |grep rootdbs0000" and then, get the number column on
the
> below columns...
>
> Dbspaces
> address number flags fchunk nchunks flags owner name
> 4910e7d8 1 0x20001 1 1 N informix rootdbs0000
> 49237c08 2 0x20001 2 1 N informix logdbs0000
>
> >From there, i will do again "onstat -d |grep "number of the
> dbspace", e.g. 1
> or 2 for the example above.
>
> I did try to use oncheck -pr but it's not helpful on the output i want.
>
> Is there a single command?
>
> onstat -d|grep ????>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Try the following sql on sysmaster :
(we integrated it in a report to format the output)
select
name,sysdbspaces.owner,fname,chksize,nfree,syschunks.dbsnum,chknum,offset,fchunk
from syschunks,sysdbspaces
where syschunks.dbsnum = sysdbspaces.dbsnum
order by dbsnum,fchunk,chknum,name
end
Best regards,
Jacques Lapeire
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of JACK PAPA
Sent: Wednesday, October 28, 2009 10:27 AM
To: ids@iiug.org
Subject: How to check which chunk is associated to a dbspac [17800]
Hi All,
Is there any way i can check (using onstat) which chunk is associated to a
dbspace? I have around 200 chunks currently configured and around 20 dbspaces.
I did "onstat -d |grep rootdbs0000" and then, get the number column on the
below columns...
Dbspaces
address number flags fchunk nchunks flags owner name
4910e7d8 1 0x20001 1 1 N informix rootdbs0000
49237c08 2 0x20001 2 1 N informix logdbs0000
>From there, i will do again "onstat -d |grep "number of the dbspace",
>e.g. 1
or 2 for the example above.
I did try to use oncheck -pr but it's not helpful on the output i want.
Is there a single command?
onstat -d|grep ????
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
How about a sysmaster query:
select name as dbspace, chkpath as chunk
from sysdbspaces sd, syschunks sc
where sd.dbsnum = sc.dbsnum
and sd.name = 'some_dbspace_name'
order by 1, 2
;
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Wed, Oct 28, 2009 at 5:27 AM, JACK PAPA <informix2009@gmail.com> wrote:
> Hi All,
>
> Is there any way i can check (using onstat) which chunk is associated to a
> dbspace? I have around 200 chunks currently configured and around 20
> dbspaces.
> I did "onstat -d |grep rootdbs0000" and then, get the number column on the
> below columns...
>
> Dbspaces
> address number flags fchunk nchunks flags owner name
> 4910e7d8 1 0x20001 1 1 N informix rootdbs0000
> 49237c08 2 0x20001 2 1 N informix logdbs0000
>
> >From there, i will do again "onstat -d |grep "number of the dbspace", e.g.
> 1
> or 2 for the example above.
>
> I did try to use oncheck -pr but it's not helpful on the output i want.
>
> Is there a single command?
>
> onstat -d|grep ????>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015174768a44c563e0477007b9a
Hi All,
thanks for your inputs... i did use the below select statement and it worked
perpectly.
database sysmaster;select DISTINCT (x.name),
x.dbsnum,
y.fname
from sysdbspaces x, syschunks y
where x.dbsnum = y.dbsnum
and name = 'rootdbs0000'; --- where 'rootdbs0000' is the DBspace name.
Thanks and regards,
Correction on earlier post...
database sysmaster;
unload to 'chunks.unl'select y.dbsnum,y.fname
from syschunks y
where y.dbsnum
in (select dbsnum from sysdbspaces where name = 'dbspacename');
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.