Skip to content

Instantly share code, notes, and snippets.

romans.krjukovs corvax19

Block or report user

Report or block corvax19

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@corvax19
corvax19 / aws_instance_types.py
Created Nov 7, 2018
List AWS EC2 instance types
View aws_instance_types.py
#!/usr/bin/env python
import requests
URL='https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/us-east-1/index.csv'
lines = requests.get(URL).text.split('\n')[6:]
for type in sorted(set([s[18] for s in [ l.split('","') for l in lines ] if len(s)>18 and s[18] and '.' in s[18]])):
print(type)
View RPI
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
View shops
#Electronics shops in Riga/Latvia
##Local shops in Riga
[Lemona][http://lemona.lv]
@corvax19
corvax19 / SQLextract
Last active Aug 29, 2015
Extract SQL statements from Siebel logfiles
View SQLextract
#!/usr/bin/awk -f
function help() {
print "Scripts detects and optionally extracts SQL statements among with "
print "binding variables and execution time from Siebel component's logfile."
print "Extraction is much slower - where applicable, run detection first"
print "to confirm there are interesting statements in the log."
print "TOP5 identified by following criterias:"
print " - most frequent statement"
print " - slowest statement"
print " - most time consuming statement (accumulated execution time)"
@corvax19
corvax19 / siebCompMemUse
Created Aug 27, 2014
Siebel component memory use
View siebCompMemUse
#!awk -f
function help() {
print "Usage: siebCompMemUse [options]"
print
print "Script calculates memory consumption (RSZ and VSZ seperately) for Siebel components,"
print "currently running on machine. Ignores ServerMgr processes."
print
print "Options:"
print " trace trace execution"
@corvax19
corvax19 / siebelCompMemoryUse
Last active Aug 29, 2015
Siebel component memory use
View siebelCompMemoryUse
#!awk -f
function help() {
print "Usage: siebCompMemUse [options]"
print
print "Script calculates memory consumption (RSZ and VSZ seperately) for Siebel components,"
print "currently running on machine. Ignores ServerMgr processes."
print
print "Options:"
print " trace trace execution"
View xxx
#!/usr/bin/env python
import os
import re
import tarfile
def findArchive(startDir, archivePattern, filePattern, linePattern):
for (dirpath, dirnames, filenames) in os.walk(startDir):
for filename in filenames:
# print "Matching file %s" % (filename)
if re.match(archivePattern, filename):
@corvax19
corvax19 / siebel.enterprise.log.discovery.py
Last active Aug 29, 2015
Script for Zabbix discovery of alive/running Siebel enterprise logs.
View siebel.enterprise.log.discovery.py
#!/bin/env python
# -*- coding: utf8 -*-
#
# Siebel enterpise log Zabbix discovery item script.
# Supports multiple Siebel servers per host.
#
# 20140130 romans(dot)krjukovs(at)gmail(dot)com
#
import sys, os
@corvax19
corvax19 / siebelCrashScanner.sh
Created Jan 23, 2014
Looks for running siebel enterprise server log file of given system user and scans previous hour for signs of process crashes.
View siebelCrashScanner.sh
#!/bin/env bash
# Looks for running siebel enterprise server log file
# of given system user and scans previous hour for signs of process crashes.
#
# 20140123 romans.krjukovs@gmail.com
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <user> <tz> [-verbose]"
echo " user - system user running Siebel enterprise"
echo " tz - adjusted timezone to cover previous hour (CET+0)"
You can’t perform that action at this time.