Morgajel.net
  • Posts

Posts

November 24, 2013

Beating Nook2Android into Submission

Jackie has been asking for a while to convert her nook color (bnrv200) to android, so I finally decided to take it on (since I was on vacation). Rather than muddle through piecing together details from 100 sources- I took the “easy” route and used nook2android. Since I wanted to do this now rather than in a few days, I bought the installer rather than a pre-installed card. Should be simple, right?
read more
October 30, 2013

That stupid little vim slug: modeline

I can never remember the name of modeline for some reason- I always call it a slug. Here is the proper syntax for it as found here: /* vim: set sw=2: */ Now the next time I google for “Vim slug” this page will come up and I can feel dumb all over again.
read more
October 30, 2013

Find out the DN for a user in Active Directory

It is usually a pain in the butt to figure out how to find the DN of a user and I can never remember how I did it; Fortunately I stumbled across this link which gives the following advice: You may be asked to define a DN so that a service can bind to it to authenticate a query. Each user in Active Directory has a distinguished name. However, you cannot find it through the ADUC tool.
read more
October 29, 2013

Unlock Admin account on Puppet Enterprise Via the Command Line

Long Version Backstory time! I’m currently in the process of implementing a new Configuration Management system. Since this will only cover a small subsection of servers, I opted to go with Puppet Enterprise (PE). As part of the installation, it asks you for your email address to use as a username- I used my work address. After getting it installed and configured, I thought it would be a good idea to auth off of Active Directory; I forgot to disable the internal account when doing this, meaning there were two jmorgan@foo.
read more
September 10, 2013

JVM Thread CPU details using PS and LWP

First, capture a threaddump from your process (jvisualvm, kill -3 or jstack should do the trick). At the same time, get a list of the LWP threads from PS for your process ps -eLo pid,lwp,nlwp,ruser,pcpu,stime,etime,args -p {PID} >lwpthread.txt Once you have it, sort by CPU utilization and tail the list to get the worst four offenders: cat lwpthread.txt |sort -n -k 5,5 |tail -n 4 |awk '{print $2}' |xargs Now take the resulting list and throw it in a loop and convert them to hex (note, it must be lowercase!
read more
June 10, 2013

Resolved: JBoss EAP 6 threads leaking with Mod_Cluster?

Ever notice that your new EAP implementation appears to be leaking threads? Thread dump pointing to AJP? Does your thread usage resemble the graphs on the top, continuously climbing? Fortunately, the solution is simple- JBoss and mod_cluster are too brain damaged to account for Apache HTTPD timing out threads and closing them down, so it leaves them having open forever rather than have a sane (or even insane) default timeout. To work around this, add the following to your system-properties in your host.
read more
June 6, 2013

Resolved: JMeter JSESSIONID keeps changing between pages on JBoss and Mod_Cluster

The problem isn’t with your server, it’s with your cookie manager. Make sure you’re using the default Cookie Policy with the HC4CookieHandler implementation. Leave a comment if this helped you out. it took an hour of searching to figure it out…
read more
May 20, 2013

Rackspace/RHN ID Fact for Puppet/Facter

Having your RHN/Rackspace ID available as a fact is very useful. Here’s an “easy” way to get it (just don’t ask me how long it took me to wrestle it out of REXML). # rackspaceid.rb Facter.add("rackspaceid") do setcode do require "rexml/document" xml = File.read('/etc/sysconfig/rhn/systemid') root= REXML::Document.new(xml) rsid=1 root.elements['params/param/value/struct'].each do |member| if member != "\n" and member.elements['name'].text == 'profile_name' rsid = member.elements['value/string'].text end end rsid # puts rsid end end
read more
May 19, 2013

Adventure: Strange Vault of Hatane Baequispear

Here’s a writeup for a new campaign I’m putting together: Long ago, a power elven mage Hatane Baequispear lost a one-sided war with the regional mage’s guild. When he was eventually captured and executed for his supposed crimes, he left his tower behind. Frustrated that the tower was empty, the guild had it torn down. They did not realize that the tower was simply a door to his true sanctum.
read more
May 6, 2013

JVM monitoring via SNMP of JBoss EAP 6 worker nodes with pnp4nagios Template

So, you want to monitor your workers via SNMP in EAP 6 like you could with JBoss 4.x or Tomcat? Here’s the secret. This is the configuration for domain mode, but standalone is probably pretty close. Configuring JVM SNMP In domain.xml, you need to add the following system-properties(make sure to create an snmp.acl file someplace with super-restrictive permissions, otherwise the jvm will get really pissy): <system-properties> ... <property name="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/> <property name="jboss.
read more
  • ««
  • «
  • 3
  • 4
  • 5
  • 6
  • 7
  • »
  • »»
© Morgajel.net 2024