Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
vyvarya0608
Explorer
0 Kudos
4,349

As a SAP Basis consultants you are advised to understand the most commonly used Linux commands that are necessary while supporting SAP customers for day to day work. It is very common that basic commands should be handy with SAP Basis consultants.

 

Part 1 link:- https://community.sap.com/t5/technology-blogs-by-members/part-1-sap-basis-os-support-on-suse-linux-f...

Part 2 link:- https://community.sap.com/t5/technology-blogs-by-members/part-2-sap-basis-os-support-on-suse-linux-f...

 

Basic commands

Linux administrator can login with tools like putty or kitty or other applications available in market or allowed by customer, with either root or sidadm. Whereas both the IDs have different rights W.R.T  OS and sap application. ​

Echo command :- echo command in linux is used to display line of text/string that are passed as an argument . This is a built in command that is mostly used in shell scripts and batch files to output status text to the screen or a file.

 

echo $USER

echo $PWD

echo $MAIL

echo $JAVA_PATH

echo $DB2INSTANCE

Echo my name is Vivek Arya

 

 

YAST or YAST2 Command:-

Linux system

control panel or

All system settings

 

vyvarya0608_0-1720689435032.png

 

 

Hostname Command:-

Hostname –I (capital i) :- provides only the ip address of server or all ip addresses on server

vyvarya0608_1-1720689435033.png

 

Hostname :- provides the hostname of the server.

vyvarya0608_2-1720689435033.png

 

 

VERSION CHECKS

 

#java –version

vyvarya0608_3-1720689435034.png

 

 

# more /etc/SUSE-brand

vyvarya0608_4-1720689435034.png

 

 

# more /etc/os-release

vyvarya0608_5-1720689435035.png

 

 

To check which all packages installed (with their versions) on server related to all business specific support

# rpm –qa | more

Click space bar to see

Pagewise details

Click enter bar to see

Linewise details

vyvarya0608_6-1720689435037.png

 

 

System start and stop commands

startsap:- This will work only for <SID>adm user.This will start SAP system as well as database in standard defined sequence. (note the script should be enabled to run both with database details and user credentials)

startsap r3 :-This will work only for <SID>adm user. Your login in to ‘root’ user, then you need switch the user to SAP user as <SID>adm. It will start all sap application servers except existing Database. Please note database should be running to run this command

vyvarya0608_7-1720689435040.png

 

 

stopsap r3 :- This will stop only SAP system.

stopsap :-  This will stop SAP system as well as Database (note the script should be enabled to run both with database details and user credentials)

vyvarya0608_8-1720689435045.png

 

 

The cleanipc command is used to clear the shared memeory occupied by the SAP system. Mostly, this command is used (by <sid>adm user) while restarting an SAP system. So, you stop the system using stopsap, run the cleanipc command to clear the memory and then start the system using startsap.

 

cleanipc 00 remove ( where 00 is the instance ) 

 

vyvarya0608_9-1720689435048.png

 

 

ipcs | grep -l sidadm (to check if application has occupied any memory )

vyvarya0608_10-1720689435059.png

 

DPMON :- This command is used to check the running SAP processes for a particular application by using its profile file. For JAVA system the command used is JSMON with different options to be selected.

vyvarya0608_11-1720689435067.png

 

 

R3trans:- Check connectivity with database.

vyvarya0608_12-1720689435068.png

 

 

SAP Commands to check on SAP systems only

  • To check the consistency on parameters maintained in profile/Default file(sidadm user):-

/usr/sap/<SID>/SYS/exe/run/sappfpar check pf=<profile file name> | more

  • To move directly to profile directory (sidadm user):-

cdpro

  • To move directly to kernel directory (sidadm user):-

cdexe

  • To check the status of SAP system all process green status(sidadm user):-

sapcontrol -nr <instance number> -function GetProcessList

  • To check message server status(sidadm user):-

msmon pf=<SID_DVEBMGS02_hostname> file

  • To move directly to hana logs and traces(hana user):-

cdtrace

 

Common working shortcuts on linux

  • ctrl+c                                 Halts the current command
  • ctrl+z                                 Stops the current command, resume with fg in the foreground or bg in the background
  • ctrl+d                                 Logout the current session, similar to exit
  • ctrl+w                                Erases one word in the current line
  • ctrl+u                                 Erases the whole line
  • ctrl+r                                 Type to bring up a recent command
  • !!                                        Repeats the last command
  • exit                                    Logout the current session

 

df –h (to check the size allocated/Used/Available and the mount point names for the files systems available on linux server)

vyvarya0608_13-1720689435078.png

 

 

Free Desktop Application used for accessing Linux platform.

  1. Putty                   (Latest Version, available free on Internet)
  2. UltraVNC Viewer             (Latest Version, available free on Internet)
  3. Mobaexterm     (Latest Version, available free on Internet)
  4. Winscp               (For connectivity between Windows and Linux boxes.Latest Version, available free on Internet)