java -javaagent:jolokia-jvm-1.6.0-agent.jar=port=8888,host=0.0.0.0 -jar target/in.hack4geek.sppring2-1.0-SNAPSHOT.jar
java -jar jolokia-jvm-1.6.0-agent.jar start <pid/regex>
for already running processhttp://localhost:8778/jolokia/read/java.lang:type=Threading/ThreadCount
- Use visualVM or JvisulaVM to get the list of Mbeans.
- Mbean with value
http://localhost:8778/jolokia/read/java.lang:name=MarkSweepCompact,type=GarbageCollector
- The order matters
java.lang:name=MarkSweepCompact,type=GarbageCollector
if you try thisjava.lang:type=GarbageCollector,name=MarkSweepCompact
this fails curl "http://localhost:8778/jolokia/read/java.lang:name=MarkSweepCompact,type=GarbageCollector/LastGcInfo/memoryUsageBeforeGc" | jq
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
BOX_IMAGE = "ubuntu/xenial64" | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. |
SHOW TAG VALUES EXACT CARDINALITY WITH KEY = "index"
;SHOW SERIES CARDINALITY group by "measurement";
→ Important useful one.- influxdata/influxdb#8636 → Good examples are here
influx_inspect report -detailed /var/lib/influxdb/data/envoy/autogen/903
The best way to ficure out high cardinality series.- figure out series in each database
use _internal ; select * from "database" where time > now() - 900s limit 10;
Faced this error ERR: cannot delete data. DB contains shards using both inmem and tsi1 indexes. Please convert all shards to use the same index type to delete data.
find /var/lib/influxdb -type d -name index | while read index; do rm -Rf "$index" ; done
influx_inspect buildtsi -database envoy -datadir /var/lib/influxdb/data/ -waldir /var/lib/influxdb/wal
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
package io.opencensus.quickstart; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; |
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
#!/bin/bash | |
containers=$(docker ps -q) | |
for item in $containers | |
do | |
echo $item | |
echo $1 | |
docker exec $item netstat -tapln | grep :26379 | wc -l | |
done |
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
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |
- Iterm2
- Clipy
- liquidprompt
- devd
- ngrok
- secure pipe
- https://github.com/dvorka/hstr
- Install bash because mac ships with very old bash
- Modify Iterm to start with /usr/local/bin/bash
- Modify the f1 keys
beats {
host => "0.0.0.0"
port => "5044"
}
}
filter {
if [fields][log_producer] == "envoy" {
grok {
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
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |
curl -L -s 'https://registry.hub.docker.com/v2/repositories/envoyproxy/envoy/tags?page_size=100&page=4'|jq '."results"[]["name"]'