Last active
November 8, 2018 03:43
-
-
Save sherwind/94b6c5f4bb78f8e46ac2b09d4c834fa5 to your computer and use it in GitHub Desktop.
sysinfo.sh
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 | |
| # based on https://access.redhat.com/solutions/3592 | |
| PROCPS_USERLEN=18 w -i > w.$(date +%Y%m%d%H%M) | |
| ps auxfww > ps.$(date +%Y%m%d%H%M) | |
| lsof -nP > lsof.$(date +%Y%m%d%H%M) | |
| sysctl -a > sysctl.$(date +%Y%m%d%H%M) | |
| ip addr > ipaddr.$(date +%Y%m%d%H%M) | |
| ip rule > iprule.$(date +%Y%m%d%H%M) | |
| ip route > iproute.$(date +%Y%m%d%H%M) | |
| ifconfig > ifconfig.$(date +%Y%m%d%H%M) | |
| cat /proc/mounts > mount.$(date +%Y%m%d%H%M) | |
| df -h > df.$(date +%Y%m%d%H%M) | |
| lsblk > lsblk.$(date +%Y%m%d%H%M) | |
| blkid > blkid.$(date +%Y%m%d%H%M) | |
| fdisk -l > fdisk.$(date +%Y%m%d%H%M) | |
| command -v parted >/dev/null 2>&1 && parted -l --script > parted.$(date +%Y%m%d%H%M) | |
| netstat -nplvA inet,inet6 > netstat.$(date +%Y%m%d%H%M) | |
| ulimit -a > ulimit.$(date +%Y%m%d%H%M) | |
| uname -a > uname.$(date +%Y%m%d%H%M) | |
| lsmod > lsmod.$(date +%Y%m%d%H%M) | |
| lspci > lspci.$(date +%Y%m%d%H%M) | |
| chkconfig --list > chkconfig.$(date +%Y%m%d%H%M) | |
| command -v systemctl >/dev/null 2>&1 && systemctl list-unit-files > systemctl.$(date +%Y%m%d%H%M) | |
| dmesg > dmesg.$(date +%Y%m%d%H%M) | |
| dmidecode > dmidecode.$(date +%Y%m%d%H%M) | |
| free > free.$(date +%Y%m%d%H%M) | |
| hostname > hostname.$(date +%Y%m%d%H%M) | |
| cat /proc/meminfo > meminfo.$(date +%Y%m%d%H%M) | |
| cat /proc/cpuinfo > cpuinfo.$(date +%Y%m%d%H%M) | |
| uptime > uptime.$(date +%Y%m%d%H%M) | |
| iptables-save > iptables.$(date +%Y%m%d%H%M) | |
| ip6tables-save > ip6tables.$(date +%Y%m%d%H%M) | |
| yum list > yum-list.$(date +%Y%m%d%H%M) | |
| rpm -qa > rpm-qa.$(date +%Y%m%d%H%M) | |
| rpm -Va > rpm-Va.$(date +%Y%m%d%H%M) | |
| command -v dpkg >/dev/null 2>&1 && dpkg --list > dpkg--list.$(date +%Y%m%d%H%M) | |
| command -v debsums >/dev/null 2>&1 && debsums > debsums.$(date +%Y%m%d%H%M) | |
| command -v brctl >/dev/null 2>&1 && brctl show > brctl.$(date +%Y%m%d%H%M) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment