about   news   features   install   document   tips   faq   download   link

Alicia TIPS


Contents
  1. Alicia general
  2. LDAS

Alicia

How do I stop my runaway LDAS?

You can use INT interrupt(CTRL-C) to stop your LDAS.

Initial command at starting

To execute some command at staring, modify /usr/bin/alicia written in perl.
The following is an example:

$alicia = new Alicia('crash');
$alicia->init();
print $alicia->pass_through('sys');
$alicia->run();

If you installed Alicia under default configuration, alicia is at /usr/bin/alicia on your system.

Change the prompt name

If you don't like the prompt name 'alicia', modify the program name /usr/bin/alicia to /usr/bin/your favorite name

How to find out what processes are using the most memory.

For example, using the external program..

alicia> ps | sort +7n;

Using LDAS..

sub psmem {
    my ($text, @pss, $header, @mps);
    $text = pass_through('ps');
    $text =~ s/>/ /g;
    @pss = split(/\n/, $text);
    $header = shift @pss;
    @mps = sort { (split(/\s+/,$a))[8]<=>(split(/\s+/,$b))[8]; } @pss;
    unshift (@mps, $header);
    return join("\n", @mps);
}
1;
Alter perl-like fashion of Alicia shell to bash-like fashion

Modify the ShellStyle tag in your config file from perl to bash

To wrap the other dump editing tool (e.g. Lcrash)

First of all, please refer to CRASH.pm in the directory where Alicia was installed. For example, to wrap 'lcrash', some functions CRASH.pm has must be implemented.

These functions are:


LDAS (Linux Dump Analysis Script)

Editing LDAS

Alicia allows you to use your favorite editor (e.g. vi or emacs) as follows:

alicia> !vi xxxx.ldas
Loading LDAS

To load a LDAS on Alicia, I recommend to use 'load' or 'reload' command if you want to use the LDAS on Alicia command line. Because 'load' command will make LDAS name completion available at next version.(2005-02-21)
If you make use of the LDAS on LDAS, you can use 'do' or 'require' function in Perl CORE module because LDAS is just perl subroutine.

Making LDAS have interactive

Handling STDIN..

while(1) {
    print STDOUT "YourPrompt> \n";
    $input = <STDIN>;
    chomp($input);
    'do something'; if ($input eq 'something');
}

Please refer 'ts.ldas' in /usr/share/ldas (or ldasDir="xxxxx" in alicia.conf).

Is there a LDAS guideline?

I don't have a guideline yet. It will be provided by me before long. However if only your LDAS follows the perl fashion and personal use only, you can create LDAS without the guideline.

I recommend to use 'package' function for namespace overlap.