FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 03-07-2012, 02:57 PM
Lei Wen
 
Default How to use scripts in crash?

Hi Dave,

Do you have some guide doc that describe how to use the scripts in crash?
Like the example, I want to print out current filesystems registered.
I then need do following
1. using "p" to get "file_systems" symbol value
2. using "list" with command as "list -o file_system_type.next -s file_system_type.name,fs_flags <the file_systems symbol value>"

So if the previous file_systems symbol value could be stored, and then I don't need to copy the "p" result to "list" command by hand, but could let script do such kind of thing.

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?

Thanks,
Lei

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 03-07-2012, 03:08 PM
Dave Anderson
 
Default How to use scripts in crash?

----- Original Message -----
> Hi Dave,
>
> Do you have some guide doc that describe how to use the scripts in
> crash?
> Like the example, I want to print out current filesystems registered.
> I then need do following
> 1. using "p" to get "file_systems" symbol value
> 2. using "list" with command as "list -o file_system_type.next -s
> file_system_type.name,fs_flags <the file_systems symbol value>"
>
> So if the previous file_systems symbol value could be stored, and
> then I don't need to copy the "p" result to "list" command by hand,
> but could let script do such kind of thing.
>
> 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?
>
> Thanks,
> Lei

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.

Dave

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 03-07-2012, 03:25 PM
Bruce Korb
 
Default How to use scripts in crash?

On Wed, Mar 7, 2012 at 8:08 AM, Dave Anderson <anderson@redhat.com> 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?
>>
>> Thanks,
>> Lei
>
> 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
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 07:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org