Skip to content

Instantly share code, notes, and snippets.

@sherwind
sherwind / rds-top.sh
Last active June 16, 2022 13:58 — forked from matheusoliveira/README.md
Get AWS RDS Enhanced Monitoring statistics from CloudWatch and show something similar to Linux top command
#!/bin/bash
# rds-top.sh
# by <sherwin@daganato.com>, 20190822
# based on the work of Matheus de Oliveira <matioli.matheus@gmail.com>
#
# Usage:
# ./rds-top.sh rds-instance
# ./rds-top.sh --start-time=$(date -v-13d +%s) rds-instance
# ./rds-top.sh --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$'