How to use scripts in crash?
On Wed, Mar 7, 2012 at 8:08 AM, Dave Anderson <firstname.lastname@example.org> wrote:
>> I also notice there is "sial" script support in crash, but that is
>> too complex for me... I don't know how to start a basic usage with
>> that... Is there any detailed doc that could help me from a start?
> I can't help you with sial usage, but there is a ~1000-page README
> file in crash-6.0.4/extensions/libsial. *And perhaps the sample
> ps.c and files.c sial scripts from the crash extensions page could
> be used as templates for your requirements.
There's also pykdump, if you don't mind python. It is rigged up to be
able to call back into crash, which sial is not. It also has better facilities
for coping with compile time structure variations. So if you need to learn
a new language anyway (sial being a new language as it is not C),
it may as well be python.
Alternatively, you can also write shell scripts that emit crash commands
into a file that, when sourced, does a bunch of crash commands before
re-invoking itself. I finally did that since there is no provision for scripts
to feed commands back to crash directly. It works. It's tricky. Attached
is an example that will do approximate "bt"s on threads that were caught
"on proc" at the time of a crash. It's my template.
Cheers - Bruce
Crash-utility mailing list