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
[root@dlovhn1 /tmp]# iostat -nx 1 | |
extended device statistics | |
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device | |
0.0 0.0 0.1 0.0 0.0 0.0 0.1 0.4 0 0 lofi1 | |
0.0 0.0 0.2 0.2 0.0 0.0 0.0 0.0 0 0 ramdisk1 | |
7.0 102.9 206.0 2865.2 0.4 0.1 4.0 0.5 10 6 c0t0d0 | |
7.0 102.9 207.0 2865.2 0.4 0.1 4.0 0.5 10 6 c0t1d0 | |
14.0 166.7 413.0 5730.5 39.2 1.0 217.0 5.6 6 14 zones | |
extended device statistics | |
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device |
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 time | |
import socket | |
import pywintypes | |
import win32pdh | |
class Win32Performance: | |
def __init__( self ): | |
self.counters = [] | |
self.hq = win32pdh.OpenQuery() |
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
root@dlovhriakn1:~# df -h | |
Filesystem Size Used Avail Use% Mounted on | |
rootfs 48G 4.8G 41G 11% / | |
/dev/root 48G 4.8G 41G 11% / | |
devtmpfs 16G 4.0K 16G 1% /dev | |
none 3.2G 252K 3.2G 1% /run | |
none 5.0M 0 5.0M 0% /run/lock | |
none 16G 0 16G 0% /run/shm | |
/dev/sda2 832G 100G 694G 13% /data |
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
/*jshint node:true, laxcomma:true */ | |
/* | |
* Flush stats to graphite (http://graphite.wikidot.com/). | |
* | |
* To enable this backend, include 'graphite' in the backends | |
* configuration array: | |
* | |
* backends: ['dataloop'] | |
* |
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
#!/usr/bin/env python | |
import requests | |
import xmltodict | |
USER = '' | |
PASSWORD = '' | |
xml = requests.get('http://%s:%s@localhost:8161/admin/xml/queues.jsp' % (USER, PASSWORD)).text | |
obj = xmltodict.parse(xml) |
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
#!/usr/bin/env python | |
import requests | |
import xmltodict | |
from datetime import datetime | |
USER = '' | |
PASSWORD = '' | |
TIME = 3600 # age metric defaults to hours. set to 60 for minutes |
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
#! /usr/bin/env ruby | |
require 'main' | |
require 'yaml' | |
require 'httparty' | |
Main { | |
option('execute'){ | |
argument :optional | |
description 'execute the check' | |
} |
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
#!/usr/bin/env python | |
import setuptools # needed for pyinstaller | |
import os | |
import sys | |
import psutil | |
import time | |
import re | |
import argparse |
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
#!/usr/bin/env python | |
import os | |
import re | |
from datetime import datetime | |
import sys | |
LOGFILE = '/var/log/nginx/access.log' | |
combined = '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"' | |
timed_combined = '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$request_time"' |
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
#!/usr/bin/env python | |
import sys | |
import time | |
import yaml | |
import json | |
import requests | |
url = 'https://app.dataloop.io' | |
api_key = 'redacted' | |
org = 'organisation' |
OlderNewer