Skip to content

Instantly share code, notes, and snippets.

View hutchic's full-sized avatar
💭
Open for work

Colin Hutchinson hutchic

💭
Open for work
View GitHub Profile
@hutchic
hutchic / gist:3226bbba0d299a1b089f
Created February 11, 2016 02:05
nginx proxy y u no work
user www-data;
worker_processes auto;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 8192;
"system","memory usage",,,,"net/total",,"total cpu usage",,,,,
"time","used","buff","cach","free","recv","send","usr","sys","idl","wai","hiq","siq"
20-01 19:56:32,450859008.0,36909056.0,412471296.0,140443648.0,0.0,0.0,1.286,0.285,97.905,0.509,0.0,0.014
20-01 19:56:33,450854912.0,36909056.0,412475392.0,140443648.0,0.0,0.0,0.0,0.0,100.0,0.0,0.0,0.0
20-01 19:56:34,450854912.0,36909056.0,412475392.0,140443648.0,0.0,0.0,0.0,0.0,100.0,0.0,0.0,0.0
20-01 19:56:35,451354624.0,36917248.0,412475392.0,139935744.0,34432.0,54318.0,4.167,0.0,95.833,0.0,0.0,0.0
20-01 19:56:36,451481600.0,36917248.0,412475392.0,139808768.0,32560.0,57720.0,4.082,1.020,93.878,0.0,0.0,1.020
20-01 19:56:37,451522560.0,36917248.0,412475392.0,139767808.0,32560.0,57720.0,3.125,1.042,95.833,0.0,0.0,0.0
20-01 19:56:38,451678208.0,36917248.0,412475392.0,139612160.0,32560.0,57720.0,3.030,1.010,93.939,0.0,0.0,2.020
20-01 19:56:39,451760128.0,36917248.0,412475392.0,139530240.0,32560.0,57720.0,5.102,1.020,93.878,0.0,0.0,0.0
'dem_req_rate', 'req_rate_ip-10-200-9-241.ec2.internal', 'con_rate_ip-10-200-9-241.ec2.internal', 'min_rep_rate_ip-10-200-9-241.ec2.internal', 'avg_rep_rate_ip-10-200-9-241.ec2.internal', 'max_rep_rate_ip-10-200-9-241.ec2.internal', 'stddev_rep_rate_ip-10-200-9-241.ec2.internal', 'resp_time_ip-10-200-9-241.ec2.internal', 'net_io_ip-10-200-9-241.ec2.internal', 'errors_ip-10-200-9-241.ec2.internal',
'200', '200.0', '20.0', '200.0', '200.0', '200.0', '0.0', '1.0', '55.9', '0',
'400', '293.9', '39.4', '178.0', '296.1', '400.0', '101.9', '4.0', '82.1', '3.40427813220394',
'600', '313.3', '56.8', '15.6', '320.4', '596.0', '145.9', '2.8', '87.3', '8.18670932092482',
'800', '342.8', '76.3', '173.8', '343.4', '601.8', '125.0', '1.6', '95.7', '12.2817177476835',
'1000', '232.7', '90.9', '39.0', '243.4', '434.0', '111.3', '3.7', '64.7', '29.3747542272906',
'1200', '310.6', '107.3', '164.2', '321.6', '613.6', '144.4', '1.6', '86.7', '24.5611610228058',
'1400', '360.0', '122.9', '152.0', '364.6', '560.0', '119.1', '4.2',
"total cpu usage",,,,,,"dsk/total",,"net/total",,"paging",,"system",
"usr","sys","idl","wai","hiq","siq","read","writ","recv","send","in","out","int","csw"
0.758,0.170,98.788,0.282,0.0,0.001,78581.632,261931.459,0.0,0.0,0.0,0.0,22.553,50.236
0.0,0.0,100.0,0.0,0.0,0.0,0.0,0.0,504.0,1312.0,0.0,0.0,23.0,30.0
0.990,0.0,99.010,0.0,0.0,0.0,0.0,0.0,104.0,460.0,0.0,0.0,11.0,10.0
0.0,0.0,100.0,0.0,0.0,0.0,0.0,0.0,1200.0,622.0,0.0,0.0,15.0,10.0
0.990,0.0,99.010,0.0,0.0,0.0,0.0,0.0,156.0,514.0,0.0,0.0,12.0,10.0
0.0,0.0,100.0,0.0,0.0,0.0,0.0,0.0,104.0,460.0,0.0,0.0,14.0,19.0
----system---- ------memory-usage----- -net/total- ----total-cpu-usage----
time | used buff cach free| recv send|usr sys idl wai hiq siq
20-01 05:31:49|80.3M 34.3M 406M 472M| 0 0 | 1 0 99 0 0 0
20-01 05:31:59|80.3M 34.3M 406M 472M| 44B 27B| 0 0 100 0 0 0
20-01 05:32:09|80.3M 34.3M 406M 472M| 30B 27B| 0 0 100 0 0 0
20-01 05:32:19|80.2M 34.3M 406M 472M| 20B 20B| 0 0 100 0 0 0
20-01 05:32:29|80.1M 34.3M 406M 472M| 292B 834B| 0 0 100 0 0 0
20-01 05:32:39|80.2M 34.4M 406M 472M| 725B 2184B| 0 0 99 0 0 0
20-01 05:32:49|80.2M 34.4M 406M 472M| 342B 327B| 0 0 100 0 0 0
20-01 05:32:59|80.1M 34.4M 406M 472M| 5B 5B| 0 0 100 0 0 0
@hutchic
hutchic / gist:99fe5a935dfab829c13b
Last active January 1, 2016 16:42
consul external service
curl -X PUT -d '{
"Datacenter": "default", "Node": "google",
"Address": "www.google.com",
"Service": {
"Service": "search",
"Port": 80
}
}
' http://127.0.0.1:8500/v1/catalog/register
@hutchic
hutchic / keybase.md
Created November 19, 2015 15:57
keybase.md

Keybase proof

I hereby claim:

  • I am hutchic on github.
  • I am hutchic (https://keybase.io/hutchic) on keybase.
  • I have a public key whose fingerprint is 8783 61CD 8173 1296 6EA3 15B8 D339 9218 3D79 E262

To claim this, I am signing this object:

Client version: 1.3.3
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 3ea0e03
OS/Arch (client): linux/amd64
Server version: 1.3.3
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): 3ea0e03
Step 0 : FROM centos:6
@hutchic
hutchic / gist:f9bb3786ddab563e6ce0
Created June 4, 2014 01:57
sudo pip3 install ocdev
vagrant@precise64:~$ sudo pip3 install ocdev
Downloading/unpacking ocdev
Downloading ocdev-0.0.10.tar.gz
Running setup.py (path:/tmp/pip_build_root/ocdev/setup.py) egg_info for package ocdev
Downloading/unpacking jinja2 (from ocdev)
Downloading Jinja2-2.7.2.tar.gz (378kB): 378kB downloaded
Running setup.py (path:/tmp/pip_build_root/jinja2/setup.py) egg_info for package jinja2
warning: no files found matching '*' under directory 'custom_fixers'
33.33.33.1 - - [18/Mar/2014 20:20:21] "GET /todos/todo1 HTTP/1.1" 500 -
Traceback (most recent call last):
File "/share/env/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/share/env/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/share/env/lib/python2.7/site-packages/Flask_RESTful-0.2.12-py2.7.egg/flask_restful/__init__.py", line 257, in error_router
return self.handle_error(e)
File "/share/env/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()