Re: Retrieve pointer value for scripting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> Hello,
> 
> We wish to call 'crash' with a script file to automate some basic
> command and output the result on a text file.
> 
> This works perfectly for basic commands such as bt, log, mod and so on,
> especially when no input data is required.
> 
> We try now to dump the kernel stack through a 'rd <@> <size>'.
> My problem is to "extract" this <@> and to "input" it in this 'rd' command.

You can dump the full kernel stack with "bt -r", although it does make
symbolic translations if possible.  Perhaps that doesn't satisfy your
requirements?

> 
> For the moment, I'm able to get the task_struct * with following command :
> ps | grep '>' | awk '{ print $5 };'
> 
>  From that, the pointer of the thread_info would be available through
> (task_struct *)->stack.

The "set" command, also available from "foreach", shows shows the thread_info
pointer, although if you run it through a script you would have to strip the
brackets from the display.  

> 
> But how to get all these together to finally ouptut a valid 'rd' command ?
> Meaby another way to get this kernel stack dump would exist ?
> 
> Any help would be appreciate.
> Regards,
> Patrick Agrain
> 
> --
> Crash-utility mailing list
> Crash-utility@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/crash-utility
> 

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux