Puppet Slow With Processing Directory with ‘recurse => true’

The Problem Puppet allows deploying a structure of directories and files conveniently using the file resource. Using the attributes 'source => …' and 'recurse => true', it is possible to create a copy of a set of files stored in the puppet module on target servers. Unfortunately, using these attributes can slow down puppet significantly … Continue reading Puppet Slow With Processing Directory with ‘recurse => true’

Get Free Memory on Unix System in Java

Background The opsunit framework allows to continuously run a number of JUnit unit tests and do some maintenance/repair work upon any failed test. The latest addition to the test suite for the Appjangle platform is a simple unit test, which checks the remaining free memory on the server node. If the free memory goes beyond … Continue reading Get Free Memory on Unix System in Java

Java Get Process Id: Three Approaches

Java provides no robust way to obtain the id of the OS process in which the application is running. That does not mean, however, that there is no way. There are actually a couple of ways, each with its own advantages and disadvantages. I will describe three possible ways in the following: 1. ManagementFactory.getRuntimeMXBean().getName() The … Continue reading Java Get Process Id: Three Approaches