pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brendan Duddridge <brendan@clickspace.com>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Recovery will take 10 hours
Date: Thu, 20 Apr 2006 19:05:57 -0600
Message-ID: <5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com> (raw)
In-Reply-To: <44482CAF.70309@fuzzy.cz>
References: <85A15B2E-F59C-4FEF-82D4-61F48ABDCDE5@clickspace.com>
	<29439.1145564220@sss.pgh.pa.us>
	<47C1F053-EC91-4AEB-9F0B-B538716145D6@clickspace.com>
	<105.1145567988@sss.pgh.pa.us>
	<53ACF10A-9240-420B-83AB-E4CBABD2AC56@clickspace.com>
	<44482CAF.70309@fuzzy.cz>

Hi Tomas,

Hmm... ktrace -p PID -c returns immediately without doing anything  
unless I've previously done a ktrace -p PID.

According to the man page for ktrace's -c flag:
   -c      Clear the trace points associated with the specified file  
or processes.

When I run ktrace on OS X Server 10.4.6 it returns to the console  
immediately, however the ktrace.out file gets larger and larger until  
I issue another ktrace command with the -c flag. It never sits  
waiting for keyboard input.


I haven't been able to find any way of generating the stats yet. The  
man page for ktrace or kdump doesn't mention anything about stats.


Thanks,


____________________________________________________________________
Brendan Duddridge | CTO | 403-277-5591 x24 |  brendan@clickspace.com

ClickSpace Interactive Inc.
Suite L100, 239 - 10th Ave. SE
Calgary, AB  T2G 0V9

http://www.clickspace.com

On Apr 20, 2006, at 6:51 PM, Tomas Vondra wrote:

>> So I tried ktrace -p PID and it created a really big file. I had  
>> to do
>> 'ktrace -p PID -c' to get it to stop.
>>
>> The ktrace.out file is read using kdump, but there's a lot of binary
>> data in there intermixed with some system calls.
>
> Yes, that's what (s|k)trace does - it attaches to the process, and
> prints out all the system calls, parameters, return values etc. That
> gives you "exact" overview of what's going on in the program, but it's
> a little bit confusing if you are not familiar with that and/or you're
> in a hurry.
>
> But Luke Lonergan offered a '-c' switch, which gives you a statistics
> of the used system calls. This way you can see number of calls for
> individual syscalls and time spent in them. That could give you a hint
> why the process is so slow (for example there can be an I/O bottleneck
> or something like that).
>
> Just do 'ktrace -p PID -c' for about 30 seconds, then 'Ctrl-C' and  
> post
> the output to this mailing list.
>
> t.v.
>





view thread (21+ messages)  latest in thread

Message-ID: <5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com>
Permalink:  ../5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com/
Also on:    postgresql.org/message-id/5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: brendan@clickspace.com, tv@fuzzy.cz
  Subject: Re: Recovery will take 10 hours
  In-Reply-To: <5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com>
  References: <85A15B2E-F59C-4FEF-82D4-61F48ABDCDE5@clickspace.com> <29439.1145564220@sss.pgh.pa.us> <47C1F053-EC91-4AEB-9F0B-B538716145D6@clickspace.com> <105.1145567988@sss.pgh.pa.us> <53ACF10A-9240-420B-83AB-E4CBABD2AC56@clickspace.com> <44482CAF.70309@fuzzy.cz> <5C372D71-D189-4AA7-A857-1C8FE42311AE@clickspace.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox