Skip to content

Instantly share code, notes, and snippets.

@adrianriobo
Last active September 23, 2020 13:28
Show Gist options
  • Save adrianriobo/390ac32e9778a6f8d2cbbd26ea4140b7 to your computer and use it in GitHub Desktop.
Save adrianriobo/390ac32e9778a6f8d2cbbd26ea4140b7 to your computer and use it in GitHub Desktop.
Some linux commands on troubleshooting
#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
#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