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
sudo docker-compose ps | grep Up | awk '{print $1}' | tr "\\n" " " | xargs --no-run-if-empty sudo docker stats |
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
//This function was used in my test rig to convert elasticsearch results to a KML structure which is | |
// later fed to an iFrame wrapping the GoogleEarth plugin | |
var data=[]; | |
var buckets=inData.aggregations.map.buckets; | |
function addCommas(nStr) | |
{ | |
nStr += ''; |
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
-- PostgreSql | |
SELECT | |
pg_database.datname AS "Database Name", | |
pg_database_size(pg_database.datname) / 1024.0 / 1024.0 AS "Database Size (MB)" | |
FROM pg_database; | |
-- MySql | |
SELECT | |
table_schema "Database Name", | |
sum( data_length + index_length ) / 1024 / 1024 "Database Size (MB)" |