npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

censql

v1.13.6

Published

A NodeJS command line client for SAP HANA

Downloads

128

Readme

CenSQL

A better CLI client for SAP HANA

CenSQL (Pronounced "Sen-Sea-Quel") is an unofficial replacement by Centiq Ltd for the hdbsql CLI. It was created to provided command history and shorthand commands useful for monitoring SAP HANA which aren't available in the hdbsql client.

As well as having a smoother user interface, CenSQL also provides a lot more functionality which is not present in hdbsql, such as shortcuts for sql queries useful for any DB admin or developer for example \al for viewing open alerts on the instance you are connected to.

Finally, CenSQL has support for bar charts and line graphs inside the CLI interface for showing a 'at-a-glanse' view of the status and history of the instance, for example \cpu for showing the CPU usage for each host for the instance and \smem for showing the current shared memory.

See an SCN article about CenSQL

Installation

Note: CenSQL has been tested on Ubuntu, Debian, SLES, SLES4SAP, Windows Server 2003 and Windows 7/8 Desktop. It most likely works perfectly on OSX but no testing is done on this platform.

Statically Compile to run without NodeJS (Optional)

Command Usage

Basic SQL

Entering a SQL query is done by simply typing it in and pressing enter.

> SELECT HOST, UNLOAD_TIME, SCHEMA_NAME FROM SYS.M_CS_UNLOADS LIMIT 2

HOST | UNLOAD_TIME | SCHEMA_NAME
- - - - - - - - - - - - - - - - - - - 
hananode01 | 2015-07-02T05:30:34.017 | _SYS_STATISTICS
hananode01 | 2015-07-02T05:30:34.006 | _SYS_STATISTICS

Results will be returned in a table format unless the command is ended with '\G' in which case it will draw data in a grouped format

> SELECT HOST, UNLOAD_TIME, SCHEMA_NAME FROM SYS.M_CS_UNLOADS LIMIT 2\G
No: 0 -------------------
 HOST: hananode01
 UNLOAD_TIME: 2015-07-02T05:30:34.017
 SCHEMA_NAME: _SYS_STATISTICS
No: 1 -------------------
 HOST: hananode01
 UNLOAD_TIME: 2015-07-02T05:30:34.006
 SCHEMA_NAME: _SYS_STATISTICS

CenSQL Commands

Any CenSQL command is prefixed with a ''. This stops the input from being sent directly to HANA and instead runs the CenSQL command.

> \st

HOST | HOST_ACTIVE | HOST_STATUS
- - - - - - - - - - - - - - - - - - - 
hananode01 | YES | OK

Post Commands

Output from any query or command may be piped to a post command which will transform the output in some way. eg:

> \serv | grep indexserver

hananode01 | 30103 | indexserver | 4771 | master | YES | 30115 | MASTER

Non Interactive (Batch mode)

$ censql --user SYSTEM --port 34315 --host 192.168.182.240 --pass Passw0rd --command "\st"
HOST | HOST_ACTIVE | HOST_STATUS
- - - - - - - - - - - - - - - - - - - 
dev-kvmhana01 | YES | OK
dev-kvmhana02 | YES | OK

$ censql --use MY_SAVED_INSTANCE --command "\st\j"
[{"HOST":"dev-hana01","HOST_ACTIVE":"YES","HOST_STATUS":"OK"},{"HOST":"dev-hana02","HOST_ACTIVE":"YES","HOST_STATUS":"OK"}]

License: MIT