Created
October 5, 2024 09:03
-
-
Save xiaozhu2007/19e1c03d00978e91c0307e7d265bc20b to your computer and use it in GitHub Desktop.
此脚本通过提取 PM2 日志获取 OpenBMCLAPI 巡检的 IP
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
cat ~/.pm2/logs/run-sh-out.log | grep "warden" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort | uniq >> ~/ip-bmclapi-warden.txt | |
cat ~/.pm2/logs/run2-sh-out.log | grep "warden" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort | uniq >> ~/ip-bmclapi-warden.txt | |
# cat ~/bmclapi-warden.ip.txt | sort | uniq > ~/bmclapi-warden.ip.txt | |
# cat bmclapi-warden.ip.txt | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' | sort | uniq > bmclapi-warden.ip.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment