Notas:
1804811 - SAP HANA Database: Kernel Profiler Trace
Solution
Connect to your HANA database server as user sidadm (for example via putty) and start hdbcons by typing command "hdbcons".
To do a Kernel Profiler Trace of your query, please follow these steps:
To do a Kernel Profiler Trace of your query, please follow these steps:
- 1. "profiler clear" - Resets all information to a clear state
- 2. "profiler start" - Starts collecting information.
- 3. Execute the affected query.
- 4. "profiler stop" - Stops collecting information.
- 5. "profiler print -o /path/on/disk/cpu.dot;/path/on/disk/wait.dot" - writes the collected information into two dot files which can be sent to SAP.
Attention: Specifying both a database user and an application user with SAP HANA SPS <= 10 can result in a crash. This problem is fixed as of SAP HANA SPS 11.
1732157 - Collecting diagnosis information for SAP HANA [VIDEO]
1813020 - How to generate a runtime dump on SAP HANA
1) From the OS Level
1) Log into the linux HANA host presenting the issue as sidadm user;
2) Run command 'hdbcons';
3) On the hdbcons console run command below:
> runtimedump dump
This will create a runtimedump for the host you logged in. The generated file will be under traces directory with naming like 'indexserver....rtedump.trc'.
This will create a runtimedump for the host you logged in. The generated file will be under traces directory with naming like 'indexserver....rtedump.trc'.
4) Attach generated trace file to the OSS Message
Na prática
- generate a kernel profiler trace. Please refer to SAP note 1804811
- 1. "profiler clear" - Resets all information to a clear state
- 2. "profiler start" - Starts collecting information.
- 3. Execute the affected query. - in the case of our problem, it is not necessary
- 4. "profiler stop" - Stops collecting information.
- 5. "profiler print -o /hana/shared/SID/HDB00/serverXX/trace//wait.dot" - writes the collected information into two dot files which can be sent to SAP.
2 . generate 3 runtime dumps with 2 minutes interval between each. These must be generated DURING the system hang. Please refer to 1813020.
- cd /hana/shared/SID/HDB00/serverX/trace/
- exec /hana/shared/rtedump_script.sh
3. generate a full system dump as per note 1732157 during the time frame of the high cpu.
cd /usr/sap/SID/HDB00/exe/python_support/
python fullSystemInfoDump.py
cd /usr/sap/SID/SYS/global/sapcontrol/snapshots/
ls –larth
Copy the newer files on diretory
PARA executar tudo em um comando (copiar e colar na linha de comando e lembrar de alterar serverX pelo nome correto do servidor):
hdbcons "runtimedump dump" ; hdbcons "profiler clear" ; hdbcons "profiler start" ; hdbcons "profiler stop" ; hdbcons "profiler print -o /hana/shared/SID/HDB00/serverX/trace/wait.dot" ; cd /hana/shared/SID/HDB00/serverX/trace/ ; /hana/shared/rtedump_script.sh ; cd /usr/sap/SID/HDB00/exe/python_support/ ; python fullSystemInfoDump.py
Depois da execução, proceder com a coleta, compressão e envio do arquivo para a SAP.
Executar $hdbcons "runtimedump dump"
- hdbcons "profiler clear"
hdbcons "profiler start" hdbcons "profiler stop" hdbcons "profiler print -o /hana/shared/SID/HDB00/backup/wait.dot"
verificar qual thread consome mais recursos:
top -H -u sidadm
Guardar este número para procurar nos dumps
listar threads:
ps -eLf
Executar $hdbcons "runtimedump dump"
- hdbcons "profiler clear"
hdbcons "profiler start" hdbcons "profiler stop" hdbcons "profiler print -o /hana/shared/SID/HDB00/backup/wait.dot"
Nenhum comentário:
Postar um comentário