Month: June 2016

Great writeup on Linux memory management

…especially as it relates to committed memory… http://www.etalabs.net/overcommit.html int main() { void *m = malloc(6000*1024*1024); if (m) printf(“Memory allocation succeeded!\n”); else printf(“Memory allocation failed!\n”); //memset(m,0,2000*1024*1024); sleep(30); return 0; } [root@cmhlcarchapp01 ~]# sysctl -w vm.overcommit_memory=2 [root@cmhlcarchapp01 ~]# ./mem & [1] 7890…

SQL Server – querying active users by database

use master go declare @table table(         spid int,         status varchar(max),         login varchar(max),         hostname varchar(max),         blkby varchar(max),         dbname varchar(max),         command varchar(max),         cputime int,         diskio int,         lastbatch varchar(max),         programname varchar(max),        …

WLST script to take thread dumps

Quick wlst script to take thread dumps inside the running container… connect (‘weblogic’,’welcome1′,’t3://localhost:7001′) counter = 0 sleepTime = 5000 for counter in range(10): serverName = ‘AdminServer’ java.lang.Thread.sleep(sleepTime) fileName = ‘dump’ + serverName + counter + ‘.dmp’ threadDump(‘true’, fileName, serverName)