Oracle Systems DBA Reference

Database, UNIX, etc. @ 15zips

UNIX

Help troubleshooting networks, port issues, traffic, etc.

On Solaris: snoop -o /tmp/my_snoop.out port 1521 On Linux: lsof > /tmp/my_lsof.out Linux – IP tables can cause issues. Details are only read-only by root. Config files are: /etc/sysconfig/iptables /etc/sysconfig/ip6tables Had trouble getting tcpdump to work on Linux, but should be useful. See related link for more info.

Testing the HTTP and HTTPS ports for issues (using wget).

wget https://oid2.xxx:3872/emd/main –09:59:28– https://oid2.xxx:3872/emd/main => `main’ Resolving oid2.xxx… {IP} Connecting to oid2.xxx|{IP}|:3872… failed: Connection refused.

How to translate sd## to a disk name more recognizable?

Use this to see the sd disk: iostat -xtc Use this to see the same command, but with sd translated to ‘cXtX…’: iostat -ixtc Then use df -k to see what is mounted on that disk. Other iostat command as of 12/03/09: Use: iostat -dzxn 10 # metastat -s dw-stor

To find the 10 biggest folders in your current working path (Linux):

du -x –block-size=1024K | sort -nr | head -10

Using ‘awk’ (an example)

ps -aef|grep oem10g| awk ‘{print $2}’ > /tmp/my_output.lst

Kernel Architecture? Kernel version? Linux RedHat Release?

rpm -qf /boot/vmlinuz-`uname -r` –queryformat “%{ARCH}\n” uname -r cat /etc/redhat-release or lsb_release -irc

Trace Network Routes

netstat -rnv

NFS on Sun

From SUN: /etc/dfs/dfstab (add entries) exportfs (entry> share (shows entries) /etc/init.d/nfs.server start To SUN: mkdir for mounts add to /etc/vfstab add entry to /etc/hosts mount

llsr (Recursive List – sort showing largest files first)

alias llsr=’ls -alRF $* | sort -nr -k 5 | more’

BACKGROUND Jobs

Job in background (UNIX) job_in_bkgd > log 2>&1 &

Previous Posts Next posts