Unix Technical Forum

Process taking most of Logcal Log

This is a discussion on Process taking most of Logcal Log within the Informix forums, part of the Database Server Software category; --> Version: IDS 10 Is there a way to tell which process on the box is filling up the logs. ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 05:18 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Process taking most of Logcal Log

Version: IDS 10

Is there a way to tell which process on the box is filling up the
logs. I was thinking if there is a way to tell which process / thread
is writing the logical logs or filling up the logical logs

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 05:18 PM
Claus Samuelsen
 
Posts: n/a
Default Re: Process taking most of Logcal Log

mohitanchlia@gmail.com wrote:
> Version: IDS 10
>
> Is there a way to tell which process on the box is filling up the
> logs. I was thinking if there is a way to tell which process / thread
> is writing the logical logs or filling up the logical logs
>


It's the lio vp, except when the logical logs are placed in dbspaces on
raw devices - then it's cpu vp using kaio.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 05:18 PM
TBP (The Big Potato)
 
Posts: n/a
Default Re: Process taking most of Logcal Log

Claus Samuelsen wrote:
> mohitanchlia@gmail.com wrote:
>
>> Version: IDS 10
>>
>> Is there a way to tell which process on the box is filling up the
>> logs. I was thinking if there is a way to tell which process / thread
>> is writing the logical logs or filling up the logical logs
>>

>
> It's the lio vp, except when the logical logs are placed in dbspaces on
> raw devices - then it's cpu vp using kaio.


I think what the poster is asking is which session is filling up the logical logs, not what is actually writing to the logical logs.

onstat -g tpf will show the number of log records each thread has written :

> onstat -g tpf


IBM Informix Dynamic Server Version 10.00.FC6 -- On-Line -- Up 6 days 16:22:11 -- 179276 Kbytes

Thread profiles
tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq

So, do this a few times to see which thread is writing all the "lgrs" :

onstat -g tpf | sort -rnk 7 | head | awk '{print $1 " " $7}'

Once you know the thread, back track it to the session.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 05:19 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Re: Process taking most of Logcal Log

On Sep 6, 2:31 am, "TBP (The Big Potato)" <T...@NotHere.Co.Uk> wrote:
> Claus Samuelsen wrote:
> > mohitanch...@gmail.com wrote:

>
> >> Version: IDS 10

>
> >> Is there a way to tell which process on the box is filling up the
> >> logs. I was thinking if there is a way to tell which process / thread
> >> is writing the logical logs or filling up the logical logs

>
> > It's the lio vp, except when the logical logs are placed in dbspaces on
> > raw devices - then it's cpu vp using kaio.

>
> I think what the poster is asking is which session is filling up the logical logs, not what is actually writing to the logical logs.
>
> onstat -g tpf will show the number of log records each thread has written :
>
> > onstat -g tpf

>
> IBMInformixDynamic Server Version 10.00.FC6 -- On-Line -- Up 6 days 16:22:11 -- 179276 Kbytes
>
> Thread profiles
> tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq
>
> So, do this a few times to see which thread is writing all the "lgrs" :
>
> onstat -g tpf | sort -rnk 7 | head | awk '{print $1 " " $7}'
>
> Once you know the thread, back track it to the session.


Thanks this is what I was looking for. Is it possible to know the
thread that may no longer exist, but which could have written lot of
logs. Does informix preserve history of logical log records ?

I have another question, for which I think answer is "no", but I'll
still ask. Is there a way to tell for a given timeframe how many logs
were written and who was writing it.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 05:19 PM
Art S. Kagel
 
Posts: n/a
Default Re: Process taking most of Logcal Log

On Sep 9, 3:11 pm, mohitanch...@gmail.com wrote:
> On Sep 6, 2:31 am, "TBP (The Big Potato)" <T...@NotHere.Co.Uk> wrote:
>
>
>
> > Claus Samuelsen wrote:
> > > mohitanch...@gmail.com wrote:

>
> > >> Version: IDS 10

>
> > >> Is there a way to tell which process on the box is filling up the
> > >> logs. I was thinking if there is a way to tell which process / thread
> > >> is writing the logical logs or filling up the logical logs

>
> > > It's the lio vp, except when the logical logs are placed in dbspaces on
> > > raw devices - then it's cpu vp using kaio.

>
> > I think what the poster is asking is which session is filling up the logical logs, not what is actually writing to the logical logs.

>
> > onstat -g tpf will show the number of log records each thread has written :

>
> > > onstat -g tpf

>
> > IBMInformixDynamic Server Version 10.00.FC6 -- On-Line -- Up 6 days 16:22:11 -- 179276 Kbytes

>
> > Thread profiles
> > tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq

>
> > So, do this a few times to see which thread is writing all the "lgrs" :

>
> > onstat -g tpf | sort -rnk 7 | head | awk '{print $1 " " $7}'

>
> > Once you know the thread, back track it to the session.

>
> Thanks this is what I was looking for. Is it possible to know the
> thread that may no longer exist, but which could have written lot of
> logs. Does informix preserve history of logical log records ?
>
> I have another question, for which I think answer is "no", but I'll
> still ask. Is there a way to tell for a given timeframe how many logs
> were written and who was writing it.


