Giter VIP home page Giter VIP logo

pcore's Introduction

pcore

core-analysis-aid tool for support engineers working on RHEL/Fedora platform

Background

To analyse a user space core, you need shared libraries linked with the core. Especially if you are a support engineer, you have to have a setup exactly same as your customer's environment gathering up libraries to analyse the customer's core on your own setup. For this purpose, most of you would have to install OS (which is a little bit older than a customer's), find and install relevant versions of relevant packages reviewing sos-report, install them, and optionally download and apply relevant debuginfo.

What it is

pcore creates tiny helper scripts to provide cross platform analysis environment easily, gathers up an executable, its core, and all of its linked shared libraries to fake up the customer's environment, and packages them into single tar.bz2 file. You don't need a painful task to set up an environment any longer.

How to build

Simply type

    $ make

Then, you get pcore.zip which includes pcore script.

Prerequisites

  • pcore is written in python.
  • pcore uses gdb to find libraries linked in a core. If gdb is not found, pcore uses ldd instead. ldd can find shared libraries which is explicitly specified in program header table in ELF objects, but can not take care of dynamic loading of shared libraries like Apache httpd modules. Therefore, pcore may be unable to find all of libraries.
  • requires elfutils package.

How to use

  1. Send pcore.zip to your customer and ask him/her to run pcore as root and send pcore-${timestamp}.tar.bz2 to you

     # unzip pcore.zip
     # cd pcore
     # ./pcore [-options]
    
  2. Download and untar pcore-${timestamp}.tar.bz2 on a working directory on your setup.

     # tar jxvf pcore-${timestamp}.tar.bz2
    
  3. (optional) Run getdebuginfo script. Debuginfo files are stored in the current directory. Note that it works on only a platform same as your customer's platform.

     # cd pcore-${timestamp}
     # ./getdebuginfo
    
  4. Run opencore.sh script. It attaches gdb on a core faking up the customer's environment. It works on Fedora 19/20, RHEL 6.x, and RHEL 5.x regardless the customer's platform.

     # ./opencore.sh
    

Options

-h, --help                        show help
-e <execfile>, --exec=<execfile>  set exec file's path name
-c <corefile>, --core <corefile>  set core file's path name
-n, --no-core                     do not include a core in tar.bz2
--httpd                           assume a core is of httpd bundled in RHEL and give a hint to pcore to gather up dynamically loaded shared libraries.
--ews-httpd=<ews install root>    assume a core is of httpd of EWS and give a hint to pcore to gather up dynamically loaded shared libraries.

Examples

Commonly use for httpd core:

    # ./pcore -c /path/to/core -e /usr/sbin/httpd

If you do not need a core file in pcore-${timestamp}.tar.bz2:

    # ./pcore -n -c /path/to/core -e /usr/sbin/httpd

If a core is of httpd bundled in RHEL and gdb is not installed on the customer's server, ask him/her to run:

    # ./pcore -c /path/to/core -e /usr/sbin/httpd --httpd

If a core is of httpd of EWS and gdb is not installed on the customer's server, ask him/her to run:

    # ./pcore -c /path/to/core -e /opt/jboss-ews-2.0/httpd/sbin/httpd --ews-httpd=/opt/jboss-ews-2.0

Author

Hisanobu Okuda [email protected]

pcore's People

Contributors

hokuda avatar msfm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.