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 bash | |
set -euo pipefail | |
readonly NODE_PATH="/home/iota/node" | |
readonly IOTA_ENV_FILE="$NODE_PATH/iota.env" | |
readonly SCRIPT_NAME=$(basename $0) | |
function get_latest_github_release { | |
curl -s https://api.github.com/repos/iotaledger/iri/releases/latest | jq "[.assets][0][2].name" --raw-output |
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 bash | |
CGROUPS_MEM=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) | |
MEMINFO_MEM=$(($(awk '/MemTotal/ {print $2}' /proc/meminfo)*1024)) | |
MEM=$(($MEMINFO_MEM>$CGROUPS_MEM?$CGROUPS_MEM:$MEMINFO_MEM)) | |
JVM_HEAP_RATIO=${JVM_HEAP_RATIO:-0.5} | |
XMX=$(awk '{printf("%d",$1*$2/1024^2)}' <<<" ${MEM} ${JVM_HEAP_RATIO} ") | |
echo "-Xmx${XMX}m" |
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
{"dashboard":{"__inputs":[{"name":"Prometheus","label":"Prometheus","description":"","type":"datasource","pluginId":"prometheus","pluginName":"Prometheus"}],"__requires":[{"type":"grafana","id":"grafana","name":"Grafana","version":"5.2.3"},{"type":"panel","id":"graph","name":"Graph","version":"5.0.0"},{"type":"datasource","id":"prometheus","name":"Prometheus","version":"5.0.0"},{"type":"panel","id":"singlestat","name":"Singlestat","version":"5.0.0"}],"annotations":{"list":[{"builtIn":1,"datasource":"Prometheus","enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","limit":100,"name":"Annotations & Alerts","showIn":0,"type":"dashboard"}]},"editable":false,"gnetId":null,"graphTooltip":1,"id":null,"links":[],"panels":[{"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":128,"title":"Common Field Stats","type":"row"},{"cacheTimeout":null,"colorBackground":false,"colorValue":true,"colors":["#299c46","rgba(237, 129, 40, 0.89)","#d44a3a"],"datasource":"Prometheus","decimals":2,"format":"none","gauge":{"maxValue":100,"m |
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
{"dashboard":{"__inputs":[{"name":"Prometheus","label":"Prometheus","description":"","type":"datasource","pluginId":"prometheus","pluginName":"Prometheus"}],"__requires":[{"type":"grafana","id":"grafana","name":"Grafana","version":"5.2.2"},{"type":"panel","id":"graph","name":"Graph","version":"5.0.0"},{"type":"datasource","id":"prometheus","name":"Prometheus","version":"5.0.0"},{"type":"panel","id":"singlestat","name":"Singlestat","version":"5.0.0"}],"annotations":{"list":[{"builtIn":1,"datasource":"Prometheus","enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","type":"dashboard"}]},"description":"Nearly all default values exported by Prometheus node exporter graphed.","editable":false,"gnetId":1860,"graphTooltip":0,"id":null,"iteration":1535500384018,"links":[],"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":261,"panels":[],"repeat":null,"title":"Basic CPU / Mem / Disk Gauge","type":"row"},{"cacheTimeout":null,"colorBackground":false,"colorValue" |
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
{"dashboard":{"__inputs":[{"name":"Prometheus","label":"Prometheus","description":"","type":"datasource","pluginId":"prometheus","pluginName":"Prometheus"},{"name":"127.0.0.1:9100","type":"constant","label":"Node","value":"127.0.0.1:9100","description":""}],"__requires":[{"type":"grafana","id":"grafana","name":"Grafana","version":"5.2.2"},{"type":"panel","id":"graph","name":"Graph","version":"5.0.0"},{"type":"datasource","id":"prometheus","name":"Prometheus","version":"5.0.0"},{"type":"panel","id":"singlestat","name":"Singlestat","version":"5.0.0"}],"annotations":{"list":[{"builtIn":1,"datasource":"-- Grafana --","enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","type":"dashboard"}]},"description":"","editable":false,"gnetId":null,"graphTooltip":1,"id":null,"iteration":null,"links":[],"panels":[{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":93,"panels":[],"repeat":null,"title":"IRI Node Stats","type":"row"},{"cacheTimeout":null,"colorBackground":false,"co |
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
04e5f962a0d64dfba97cb19871d171bfc9cc472c49d373a121a1b37f5466d6b133574d6c87ecda8d0d9a75e8ee6efdfefca8ca0fca2a10bffb85a24a156e709b2a;pkshankle |
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 bash | |
set -euo pipefail | |
readonly SYSTEMD_CONFIG="/lib/systemd/system/iota.service" | |
readonly SCRIPT_NAME=$(basename $0) | |
function get_latest_github_release { | |
curl -s https://api.github.com/repos/iotaledger/iri/releases/latest | jq "[.assets][0][0].name" --raw-output | |
} |
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
function docker-start { | |
typeset vm=${1:-default} sts | |
case $vm in | |
-h|--help) | |
echo $'usage: docker-start [<vm>]\n\nEnsures that the specified/default Docker VM is started\nand the environment is initialized.' | |
return 0 | |
;; | |
esac | |
sts=$(docker-machine status "$vm") || return | |
[[ $sts == 'Running' ]] && echo "(Docker VM '$vm' is already running.)" || { |