This is a simple oneliner that I wrote so that I could quicly get an overview of the counts of each process.
Too many TASK_UNINTERRUPTIBLE processes can cause significant Disk Utilization.
#!/bin/bash | |
set -e | |
# ANSI color table that relates to RGB (NOT true RGB) | |
# Written by: Robert J. | |
# _/ _/ _/ _/ _/ | |
# _/_/_/_/_/ _/ _/_/_/ _/_/_/ _/_/_/ _/_/_/ | |
# _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ | |
# _/_/_/_/_/ _/ _/ _/ _/ _/_/ _/ _/ | |
# _/ _/ _/ _/_/_/ _/_/_/ _/_/_/ _/ _/ |
#!/bin/bash | |
set -e | |
# Writen by: Robert J. | |
##### Recommended Crontab: | |
########################## | |
# * * * * * ~/Applications/Startup/Desktop-Cleanup.sh | |
# Here is a fish for your viewing pleasure: |
#!/bin/bash | |
set -e | |
# Written by: Robert J. | |
####################################### | |
### Info Function ##################### | |
####################################### | |
db_info(){ | |
DB_SSH_USR=user |
#!/usr/bin/python | |
import sys; | |
import re; | |
####################################### | |
### Main Function ##################### | |
####################################### | |
def main(): |
while read -r region; do | |
printf "%s:\n" "$region"; | |
aws ec2 describe-instances --region "$region" | \ | |
awk -F '"' '/InstanceType/ {print $4}' | \ | |
sort | \ | |
uniq -c; | |
aws rds describe-db-instances --region "$region" | \ | |
awk -F '"' '/DBInstanceClass/ {print $4}' | \ | |
sort | \ | |
uniq -c; |
tail -f /var/log/secure | awk -F "=" '/fail/ && /rhost/ {print$7}' |
# .bash_profile | |
# Shell look and path | |
export PS1='$(date +%H:%M) \[\e[0;32m\]Mac Shell: \W/>\$ \[\e[m\]' | |
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/Scripts/.bin" | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
# Shell Histroy: | |
HISTTIMEFORMAT="%d/%m/%y %T " |
#!/usr/bin/env python | |
import logging | |
import sys | |
import json | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
def main(): |