Category: Operating Systems

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…

Configure Linux to authenticate with Active Directory

Install samba and krb from yum, then run the following… authconfig –disablecache \ –enablewinbind \ –enablewinbindauth \ –smbsecurity=ads \ –smbworkgroup=howard.local \ –smbrealm=HOWARD.LOCAL \ –enablewinbindusedefaultdomain \ –winbindtemplatehomedir=/home/%U \ –winbindtemplateshell=/bin/bash \ –enablekrb5 \ –krb5realm=HOWARD.LOCAL \ –enablekrb5kdcdns \ –enablekrb5realmdns \ –enablelocauthorize \ –enablemkhomedir…

Querying Active Directory from java

This is just a stub I often use when configuring AD authentication for various applications. Invariably, I can use this to quickly determine why a given application configuration may be failing. import java.util.Hashtable; import javax.naming.*; import javax.naming.directory.*; class TestAD {…

Where is a given thread connecting?

We start by getting the PID of our running JVM… -bash-4.1$ jps 29527 Main 3560 Jps …then we print each lightweight process (threads in our JVM) in which we are interested. In our case, these are threads with zafu in…