Dave, i came across one of the Crash TODO list items about having
a scripting infrastructure in crash.

I was trying to evaluate the Alicia utility [mentioned in todo list].
Here are some of my observations about Alicia.

1] It is a wrapper on top of crash.
2] One can write perl based scripts to extract infromation from dumps.
3] It has a nice report generation functionality which presents
the data in text as well as html format.
4] Provides functions which could be used to read data from crash
dumps.
5] It is easy to use and effective too.

Attached here is a sample script which i tried using Alicia to display block and character devices. [ I know dev command already does this stuff .. but for the sake of trying out the Alicia i chose to write such a script ].
Also encountered few problems while trying out Alicia.
1] On PPC64 arch came across data type overflow problem while
executing the attached script.
2] On s390/s390x architecture class function provided by Alicia
seems broken. 3] Alicia is a wrapper on top of crash.

Other dump solutions [ lkcd ] has sial scripting which is c like
and very effective. Not sure how difficult it will be to implement
something like sial in crash.

Do you have any plans of having scripting infrastructure in crash ? If yes your thoughts on Alicia / sial / < any other stuff >

Regards
-Sachin


sub pdevices {
        my ($name, $value, $maxdev, $i);
        my (@chrdevlist, @sortedlist);

        $maxdev = 255;  # same as MAX_CHARDEV
        $value = get_addr 'chrdevs';
        @chrdevlist = get_mem $value,$maxdev;
        @sortedlist = sort @chrdevlist;

        print "Character devices:\n";
        for ($i=0; $i < $maxdev; $i++) {
                if ($sortedlist[$i] ne "0x00000000") {
                        $val = kernel($sortedlist[$i], 'char_device_struct', 
'name', 'char *' );
                        print "$i\t\t$val\n";
                };
        };              
}
1;
--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to