This file contains hidden or 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 | |
# docker logs example: | |
# 2023/12/30 19:37:09 In the last 1h0m0s, there were 62 connections. Traffic Relayed ↑ 1321997 KB, ↓ 165777 KB. | |
docker logs snowflake-proxy 2>&1 \ | |
| grep "Traffic Relayed" \ | |
| sed 's|^\(20[0-9]\{2\}/[0-9]\{2\}/[0-9]\{2\}\) .* there were \([0-9]\+\) connections. Traffic Relayed . \([0-9]\+\) \([KMG]\?B\), . \([0-9]\+\) \([KMG]\?B\).$|\1 \2 \3 \4 \5 \6|' \ | |
| awk ' | |
BEGIN { |