Author: Steve

Peoplesoft – Printing Balance sheet tree

with mytree as (select distinct tnode.tree_name, tnode.parent_node_num, tnode.tree_node_num, tnode.tree_node, tlvl.tree_level, glacct.account, glacct.account_type, tnode.parent_node_name, glacct.descr from sysadm.pstreenode tnode, sysadm.pstreeleaf tleaf, sysadm.ps_gl_account_tbl glacct, sysadm.pstreelevel tlvl where tnode.setid=tleaf.setid and tnode.tree_name=tleaf.tree_name and tnode.effdt=tleaf.effdt and tleaf.tree_node_num between tnode.tree_node_num and tnode.tree_node_num_end and glacct.account between tleaf.range_from and…

Programatically gathering a thread dump

This is just a method you could add to your software if you wish to trigger a thread dump in a controlled fashion. import java.sql.*; import java.lang.management.*; public class DebugLocks { public static String dumpThreads() { final StringBuilder dump =…

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…

JMeter AJAX example

I couldn’t find any complete AJAX examples. Most of them, including the one on blazemeter.com that provided the impetus for this post, don’t go far enough to include the cookies needed for the requests to work in most web application…

Powershell – Getting tables from a SQL Server database

c:\Users\adm-showard>powershell Windows PowerShell Copyright (C) 2009 Microsoft Corporation. All rights reserved. PS C:\Users\adm-showard> $sqlConn = New-Object System.Data.SqlClient.SqlConnection PS C:\Users\adm-showard> $sqlConn.ConnectionString = “Server=CMHWPSWSQL1201;Integrated Security=true;Initial Catalog=SWNetPerfMon” PS C:\Users\adm-showard> $sqlConn.Open() PS C:\Users\adm-showard> $sqlcmd = $sqlConn.CreateCommand() PS C:\Users\adm-showard> $sqlcmd = New-Object System.Data.SqlClient.SqlCommand PS C:\Users\adm-showard>…