…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…
Category: Operating Systems
You (username) are not allowed to access to (crontab) because of pam configuration.
Check the password expiration settings for the user… [hdfs@cmhlpdlakedg01 tobe]$ crontab -e Authentication token is no longer valid; new one required You (hdfs) are not allowed to access to (crontab) because of pam configuration. [hdfs@cmhlpdlakedg01 tobe]$ [root@cmhlpdlakedg01 log]# chage -l…
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…
Determining the order of java classes called
I thought this was pretty interesting, and perhaps incredibly useful. While attempting to understand the call stack (and being too lazy to read through reams of source code), I found that calling a java class will result in stat() system…
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 {…
Wrong permissions on /tmp cause havoc with java
We had a server that had been behaving oddly since at least April. I finally discovered why. jps returns nothing, which is the first symptom. When we strace, we see it can’t write to /tmp (our setting for java.io.tmpdir), so…
Does java reuse closed sockets when the host still has one open?
We were curious as to what the handoff is between an application that opens a network socket, and how the Linux OS handles it. Let’s assume we do what is below: import java.net.*; public class checkSocket { public static void…
net.ipv4.ip_no_pmtu_disc and don’t fragment
We received an email asking that we restart a given server as the ATG lock manager had a required lock and a scheduled job could not move forward. I don’t like to do that without some triage. We were stuck…
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…
Installing a specific kernel related package without upgrading the kernel
If you simply type “yum install package_name”, you will get the most recent version available in the package repository to which you are pointing. If this is a kernel related package, you can inadvertently upgrade the kernel, which may be…