Category: Linux

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…

Finding client side port in Oracle

select machine||’:’||port from gv\$active_session_history where machine like ‘%app01%’ and inst_id = 1″ | sort -u ———————————————————— MACHINE||’:’||PORT             hostname.domain:34218 MACHINE||’:’||PORT             hostname.domain:34252 MACHINE||’:’||PORT             hostname.domain:34312 MACHINE||’:’||PORT             hostname.domain:34313 MACHINE||’:’||PORT             hostname.domain:34314 MACHINE||’:’||PORT             hostname.domain:34317 MACHINE||’:’||PORT             hostname.domain:34319 MACHINE||’:’||PORT             hostname.domain:34326 MACHINE||’:’||PORT             hostname.domain:34328 MACHINE||’:’||PORT             hostname.domain:34331 MACHINE||’:’||PORT             hostname.domain:34332 MACHINE||’:’||PORT             hostname.domain:34334…

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…