Created
April 19, 2019 10:07
ざっくりこんなふうに漁る
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 -v | |
# 参考: https://qiita.com/kanga/items/979b0bdc4653e025483a | |
# 参考: https://qiita.com/sasasin/items/f865848239e7b0a38e06 | |
echo "OSなどバージョン" | |
cat /etc/*release | |
echo "ストレージ構成" | |
df -h | |
cat /etc/fstab | |
echo "ユーザー権限" | |
cat /etc/sudoers /etc/sudoers.d/* | |
echo "ユーザーリスト" | |
cat /etc/passwd | |
echo "デーモン構成" | |
chkconfig | |
initctl list | |
systemctl list-units | |
echo "デーモン起動順序" | |
ls -alF /etc/rc.d/* | |
echo "調査時点に起動していたプロセス" | |
ps -auxfww | |
echo "ポート利用状況" | |
netstat -lnptu | |
echo "カーネルパラメータ" | |
cat /etc/sysctl.conf /etc/sysctl.d/* | |
echo "cron" | |
ls -alF /var/spool/cron/* /etc/cron* | |
cat /var/spool/cron/* /etc/cron* /etc/cron*/* | |
echo "yum/rpm パッケージインストール状況" | |
rpm -qa --last | |
echo "yum/rpm パッケージインストール履歴" | |
yum history list | |
MAX_HIST_NUM=$(yum history list | awk '$1 ~ /[0-9]/{print $1}' | head -n1) | |
yum history info 1..${MAX_HIST_NUM} | |
echo "セキュリティアプデ" | |
yum updateinfo list | |
yum updateinfo list --disablerepo epel-qt48 | |
echo "postfix設定ファイル" | |
find /etc/postfix -type f | |
find /etc/postfix -type f | xargs cat | grep -v -e '^\s*#' -e '^\s*$' | |
echo "mackerel設定ファイル" | |
find /etc/mackerel-agent -type f | |
find /etc/mackerel-agent -type f | grep -v example | xargs cat | |
echo "datadog設定ファイル" | |
find /etc/datadog-agent -type f | |
find /etc/datadog-agent -type f | grep -v example | xargs cat | |
echo "td-agent設定ファイル" | |
find /etc/td-agent -type f | |
find /etc/td-agent -type f | xargs cat | |
echo "nginx設定ファイル" | |
find /etc/nginx -type f | |
find /etc/nginx -type f | xargs cat | |
echo "NFS設定" | |
yum list installed | grep nfs | |
nfsstat | |
cat /etc/exports | |
exportfs -v | |
showmount -e | |
echo "言語処理系" | |
echo "ruby" | |
which ruby | |
ruby -v | |
which rbenv | |
echo "node、npm、yarn" | |
which node | |
node -v | |
which npm | |
npm -v | |
which yarn | |
yarn -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment