Wednesday 23 October 2013

some useful redhat commands

Check Main IP and aliases

watch /sbin/ifconfig

Check Physical/Virtual/Manufacturer/Serial

/usr/sbin/dmidecode | less

Check scheduled tasks

crontab -l

Check RedHat Version

cat /etc/redhat-release


How to check esx version
vmware -v
vimsh -n -e 'hostsvc/hostsummary' | grep fullName
cat /proc/vmware/version


Check Apache version
/usr/sbin/httpd -v


Detect Jboss version
ls -l /usr/jboss
ls /usr/ | grep jboss

Detect java version
java -version

Detect mysql version
mysql -V
"mysql  Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (i686) using readline 5.0"

Detect oracle
. oraenv
bct1
sqlplus "/ as sysdba"
select * from v$version where banner like 'Oracle%';

Detect f-prot version
/usr/local/f-prot/fpscan --versio

Amazon aws say they are not compatible with Cisco ASA versions older than 8.3

So make sure you update your ASA. This way they can't dodge support. The problem there is the difference in the way the NAT works. You are just going to have to get in there and convert the config and re-do all the NAT's.

Wednesday 16 October 2013

tailing the squid logs for hosts with the most sessions

tail -5000 /var/log/squid/access.log | grep 'website.name' | awk -F " " '{print $3}' | sort -nr | uniq -c | more