DDB OUTPUT

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DDB OUTPUT

Silvio Bandeira
How can I redirect the output of 'trace' and 'ps' in ddb to a file?

Thanks in advance.

--
Silvio Bandeira

Reply | Threaded
Open this post in threaded view
|

Re: DDB OUTPUT

Ted Unangst-2
On Wed, Feb 23, 2011 at 6:21 PM, Silvio Bandeira
<[hidden email]> wrote:
> How can I redirect the output of 'trace' and 'ps' in ddb to a file?

Attach a serial cable.

Reply | Threaded
Open this post in threaded view
|

Re: DDB OUTPUT

Nick Holland
In reply to this post by Silvio Bandeira
On 02/23/11 18:21, Silvio Bandeira wrote:
> How can I redirect the output of 'trace' and 'ps' in ddb to a file?
>
> Thanks in advance.
>

with 'vi' (or mg, or emacs).  yeah, not fun, I know, I know very vividly
and repeatedly, so I don't want to hear the complaints. :)

Think about what you ask, however.  The kernel just entered a state it
didn't want to be in, do you really trust it to write nicely, legibly
and between the lines on your file system?

The output of "trace" and "ps" is stored in the dmesg buffer.  In some
cases, if you get really lucky, the dmesg buffer is preserved after you
do a "boot reboot" at the ddb prompt, and when you do a "dmesg" after
the reboot, it's there for you.  While I have lots of machines that
preserve dmesg across boots, those machines usually don't seem to ever
panic, the ones that panic don't save the dmesg buffer. :(

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: DDB OUTPUT

Silvio Bandeira
so how to include those outputs when bug reporting?

On Wednesday, February 23, 2011, Nick Holland
<[hidden email]> wrote:

> On 02/23/11 18:21, Silvio Bandeira wrote:
>> How can I redirect the output of 'trace' and 'ps' in ddb to a file?
>>
>> Thanks in advance.
>>
>
> with 'vi' (or mg, or emacs).  yeah, not fun, I know, I know very vividly
> and repeatedly, so I don't want to hear the complaints. :)
>
> Think about what you ask, however.  The kernel just entered a state it
> didn't want to be in, do you really trust it to write nicely, legibly
> and between the lines on your file system?
>
> The output of "trace" and "ps" is stored in the dmesg buffer.  In some
> cases, if you get really lucky, the dmesg buffer is preserved after you
> do a "boot reboot" at the ddb prompt, and when you do a "dmesg" after
> the reboot, it's there for you.  While I have lots of machines that
> preserve dmesg across boots, those machines usually don't seem to ever
> panic, the ones that panic don't save the dmesg buffer. :(
>
> Nick.
>

--
Silvio Bandeira

Reply | Threaded
Open this post in threaded view
|

Re: DDB OUTPUT

Philip Guenther-5
On Feb 23, 2011, at 6:27 PM, Silvio Bandeira <[hidden email]>
wrote:
> so how to include those outputs when bug reporting?

I used to use a pen and paper, copying down the output, and then typing it in.
Cheap cell phone cameras mean it's usually easier to snap one or more photos
and type in the values from that, saving the writing...but don't expect people
to read your photos for you: pointing developers at photos will often result
in the report being ignored.


Philip Guenther

Reply | Threaded
Open this post in threaded view
|

Re: DDB OUTPUT

Bob Beck-4
On 23 February 2011 20:52, Philip Guenther <[hidden email]> wrote:
> On Feb 23, 2011, at 6:27 PM, Silvio Bandeira <[hidden email]>
> wrote:
>> so how to include those outputs when bug reporting?
>
> I used to use a pen and paper, copying down the output, and then typing it in.
> Cheap cell phone cameras mean it's usually easier to snap one or more photos
> and type in the values from that, saving the writing...but don't expect people
> to read your photos for you: pointing developers at photos will often result
> in the report being ignored.

However having a serial console hooked up works wonders..