サイトのステータスコードを定期的に記録する
watch -n30 "curl -LkI 'https://XXX' -o /dev/null -w '%{http_code}\n' -s | xargs -L 1 -I '{}' date '+[%Y/%m/%d %H:%M:%S] {}' >> result.txt" - -n30・・・インターバル(秒)
- https://XXX・・・参照先
- result.txt・・・出力先
This post is licensed under CC BY 4.0 by the author.