This is a great interview question: How can there be child records where no parent exists? This is actually a trick question. There can exist child *records*, but no *values* for the column that references a non-existent parent. In other…
Author: Steve
Weblogic stuck thread printer
This is a useful script for crawling the Weblogic domain logs and printing threads that have been stuck, as well as the duration they were stuck. It doesn’t include the initial ten minute (default) window before a log entry is…
JNLP Example
Java Web Start is the technology that allows a user to run java from their local device. The software that is run is loaded from a server via a directive in a JNLP file on the server. It is downloaded…
Getting window size from raw packet capture
tcpdump shows the unscaled window size. It is important to note that the value of wscale is not the value by which to multiply, it is the bits that are set on the scaling factor, as it uses binary math.…
wireshark, python, and Excel for graphing TCP window sizes
Filter the packets in which you are interested. In this case, we filter on the source IP… …then export the packets to a CSV file… …which we then parse in python to produce another CSV file… f = open(“good.csv”,”w”) for…
Oracle materialized view and query rewrite
Just a simple example to show what it takes to get this to work… SQL> set lines 1000 trims on pages 100 SQL> explain plan for select count(*) from member; Explained. SQL> select * from table(dbms_xplan.display()); PLAN_TABLE_OUTPUT ——————————————————————————– Plan hash…
SQL elapsed time over a small specific time window
This is a great quick script to identify those statements taking the most time over a small time window. It’s a good “911” type script. This will print those statements that have a total elapsed execution time of the percentage…
Can hosts in same subnet ping each other if in different VLAN’s?
Short and sweet, no! In the example above, Laptop0 and Laptop2 are in VLAN1, while Laptop1 and Laptop3 are in VLAN2. We apply the same network and subnet mask (192.168.1.1 and 255.255.255.0) to each VLAN. We assign the Laptop’s address…
What is the most likely dice roll?
Probably common sense, but this statistically supports the most common roll of the dice. Of course, this assumes physical normalcy of the die, not loaded, etc. 🙂 [root@cmhlcanlyodb01 ~]# cat rand.py import random d = dict() for i in range(1,100001):…
CRC check on gzip files in HDFS
I am sure there is a more elegant way to do this, but I wanted it done quickly. We had a few files that threw exceptions about the end of the file being reached (CRC failure) for external files underlying…