SAP & DB2 Process Monitoring Parameters

What are the parameters ((i.e., Process & Services) need to monitor for SAP & DB2 to capture shutdown, restart & Halt status of those applications.

Please suggest the best practices.

Ex: SAPSTART for SAP & DP2SYS for DB2

What do you mean by "capture shutdown, restart & Halt status"? It is realatively easy to find out if SAP is running or not, but to find out in which state the running software is you would need access to ot (via SAPGui, Web dispatcher or similar means). This might - depending on what you want to monitor exactly - not be feasible within a script.

Similar for DB/2. A look into the process list with "ps" tells you if DB/2 is started or not, but to tell if it is running normally or if only the dabase manager is started for a TSM backup or .... you will need to access the DB software itself.

So please specify what exactly you want to know and which means to find out you have at your disposal. Further, tell a bit more detail about your SAP instance: do you have an ABAP instance only, a JAVA stack too and, if the latter is the case, a web dispatcher instance on top?

I hope this helps.

bakunin

1 Like

Thanks Bakunin for your reply.

We were using a performance monitoring tool, my query is what are the parameters (Services or Process) need to configure on monitoring to capture the instance like shutdown, restart or halt status of SAP & DB2.

Hope I clarified in depth.

Sorry, but this still doesn't make sense for me.

A "performance monitoring tool" will tell you how many resources - processors, RAM, whatever - is consumed (by an application) at a certain point in time. You won't be able to monitor the application status with such a tool for the same reason why you can't measure a length with a watch - its the wrong measurement instrument.

How about you tell us which "performance monitoring tool" you are going to use and maybe we can work out something.

For instance, here is how you can test if a (DB/2)-DB is available for SAP: change to the "sidadm" user of the ABAP instance and run the following command. If the output is as shown (the important part is the "0000") then the DB is available

sidadm@saphost > R3trans -d | tail -n 1
R3trans finished (0000).

I use this in my scripts the following way:

[...]
chOut="$(su - "${chUser}" -c "R3trans -d" | tail -n 1)"
chOut="${chOut%\)*}"
chOut="${chOut#*\(}"

if [ "$chOut" == "0000" ] ; then
     print - "INFO: Database available"
else
     print -u2 - "ERROR: Database failed to start. Aborting....
fi
[....]

I hope this helps.

bakunin

1 Like