Logs the time it takes to complete HANA_CALL's to HANA database
Report Bug
·
Request Feature
hanacall-timer was developed so that users can see how long HANA_CALL's from the resource agent to HANA take to return. This can be used to confirm the HANA_CALL's are returning in a timely manner and to have data showing the length of time (in ms) for further troubleshooting.
To get a local copy up and running follow these simple steps.
- SAP HANA High Availability Cluster
Download the binary from Releases (https://github.com/rfparedes/hanacall-timer/releases/latest/download/hanacall-timer) to /usr/local/bin
on the server and run:
sudo chmod +x /usr/local/bin/hanacall-timer
Start it
sudo hanacall-timer start --sidadm <SIDADM>
Check Status Anytime
hanacall-timer status
-
hanacall-timer will time two HANA interface calls. These calls are made exactly as they are from within the SAPHanaSR resource agents.
- systemReplicationStatus.py
- landscapeHostConfiguration.py
-
When started, a systemd service and timer are created. The timer is enabled and will run hanacall-timer every 60 seconds
-
Only one instance of hanacall-timer will run at any given time. If HANA_CALL takes longer than 60 seconds, no additional calls will be made until the HANA_CALL's return
-
When starting, the HANA user needs to be specified as this is the user making the HANA_CALL
-
The log includes command output, command return codes and timings logged to /var/log/hanacall-timer.log
-
The output of the timings are also logged in csv format to /var/log/hanacall-timer.csv in the format:
RFC3339 date-time, systemReplicationStatus.py time (ms), landscapeHostConfiguration.py time (ms)
As an example, you can see the HANA_CALL landscapeHostConfiguration timings increasing on this server from 293ms to a high of 32.097s:
hana11:~ # tail -f /var/log/hanacall-timer.csv
2021-03-27T19:57:45-04:00,297,293
2021-03-27T19:58:46-04:00,317,316
2021-03-27T19:59:46-04:00,373,373
2021-03-27T20:00:46-04:00,594,594
2021-03-27T20:01:47-04:00,421,420
2021-03-27T20:02:47-04:00,2375,2346
2021-03-27T20:03:48-04:00,3670,3639
2021-03-27T20:04:49-04:00,3314,3297
2021-03-27T20:05:49-04:00,32538,32097
2021-03-27T20:06:50-04:00,31271,31055
sudo hanacall-timer start --sidadm <SIDADM>
sudo hanacall-timer stop
hanacall-timer status
- You'll need a go compiler installed
Clone it
git clone https://github.com/rfparedes/hanacall-timer.git
Build it
cd hanacall-timer
go build -o hanacall-timer
Move it
mv hanacall-timer /usr/local/bin
sudo chmod +x /usr/local/bin/hanacall-timer
Start it
sudo hanacall start --sidadm <SIDADM>
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL-3.0 License. See LICENSE
for more information.