Category: Shell scripting

Formatting netstat output

We had a need to ingest open sockets into Splunk so we could map our integration points across the enterprise. We came up with what is below. This will show if the host on which it is run is a…

awk statistical functions

We had already written an awk script to pull durations for a particularly slow web service call. We wanted to understand the distribution of the response times. Often, the average is high, but it is skewed by a number of…

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…