Logical logs still on disk are reported by onstat -l and can be viewed
using onlog (viewing the 'current' log will suspend activity that
needs to update the log so be careful). Once logs are no longer
needed (ie they have no more open transactions in them and have been
archived, they are eligible to be reused. IDS cycles through the
logical logs in order, when it hits the last one it reuses the first
one if that's available and so on. You can use onlog to view logical
logs archived using onbar or ontape -a or -c directly from the tape/
disk archive. If you are only archiving logs as part of the system
archive and are discarding them after use (by setting LTAPEDEV to /dev/
null) then you can only view those logs saved by an archive and only
be restoreing the archive to disk somewhere.

Art S. Kagel

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 05:19 PM
scottishpoet
 
Posts: n/a
Default Re: Process taking most of Logcal Log


> I have another question, for which I think answer is "no", but I'll
> still ask. Is there a way to tell for a given timeframe how many logs
> were written and who was writing it


The administartion file, "online.log" or whatever you chose to call
it, will have an entry in it with a timestamp every time alogical log
is complete

eg

14:41:12 Logical Log 29128 Complete, timestamp: 0x56b314f9.

14:41:37 Logical Log 29129 Complete, timestamp: 0x56b4c52f.

14:41:49 Logical Log 29130 Complete, timestamp: 0x56b5bc98.

So you can see how quickly the logs are filling up

you can then use onstat -l in the manner Art described to see who is
writing to them

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 05:20 PM
mohitanchlia@gmail.com
 
Posts: n/a
Default Re: Process taking most of Logcal Log

On Sep 10, 6:18 am, "Art S. Kagel" <art.ka...@gmail.com> wrote:
> On Sep 9, 3:11 pm, mohitanch...@gmail.com wrote:
>
>
>
> > On Sep 6, 2:31 am, "TBP (The Big Potato)" <T...@NotHere.Co.Uk> wrote:

>
> > > Claus Samuelsen wrote:
> > > > mohitanch...@gmail.com wrote:

>
> > > >> Version: IDS 10

>
> > > >> Is there a way to tell which process on the box is filling up the
> > > >> logs. I was thinking if there is a way to tell which process / thread
> > > >> is writing the logical logs or filling up the logical logs

>
> > > > It's the lio vp, except when the logical logs are placed in dbspaces on
> > > > raw devices - then it's cpu vp using kaio.

>
> > > I think what the poster is asking is which session is filling up the logical logs, not what is actually writing to the logical logs.

>
> > > onstat -g tpf will show the number of log records each thread has written :

>
> > > > onstat -g tpf

>
> > > IBMInformixDynamic Server Version 10.00.FC6 -- On-Line -- Up 6 days 16:22:11 -- 179276 Kbytes

>
> > > Thread profiles
> > > tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus lsmx seq

>
> > > So, do this a few times to see which thread is writing all the "lgrs" :

>
> > > onstat -g tpf | sort -rnk 7 | head | awk '{print $1 " " $7}'

>
> > > Once you know the thread, back track it to the session.

>
> > Thanks this is what I was looking for. Is it possible to know the
> > thread that may no longer exist, but which could have written lot of
> > logs. Doesinformixpreserve history of logical log records ?

>
> > I have another question, for which I think answer is "no", but I'll
> > still ask. Is there a way to tell for a given timeframe how many logs
> > were written and who was writing it.

>
> Logical logs still on disk are reported by onstat -l and can be viewed
> using onlog (viewing the 'current' log will suspend activity that
> needs to update the log so be careful). Once logs are no longer
> needed (ie they have no more open transactions in them and have been
> archived, they are eligible to be reused. IDS cycles through the
> logical logs in order, when it hits the last one it reuses the first
> one if that's available and so on. You can use onlog to view logical
> logs archived using onbar or ontape -a or -c directly from the tape/
> disk archive. If you are only archiving logs as part of the system
> archive and are discarding them after use (by setting LTAPEDEV to /dev/
> null) then you can only view those logs saved by an archive and only
> be restoreing the archive to disk somewhere.
>
> Art S. Kagel


onlog commands give different information about COMMIT, DELETE etc.
with the transaction id. Is there a way to tell on which tables these
transactions are working on or something which gives more information
about the data in logical log. I was thinking that onlog would show
the data in the logical log, may be it does and I am just not aware
of displaying the data in logical log. I was thinking something that
tells me what data got deleted or inserted and which table was
affected.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-20-2008, 05:20 PM
Claus Samuelsen
 
Posts: n/a
Default Re: Process taking most of Logcal Log

mohitanchlia@gmail.com wrote:
>
> onlog commands give different information about COMMIT, DELETE etc.
> with the transaction id. Is there a way to tell on which tables these
> transactions are working on or something which gives more information
> about the data in logical log. I was thinking that onlog would show
> the data in the logical log, may be it does and I am just not aware
> of displaying the data in logical log. I was thinking something that
> tells me what data got deleted or inserted and which table was
> affected.


Output from onlog:

2ec044 76 HINSERT 6 0 2ec018 20004c 135 17

Column 7 (20004c) is the table's partnumber (in decimal: 2097228). You
can use the decimal value to find the table in the systables catalog table.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-20-2008, 05:20 PM
Richard Harnden
 
Posts: n/a
Default Re: Process taking most of Logcal Log

Claus Samuelsen wrote:
> mohitanchlia@gmail.com wrote:
>>
>> onlog commands give different information about COMMIT, DELETE etc.
>> with the transaction id. Is there a way to tell on which tables these
>> transactions are working on or something which gives more information
>> about the data in logical log. I was thinking that onlog would show
>> the data in the logical log, may be it does and I am just not aware
>> of displaying the data in logical log. I was thinking something that
>> tells me what data got deleted or inserted and which table was
>> affected.

>
> Output from onlog:
>
> 2ec044 76 HINSERT 6 0 2ec018 20004c 135 17
>
> Column 7 (20004c) is the table's partnumber (in decimal: 2097228). You
> can use the decimal value to find the table in the systables catalog table.


No need to convert to decimal:

where partnum = "0x20004c"

.... will work fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com