Skip to content

Instantly share code, notes, and snippets.

@wryfi
wryfi / lxc_load.py
Created October 16, 2012 23:34
simple python script to check cpu utilization of lxc containers and print percentage
#!/usr/bin/python
import multiprocessing, os, re, sys, time
cgroup_dir = '/sys/fs/cgroup'
node_rgx = u'[a-z]*[0-9]{2}'
interval = 1
def main():
cpus = multiprocessing.cpu_count()
@wryfi
wryfi / PKGBUILD
Created January 17, 2015 05:24
PKGBUILD for eclipse-pydev-3.9.0
# Maintainer: Arthur Zamarin <arthurzam@gmail.com>
pkgname=eclipse-pydev
pkgver=3.9.0
pkgrel=1
pkgdesc="Python IDE for Eclipse"
url="http://pydev.org/"
arch=('any')
license=('EPL')
depends=('java-environment>=7' 'eclipse>=3.8')
@wryfi
wryfi / salt
Created November 25, 2015 00:35
roles:
- graphite
- postgres
hosts:
- ns-101.soma.plos.org
secrets:
postgres:
root: "asdf1234"
#
# this file is managed by salt - manual changes will be overwritten
#
upstream elasticsearch {
server 127.0.0.1:9200;
keepalive 64;
}
# 8433 is wide open for logstash
server {
output {
if "metric" not in [tags] {
elasticsearch {
hosts => ['elasticsearch-101', 'elasticsearch-102', 'elasticsearch-103', 'elasticsearch-104']
user => "logstash"
password => "**********************"
cacert => "/usr/local/share/ca-certificates/ca.crt"
ssl => true
}
}
gitfs_remotes:
- git@github.com:FOO/salt-dev:
- root: states
- git@github.com:FOO/sudoers-formula.git
@wryfi
wryfi / solr.log
Created October 11, 2016 22:48
previous ephemeral node
INFO - 2016-10-11 22:46:39.658; [ ] org.eclipse.jetty.util.log.Log; Logging initialized @550ms
INFO - 2016-10-11 22:46:40.021; [ ] org.eclipse.jetty.server.Server; jetty-9.3.8.v20160314
INFO - 2016-10-11 22:46:40.057; [ ] org.eclipse.jetty.deploy.providers.ScanningAppProvider; Deployment monitor [file:///opt/solr/solr-6.2.1/server/contexts/] at interval 0
INFO - 2016-10-11 22:46:40.425; [ ] org.eclipse.jetty.webapp.StandardDescriptorProcessor; NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
WARN - 2016-10-11 22:46:40.445; [ ] org.eclipse.jetty.security.ConstraintSecurityHandler; ServletContext@o.e.j.w.WebAppContext@14bf9759{/solr,file:///opt/solr/solr-6.2.1/server/solr-webapp/webapp/,STARTING}{/opt/solr/solr-6.2.1/server/solr-webapp/webapp} has uncovered http methods for path: /
INFO - 2016-10-11 22:46:40.463; [ ] org.apache.solr.servlet.SolrDispatchFilter; SolrDispatchFilter.init(): WebAppClassLoader=1555690610@5cb9f472
INFO - 2016-10-11 22:46:40.491; [ ] org.
#!/bin/bash
# This is based on "preexec.bash" but is customized for iTerm2.
# Note: this module requires 2 bash features which you must not otherwise be
# using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. iterm2_preexec_install
# will override these and if you override one or the other this _will_ break.
# This is known to support bash3, as well as *mostly* support bash2.05b. It
# has been tested with the default shells on MacOS X 10.4 "Tiger", Ubuntu 5.10
# "Breezy Badger", Ubuntu 6.06 "Dapper Drake", and Ubuntu 6.10 "Edgy Eft".
### Keybase proof
I hereby claim:
* I am wryfi on github.
* I am wryfi (https://keybase.io/wryfi) on keybase.
* I have a public key ASA2gPybFWcheeLSnlHa4mWWtUmD0aeZ4oTaTVp19Ggt1Ao
To claim this, I am signing this object:
global:
scrape_interval: 15s
external_labels:
monitor: plos
scrape_configs:
- job_name: prometheus
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'node resources'