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 main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
// test it: | |
// eval printf '...............%s\\n' `printf '{#..$}%.0s' {1..16}` | go run buggy.go |
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
while true; do top -b -p 12472 -n1 | tail -1 >> cpuhog.log ; sleep 1; 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
#!/bin/bash | |
echo "Execution time:$(date)" | |
#step 1: get an approximation of the server date in millis | |
DATE0=`curl -s -H "Content-Type: application/json" http://localhost:8080/query/metrics -d '{"range": {"type": "relative", "unit": "SECONDS", "value": 1}}' | jq -r '.range.end'` | |
echo "Now: $DATE0" | |
#step 2: call write API |