Thursday, November 27, 2014

vagrant+puppet+facter fqdn fix

A fix to the occasional vagrant puppet facter problem with facter not being able to find the fqdn

I don't get this all the time (e.g., I don't need this fix on my dev machine at work), but on my home laptops I always got "default: warning: Could not retrieve fact fqdn"

A point in the link above fixes this and now I'm able to build my vagrant dev environments at home.

in the Vagrantfile, set config.vm.hostname to the fqdn.  Previously, config.vm.hostname was just the bare hostname.  I think the issue here was that at work the domains for the VMs was the same as the domain of my host.  It may, therefore, have grabbed the domain name from the host and applied that to the VMs.

At home, of course, my domain isn't the same as at the office, so the building of the fqdn from the bare hostname and host's domain didn't work.

Or that may just be a rationalization :-).  In any case, it fixed my fqdn issue.

Thursday, October 16, 2014

Find matching XML/HTML/JSP tag in eclipse

Ctrl-Shift >

(that's the greater than sign).

That's very helpful.  It might break on JSPs where some tags are closed by includes, but that would be terrible style anyway, don't do that.

For matching braces, Ctrl-Shift P

Thursday, August 07, 2014

jmeter simple data writer configuration

Note to myself: for when using a simple data writer:

Minimal writer configuration.  Saves headers, URL, but not page content.


  1.  Save as XML
  2. Save Response Headers (XML)
  3. Save Response Code
  4. Save Label
  5. Save Success
  6. Save Time Stamp
  7. Save Request Headers (XML)
  8. Save Data Type
  9. Save Latency
  10. Save Thread Name
  11. Save URL
  12. Save Active Thread Counts
  13. Save Idle Time
  14. Save Assertion Failure Message
  15. Save Assertion Results (XML)
  16. Save Response Message
  17. Save Sub Results (XML) [but not their content]
  18. Save Elapsed Time
  19. Save byte count
  20. Save Sample and error counts
If the page content is needed, add "Save Sampler Data (XML)"



Tuesday, July 22, 2014

Limit CPU, memory, other resources available to an LXC instance

I saw this article on controlling container resources. That's very helpful, I'll be using that where previously I'd used VirtualBox (much too fat) for fine control on RAM and CPU allocated to a VM.

Show CPUs currently available to an instance:
  lxc-cgroup -n ol6ctr1 cpuset.cpus 0-7

Limit CPU time and block I/O

lxc-cgroup -n ol6ctr2 cpu.shares 256
lxc-cgroup -n ol6ctr2 blkio.weight 500

Limit RAM

lxc-cgroup -n ol6ctr2 memory.soft_limit_in_bytes 268435456
lxc-cgroup -n ol6ctr2 memory.limit_in_bytes 536870912

The settings can be made permanent by setting them in the lxc instance's config file, e.g.,

lxc.cgroup.cpuset.cpus=0,1
lxc.cgroup.memory.soft_limit_in_bytes=268435456
lxc.cgroup.memory.limit_in_bytes=536870912

The oracle article has a typo for the memory.limit_in_bytes example, it was missing the last digit (2). Fixed here.



Friday, July 04, 2014

install mint display manager on ubuntu 14.04

http://www.noobslab.com/2014/04/mdm-display-manager-and-mdm-themes-for.html

sudo add-apt-repository ppa:noobslab/mint sudo apt-get update sudo apt-get install mdm mdm-themes