Saturday, 13 August 2016

How to create sosreport in alternate location RHEL/OL/CENTOS?

Following steps are applicable to RHEL/OL/CENTOS, widely other distros too have similar option.


  • Older release of sosreport i.e "sos-1.7-9.49.0.2.el5.src.rpm or earlier" doesn't have a inbuilt command line option to define a alternate location, so environmental variables were used.

           # env TMP=<alternate-path> sosreport        

  • sos-1.7-9.54.0.1.el5.src.rpm or later  versions has "--tmpdir" command line option to specify the alternate location.

           --Change log--
           2011-04-08 Bryn M. Reeves <bmr@redhat.com> - 1.7-9.52
          - Add support for --tmp-dir command line option Resolves: bz562283
           ---

          # sosreport --tmp-dir <alternate-path>
       
     

RHEL5/OL5/Centos5 - vi not working for non root user "vim: error while loading shared libraries: libgpm.so.1"

SYMPTOMS

 For non-root user "vi" editor will report errors with the shared library
 $vi test
 vim: error while loading shared libraries: libgpm.so.1: cannot open shared object file: No such file or directory

CAUSE

Shared library "libgpm.so.1" is required for the vim editor and the same is not found as per the ldd command:

#  ldd /usr/bin/vim
linux-vdso.so.1 => (0x00007fffd5ffd000)
libncurses.so.5 => /usr/lib64/libncurses.so.5 (0x0000003a71600000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003a60400000)
libacl.so.1 => /lib64/libacl.so.1 (0x0000003a5f000000)
libgpm.so.1 => not found                            <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
libperl.so => /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so (0x0000003a60800000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003a67000000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003a6c600000)
libc.so.6 => /lib64/libc.so.6 (0x0000003a5e800000)
libm.so.6 => /lib64/libm.so.6 (0x0000003a5ec00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003a5f400000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003a5f800000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x0000003a60000000)
/lib64/ld-linux-x86-64.so.2 (0x0000003a5e400000)
libattr.so.1 => /lib64/libattr.so.1 (0x0000003a63000000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x0000003a62c00000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003a71200000)