aws-rds-top

command module
v0.0.0-...-b963118 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 16 Imported by: 0

README

aws-rds-top

A command line tool that retrieves AWS RDS Enhanced Monitoring statistics from CloudWatch and displays the information in a format similar to the Linux top command.

Status: Alpha

Features

  • Retrieves and displays RDS instance system, network, disk IO, and process statistics.
  • Supports sorting by memory usage or CPU usage.

Prerequisites

  • Go programming language installed (version 1.19 or higher)
  • AWS CLI configured with the appropriate credentials and region
  • RDS Enhanced Monitoring enabled for your RDS instances

Note on Processes and Threads

RDS Enhanced Monitoring displays a maximum of 100 processes and threads, which are a combination of the top CPU consuming and memory consuming processes and threads. If there are more than 50 processes and more than 50 threads, the console displays the top 50 consumers in each category. For more information, refer to the official AWS documentation.

Installation

git clone https://github.com/sherwind/aws-rds-top.git
cd aws-rds-top
go build -o rds-top

Usage

./rds-top [options] <rds-instance-name>
./rds-top --start-time=$(date -v-13d +%s) <rds-instance-name>
./rds-top --sort-by-mem --start-time=$(date -j -f "%Y-%m-%dT%H:%M:%S%z" "2019-09-12T13:05:00+0000" +%s) <rds-instance-name> | grep -v 'idle$'

Options

--start-time=t           Optional: Specify the start time in seconds since the Unix epoch
--sort-by-mem            Optional: Sorts output by memory. Default is to sort by CPU

License

This project is licensed under the MIT License.

Contributing

Please feel free to submit issues, fork the repository, and send pull requests.

Documentation

Overview

rds-top is a tool to get AWS RDS Enhanced Monitoring statistics from CloudWatch and show something similar to the Linux top command.

based on https://gist.github.com/sherwind/962fabb187769517e93a0ac57bf88f4e

Usage:

./rds-top rds-instance
./rds-top --start-time=$(date -v-13d +%s) rds-instance
./rds-top --sort-by-mem --start-time=$(date -j -f "%Y-%m-%dT%H:%M:%S%z" "2019-09-12T13:05:00+0000" +%s) rds-instance | grep -v 'idle$'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL