[Crash-utility] extension module: crash-extscript

Dave Anderson anderson at redhat.com
Mon Mar 3 16:27:12 UTC 2014



----- Original Message -----
> Hi Dave,
> 
> I have uploaded an extension module named extscript to github
> Link: https://github.com/vinayakmenon/crash-extscript
> 
> Will it be possible to advertise it on crash utility extension page ?

Hi Vinayak,

I would be happy to add this to the extensions page.

Because of its unique capabilities, I think that it would be
worth creating its its own section on that page, similar to those
that exist for crashdc, eppic, and python scripts.  

If you prefer, you could take a snapshot of http://people.redhat.com/anderson/extensions.html 
and create the new section at the bottom?  That way you can put as much
data there as you'd like -- for that matter you could include the whole
README file contents.   Otherwise you can leave it to me to try to put
together a coherent description.  Let me know.

Thanks,
  Dave


> >From the readme of the project:
> 
> Extension module for crash utility, to talk to external scripts
> 
> What is extscript utility for ? At times we need to execute a series
> of crash commands to arrive at a result. i.e. we execute a command,
> get the output, pick an element from it, use it with the next command
> and so on. There are cases when this may take several steps. This
> utility is to automate these steps. Another use can be to execute a
> series of predefined crash commands, parse it to get relevant info and
> to generate a bug report.
> 
> A brief on the components in this package. (1) A crash utility
> extension called 'extscript'. This provides a crash command of the
> same name. (2) A script. perlfc.pl is an example script, which can
> talk to extscript extension. This script can be used as an example to
> write utilities that can talk to extscript extension. (3) A protocol
> definition, for communication between 'extscript' and the external
> script.
> 
> The external script is run as a server by crash utility, when you
> invoke the extscript command. The external script serves the crash
> utility by additonal commands. The script is not executed as is. We
> invoke the script from crash command line. In other words, we talk to
> the script from within the crash utility command line.
> 
> An example. (1) Copy the extscript.c to extensions folder (2) make
> extensions (3) Copy perlfc.pl to crash directory.
> 
> crash> extend extensions/extscript.so
> crash> extscript -f perl -a perl -a ./perlfc.pl
> crash> extscript -b vmallocinfo
> crash> extscript -b help
> 
> The first command loads the extscript module and adds the command
> "extscript" to crash utility. The second command sets up the
> environement. This is similar to how we pass arguments to execlp. The
> last argument is the script path. This command has to be modified
> depending on the kind of script that we are running. The third command
> is the bypass command which actually executes the command we have
> encoded in the script. In this case "vmallocinfo" is a command that is
> defined in perlfc.pl. The extecript bypasses this command to the
> script. The output in this case will be vmallocinfo similar
> /proc/vmallocinfo, displayed on crash console. Thus in simple words we
> are extending crash with additoinal commands encoded in a script. The
> "help" command shows all the commands supported by the script and its
> usage.
> 
> See project page in github for more info.
> 
> Thanks,
> Vinayak
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list