1 Reply Latest reply on Aug 22, 2014 10:17 AM by Joe Piotrowski

    RSCD agent not stopping properly in SLES11 SP3

    Javier Prieto Sabugo

      Hello all,

       

      My customer environment is running BSA 8.5

      I have been asked for problems when closing the RSCD agent in customer SLES system.

      When trying to stop the daemon, the script returns some error messages, and does not close the processes:

       

      SLES11:/ # /etc/init.d/rscd stop

      Stopping Remote System Call Daemon (RSCD) ...

      dirname: extra operand `17K'

      Try `dirname --help' for more information.

      dirname: missing operand

      Try `dirname --help' for more information.

      dirname: extra operand `17K'

      Try `dirname --help' for more information.

      dirname: missing operand

      […]

       

      CAUSE:

      After digging a bit, I found out that is a problem in the way the script reads the output when invoking ‘pmap’ when trying to retrieve the rscd_full [application] location, it retrieves the 4th parameter back, what works for example with RHEL6

       

      [root@RHEL2 ~]# pmap 2527 | grep rscd_full

      0000000000400000   1604K r-x-- /opt/bmc/bladelogic/NSH/bin/rscd_full

      But not for SLES11 SP3

      SLES11:/ # pmap 7169 | grep rscd_full

      0000000000400000   1604K 136K     54K 0K      0K r-xp /opt/bmc/bladelogic/NSH/bin/rscd_full

      0000000000690000     28K 28K     17K     24K 0K rw-p /opt/bmc/bladelogic/NSH/bin/rscd_full

       

      The root cause is the pmap version packed in both releases, that provide the output in a different format

       

      SLES11:/ # pmap -V

      procps version 3.2.7

      SLES11:/ # cat /etc/SuSE-release

      SUSE Linux Enterprise Server 11 (x86_64)

      VERSION = 11

      PATCHLEVEL = 3

       

      [root@RHEL2 ~]# pmap -V

      pmap (procps version 3.2.8)

      [root@RHEL2 ~]# cat /etc/*release

      Red Hat Enterprise Linux Server release 6.0 (Santiago)

       

      WORKAROUND:

      In SLES system, modify the “/etc/init.d/rscd” script, when invoking pmap, to take the 8th argument instead the 4th

       

      pmap $i | grep rscd_full | awk ' { print $8 } ' | uniq

       

      instead of

       

      pmap $i | grep rscd_full | awk ' { print $4 } ' | uniq