Author: Steve

Java garbage collection stats

jstat -gcutil -t 18987 1000 where 18987 is the java PID, and 1000 is the number of milliseconds (1 second) between samples 896794.7 0.00 0.00 4.01 5.63 98.94 9259 282.051 250 336.211 618.262 896795.7 0.00 0.00 5.31 5.63 98.94 9259…

Splunk query to group URI request by first three IP address octets

We needed this to understand the source of a large influx of requests for a given URI pattern. import splunklib.client as client import splunklib.results as results service = client.connect(host=”*******”,port=”8089″,username=”showard”,password=”************”) job = “”” search host=\”cmhlpecomweb*\” sourcetype=access_combined karlie-kloss | eval temp=split(_raw,\”\t\”) |…

awk date math

Just a reference post for how to determine the number of seconds between two date strings in awk. If you have a normally formatted date string in Linux, such as “Sun Mar 19 00:50:33 EDT 2017”, you can convert this…

Adding a system call to Linux

These are *old* notes (2010 or so). I remember doing this, and it was interesting enough that I thought I should post it. It may be easier now. I experimented with the following on CentOS 5.1 running on an i686…