Git Product home page Git Product logo

hanacall-timer's Introduction

Contributors Language Issues GPL-3.0 License Watchers


hanacall-timer

Logs the time it takes to complete HANA_CALL's to HANA database
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Technical Details
  4. Usage
  5. Build It Yourself
  6. Contributing
  7. License

About The Project

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.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • SAP HANA High Availability Cluster

Installation

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

Technical Details

  • hanacall-timer will time two HANA interface calls. These calls are made exactly as they are from within the SAPHanaSR resource agents.

    1. systemReplicationStatus.py
    2. 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

Usage

To start, run

sudo hanacall-timer start --sidadm <SIDADM>

To stop, run

sudo hanacall-timer stop

To see the current start/stop status of hanacall-timer, run

hanacall-timer status

Build it yourself

  • 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>

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

hanacall-timer's People

Contributors

rfparedes avatar

Stargazers

adam kaminski avatar  avatar Rich Brunt avatar

Watchers

 avatar Sono pazzo, sei pazzo, siamo tutti pazzi. avatar

Forkers

thr3d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.