Digital Marketing

Bash script to check Linux performance

script -c 'bash --norc' /path/to/check_linux.txt PS1="\u@\H:\w [\t]\$ " date uname -a dmidecode -s system-product-name ls -1 /dev/disk/by-id/ uptime df -Th free -m mount | column -t top -b -n 4 -d 1 iostat -xctdk 3 20 vmstat 3 20 mpstat -P ALL 3 20 ifconfig ps auxfww | grep -E 'mysqld|ndbd|ndbmtd' lsof -s | grep -E 'mysqld|ndbd|ndbmtd' lsb_release --all lscpu cat /proc/cpuinfo cat /proc/meminfo cat /proc/vmstat sysctl -a | egrep -i "dirty|swappiness|file-max|threads-max" getenforce numastat numactl --show numactl --hardware cat /proc/sys/vm/numa_zonelist_order cat /etc/selinux/config cat /proc/meminfo| egrep -i "cached|dirty|writeback" cat /proc/vmstat | egrep -i "dirty|writeback" cat /proc/sys/vm/nr_pdflush_threads ulimit -a for pid in $(pidof mysqld) $(pidof ndbd) $(pidof ndbmtd); do echo "Limits for pid = ${pid}"; echo "========================"; echo; cat /proc/${pid}/limits; echo; echo; done dmesg egrep -i "error|fault|mysql|ndb|denied" /var/log/* exit


Popular posts from this blog

Make online money from the Internet