There is no real purpose to this post, as I rarely if ever write C code for any useful purpose anymore. However, what I do use it for is better understanding Linux system calls and other various operations in the…
Category: Linux
Formatting garbage collection output with timestamps
If you are running a version of java where -XX:+PrintGCDateStamps is not honored, you can run what is below. For those that are unaware, by default garbage collection will print the seconds since the JVM process started. In the heat…
awk binary string to ascii string converter
There are probably better ways to this with lshift and rshift functions built into awk, but this is functional. { while (++i
Linux threads and CPU affinity
Linux provides native threading capabilities. This allows a program to run with multiple processes all accessing the same shared data, without the headache of Interprocess Communication (IPC) calls. Essentially, a single process makes calls to the system pthread library to…
How to find your Linux SMTP server
dig -t MX ${HOSTNAME#*.}
Printing counts of page requests
Simple post today, this just strips the request parameter string of a URL recorded in the Apache style log, and groups the times each base page was requested in sorted order. -bash-4.1$ grep -v login /opt/jboss/versions/jboss-eap-5.1/jboss-as/server/q_ecm_01/log/localhost_access_log.2012-12-12.log | grep jsp |…
Tracing SQL across the wire
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 | \ >…
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…