Showing posts with label check. Show all posts
Showing posts with label check. Show all posts

Saturday, 6 March 2021

How to check HA replication info

open putty session and execute below sequence of commands:


 1. sudo su - <sid>adm

2.hdbcons

3.replication info

check the time stamp in the lines:
                replylogpostimestamp : 20.12.2020 - 11.32.15

                shippedlogpostTimestamp : 21.12.2020 - 11.32.15

                       * 32 - seconds.

                       * 15 - msec

Saturday, 14 November 2020

HANA Database update check list

when update need to perform:

  • while perform several update at application level. SAP recommends for HDB upgrade.
  • Based on EWA.
 Pre-requisites:

1. collect all the components installed along the HDB. Based all the respective components also need to update.

2.check the present version of HANA database: with command: HDB version


Update check list:

  • Download update software from SMP.
  • Unsar the software.
  • Stop application.
  • Take complete backup (system & tenant database).
  • Stop Database.
  • Navigate the media --> run  ./hdblcm --> provide inputs.
  • start DB, with command: HDB start
  • start application.
Post - installation:
  • login to application and run the t-code: SICK.
           check for any error logs here.




Tuesday, 10 March 2020

Check file system space script


Method - 1:

Disk Space Check
=================
# Check the filesystem
df -h
# Remove un-wanted rows
df -h | egrep -v "Filesystem|tmpfs"
# Get 5th and 6th column
df -h | egrep -v "Filesystem|tmpfs" | awk '{print $5, $6}'
df -h | egrep -v "Filesystem|tmpfs" | awk '{print $5}' | cut -d'%' -f1`
--------------------------------------------
First For loop script
vi checkdisk
#!/bin/bash
a=`df -h | egrep -v "tmpfs|devtmpfs" | tail -n+2 | awk '{print $5}' | cut -d'%' -f1`
for i in $a
do
        if [ $i -ge 50 ]
        then
        echo Check disk space $i `df -h | grep $i`
        fi
done
--------------------------------------------


Method - 2:


#!/bin/sh
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $5,$1}' | while read output
do
        usep=$(echo $output | awk '{print $1}' | cut -d'%' -f1  )
        partition=$(echo $output | awk '{print $2}' )
       
        if [ $usep -ge 90 ]
        then
        echo "Running out of space \"$partition ($usep%)\" on $(hostname) as on $(date)"
        fi
done
--------------------------------------------


Method - 3 (simple method):
#Write a script to awk only those rows with the value

#!/bin/sh
df -h | awk '0+$5 >= 10 {print}'
To make it presentable
echo
echo Following is the disk space status
echo
df -h | awk '0+$5 >= 10 {print}' | awk '{print $5, $6}'

Tuesday, 11 February 2020

host connectivity check using Linux scripts using exit code


cat connect_check.sh
#!/bin/bash
HOST="google.com"
ping -c 4 $HOST
if [ "$?" -eq "1" ]                        #exit code test condition
then
echo " $HOST is reachable "
else
echo " $HOST unreachable "
fi




Output

./connect_check.sh
PING google.com (172.217.17.78) 56(84) bytes of data.
From 10.188.34.2 icmp_seq=1 Destination Host Unreachable
From 10.188.34.2 icmp_seq=2 Destination Host Unreachable
From 10.188.34.2 icmp_seq=3 Destination Host Unreachable
From 10.188.34.2 icmp_seq=4 Destination Host Unreachable

--- google.com ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2998ms

 google.com is reachable



Thursday, 9 January 2020

How to check the HDB present status


  1. su - <sid>adm
  2. cd /usr/sap/hostctrl/exe/ 
  3. ./sapcontrol -nr 02 -function GetProcessList


08.01.2020 05:49:11
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2020 01 08 05:22:16, 0:26:55, 84174
hdbcompileserver, HDB Compileserver, GREEN, Running, 2020 01 08 05:22:22, 0:26:49, 84370
hdbindexserver, HDB Indexserver, GREEN, Running, 2020 01 08 05:22:25, 0:26:46, 84418
hdbnameserver, HDB Nameserver, GREEN, Running, 2020 01 08 05:22:17, 0:26:54, 84197
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2020 01 08 05:22:22, 0:26:49, 84372
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2020 01 08 05:22:39, 0:26:32, 84877
hdbxsengine, HDB XSEngine, GREEN, Running, 2020 01 08

Thursday, 15 August 2019

to check the network connect between two linux servers

$ ping <Host_name_of_remote_server>

to check the network connect between two linux servers