Friday, 8 May 2020

Touch test in Linux, for identifying Read only file systems and poor performance mount points

#!/bin/bash

# Usage: touch-test
# Touches and deletes a file on each of the locally mounted file systems. 
# This can help point out read-only mounts and poorly performing mounts.

# Run as root
[ "$EUID" -eq 0 ] || {
  echo 'Please run with sudo or as root.'
  exit 1
}

TEST_FILE='touch-test-file'

START=$(date)
START_SECONDS=$(date +%s)

for MOUNT in $(df -lP | egrep -v '^Filesystem|tmpfs' | awk '{print $NF}')
do
  TEST_FILE_ON_MOUNT="${MOUNT}/${TEST_FILE}"
  echo "$(date) - Touching $TEST_FILE_ON_MOUNT"
  touch $TEST_FILE_ON_MOUNT
  rm $TEST_FILE_ON_MOUNT
  echo "$(date) - Removed $TEST_FILE_ON_MOUNT"
done

END=$(date)
END_SECONDS=$(date +%s)
TOTAL_SECONDS=$(($END_SECONDS - $START_SECONDS))

echo
echo "Start: $START"
echo "End:   $END"
echo "Total: $TOTAL_SECONDS seconds"

Linux script for show-total-disk-space-used

#!/bin/bash

# Usage: show-total-disk-space-used
# Shows how much local disk space is in use by the server.

function round() {
  # Returns a rounded number
  local INTEGER=$(echo $1 | cut -f1 -d.)
  [ -z "$INTEGER" ] && INTEGER=0

  local DECIMAL=$(echo $1 | cut -s -f2 -d.)
  [ -z "$DECIMAL" ] && DECIMAL=0
  [ "$DECIMAL" -gt 4 ] && INTEGER=$(($INTEGER + 1))
  echo $INTEGER
}

# Disk size used in kb, summed
KB=$(df -lkP | awk '{print $3}' | grep -v Used | awk '{sum+=$1} END{printf("%d\n",sum)}')

# Convert size to MB, GB, and TB
MB=$(round $(echo $KB/1024           | bc -l | sed -e "s/\(\.[0-9]\).*/\1/g"))
GB=$(round $(echo $KB/1024/1024      | bc -l | sed -e "s/\(\.[0-9]\).*/\1/g"))
TB=$(round $(echo $KB/1024/1024/1024 | bc -l | sed -e "s/\(\.[0-9]\).*/\1/g"))

# Use the largest human readable size to display
if [ "$TB" -gt 0 ]
then
  TOTAL_DISK_SPACE_USED="${TB}T"
elif [ "$GB" -gt 0 ]
then
  TOTAL_DISK_SPACE_USED="${GB}G"
elif [ "$MB" -gt 0 ]
then
  TOTAL_DISK_SPACE_USED="${MB}M"
else
  TOTAL_DISK_SPACE_USED="${KB}K"
fi

echo -e "$(uname -n)\t${TOTAL_DISK_SPACE_USED}"

Wednesday, 6 May 2020

2679373 - SWPM SYB: unable to set up backup server

Symptom

Error reported by SAP Installer is similar to the following:
Assertion failed: Unable to set up backup server. Refer to trace file sapinst_dev.log for further information.

Other Terms

ASE, backup server

Reason and Prerequisites

You are trying to install an SAP System based on ASE release 16.0 SP03 PL04 on the AIX platform. The host is configured to use virtual host names.
The SAP installer presents the message "Unable to set up backup server" and the installer's trace file sapinst_dev.log includes entries like:

Building Backup Server '<SID>_BS':
Writing entry into directory services...
Directory services entry complete.
Writing RUN_<SID>_BS file...
RUN_POP_BS file complete.
Starting server...
Unable to boot server '<SID>_BS'.  
Task failed
Server '<SID>_BS' was not created.

The corresponding backup server log file /sybase/<SID>/ASE-16_0/install/<SID>_BS.log includes traces like:

Started listener at tcp <IP ADDRESS 1> 4902
Backup Server: 2.24.2.1: The host '<IP ADDRESS 2>' is not authorized to connect to this Backup Server.
Backup Server: 5.40.2.1: Login host authentication has failed.

The root cause of the issue is that backup server does not recognize that IP ADDRESS 1 and IP ADDRESS 2 are the same host and requires a "remote host configuration". Further information about the topic can be found in the ASE documentation in the chapter "Remote Dump Host Control".

Solution

Create text file /sybase/<SID>/hosts.allow with the IP addresses from the backup server log with the following line:

<IP ADDRESS 1> <IP ADDRESS 2>

Set the file ownership to syb<sid>:sapsys with permission 640.
Terminate the running backup server with the OS command 'kill'.
Press the 'retry' button in the SAP installer dialog screen.

Saturday, 2 May 2020

ST22 - ABAP dumps

ST22 - ABAP Dump Analysis

References for few real time issue and their solutions:

          



  • Import_buffer error in ST22:                                                                                                                          issue:                                                                                                                                                                                                                                                                                                                                                                                                                         
             suppose when a transport request moved from DEV to Quality. In transaction code ST22,import_buffer issue will appear.                                                                                                                                                                                                                                               
             Solution:                                                                                                                                                                                                                                                                                                                                                                                                                      
 Issue because of transport request not imported correctly.                                                                                                                                                                                                                                                                                                                         
       need to change that ABAP program (which is captured in transport request) manually in QAS (target ) server with the help of  ABAPer.
                 Client open in SCC4 may required here, in case the target server is Quality or Production for adoption of changes in target server directly.

ST11 - Developer Trace

  • ST11  - developer trace
  • Display all wp, dev_rfc traces,dev_disp,dev_w0...dev_w15 kind of traces available here.
  • double click on any on wp, for analysis. if required.
How to activate develop trace -->SM50 & SM66 -->change value in the menu option --> Trace value =1 (only error will be showed).

SM50--> Administration(in menu) --> Traces -->Dispatcher -->chance trace level-->Value.

Other way using to check this traces:

Only in case server is MS SQL DB based on windows server, open SAP MMC --> Right click on system SID,where you need the developer system-->Choose Developer trace option -->Developer trace can monitor here.
in case Linux based system or for any other OS based system use, SAP MC -->For more info regarding SAP MC