This can be really useful in place of database tracing, especially when you want to see the action the *application* takes, and not just what it does in the database. [user@************** common]# tcpdump -A -nn port 1521 | \ >…
Category: Operating Systems
Quiet svn+ssh
While issuing various svn commands and using the svn+ssh protocol, we found that the output of /etc/issue could really clutter up the screen. We added the following in the $HOME/.ssh/config LogLevel quiet This eliminated the output of /etc/issue.
Allowing oracle to read /var/log/messages
The system log sometimes contains important information for troubleshooting cluster issues. setfacl -m u:oracle:r /var/log/messages On RHAT, the ACL is preserved so when logrotate is run, oracle will be able to read the new /var/log/messages file and the “old” ones…
tcpdump to see Oracle errors
Not all exceptions are created equally, and most you can ignore (the one below you can, in general). However, if you have to troubleshoot on JBOSS (or anywhere a Linux application connects to an Oracle database), what is below is…
awk script to print blocked threads in a java thread dump
-bash-4.1$ cat blocked_threads.awk #!/bin/awk -f { if ($0 ~ “- locked” || $0 ~ “- waiting to lock”) { s[i++]=$0 } } END { for (i in s) { if (s[i] ~ “waiting to lock”) { split(s[i],t) for (j in…
Print thread dump for a single thread
We had an issue where a single thread was using all the CPU. We wanted to check it at the command line while troubleshooting. We used what is below… [atg@CMHLDECOMAP01 ~]$ jstack 3000 | awk ‘{if ($1 == “\”Thread-9\””) {i…
Open ports by interface
I often use what is below to get a listing of currently open ports by interface. If you find you can’t “see” a port from another computer, and… it is open on the IP to which you are trying to…
Reverse engineering a SQL replay script from a 10046 trace file
This will be the coup de grĂ¢ce (but in a good way:)) if I can ever finish it. I have wanted to do this for years, and keep getting closer. Search for awk 10046 in the search bar on this…
Printing execution times with associated bind variables
In a previous post, we showed how you can extract the count of executions of a given SQL statement for a given bind variable. We recently found a need to print each execution a given SQL statement with the bind…
Comparing RPM’s between servers
Periodically, I will want to compare the RPM installations between two or more servers. Sometimes, I may not care about the specific versions of each RPM, but only that *some* version exists. To do this, I can use awk and…