Last active
September 23, 2020 13:28
-
-
Save adrianriobo/390ac32e9778a6f8d2cbbd26ea4140b7 to your computer and use it in GitHub Desktop.
Some linux commands on troubleshooting
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
#Download certs from site | |
echo "" | openssl s_client -host {HOST} -port 443 -showcerts | awk '/BEGIN CERT/ {p=1} ; p==1; /END CERT/ {p=0}' > allcerts.pem | |
#Import certs | |
keytool -import -alias your-alias -keystore cacerts -file certificate.der |
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
#Release memory on Linux: | |
echo 3 > /proc/sys/vm/drop_caches | |
#Check IO usage on CPU: | |
iostat -x 2 5 | |
#Check ports: | |
sudo lsof -i :5672 | grep LISTEN | |
#File max size | |
du -a /var | sort -n -r | head -n 10 | |
# Check last reboots | |
who -b | |
last reboot | less | |
# Check ports and linked processes | |
ss -l -p | |
# Filter traffic | |
tcpdump -i eth1 port XXXX -w file | |
# Check License | |
rpm -qa --queryformat '%{name},%{version},%{license}\n' | grep GPLv3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment