This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import sys | |
client = boto3.client('ecs') | |
def print_resource_usage(usage): | |
# print usage | |
print "Instance\t\t\t\tCPU\tMemory\tPorts" | |
print "========================================================================" | |
for instance in usage.keys(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re, json, datetime | |
from sys import argv,exit | |
def parse_log(filename): | |
try: | |
fh = open(filename) | |
except Exception as e: | |
print "Error in opening file: %s" % str(e) | |
lines = fh.readlines() | |
fh.close() |