Wednesday, February 1, 2012
emacs usb foot switch
Tuesday, January 24, 2012
DNS TTL Cheat Sheet
When lowering the TTL I end up having to ask someone or look it up enough that I'm posting this cheat sheet for myself to search in the future. So if a longer TTL is inherited from the top of the zone file and foo.tld inherits that time it would look like the following:
foo A 123.456.7.8To lower it's TTL to one hour I simply insert the time with units (else it's seconds) in between the hostname and the A:
foo 1h A 123.456.7.8Then after reloading the zone file query that DNS server for the name:
dig @123.456.2.1 foo.bar.comand make sure the ANSWER section contains 3600, which is the number of seconds in an hour:
;; ANSWER SECTION: foo.tld. 3600 IN A 123.456.7.8
Monday, January 16, 2012
svn2git
Nothingmuch's Migrating from Subversion to Git worked for me for two SVN repos that I'm actively working on.
Quick notes:
yum install git-svn git svn clone --prefix=svn/ --stdlayout --authors-file=authors.txtThis makes a clean git repo complete with tags, branches, and history. Now set the "central" repo location :git svn-abandon-fix-refs git svn-abandon-cleanup
git remote add originfinally, push it up to the server :git config branch.master.remote origin git config branch.master.merge refs/heads/master
git push origin master
Sunday, December 18, 2011
Mac 10.7, python-ldap, MySQL-python, homebrew
Wednesday, November 9, 2011
RHEL6 latency on Dell M610: C States
We ran into latency problems on Dell M610 servers using RHEL6 while RHEL5 performed perfectly. The RHEL6 stock kernel has a module called intel_idle which ignores Dell's BIOS settings to disable C-states. We've set the following in the tail of the boot line in /etc/grub.conf and so far so good.
intel_idle.max_cstate=0 processor.max_cstate=1When I started here six years ago we had a DNS server with a similar problem solved basically the same way; with a "acpi=off" to disable ACPI.
Update: The above seems to have helped servers connected to the SAN but not one which just uses the local disk. RedHat had some interesting tweaks to try with MegaCli, hdparm, and the scheduler as they think it's IO related:
Set policy to cache data:
# MegaCli64 -LDSetProp -Cached -LAll -aAllEnable disks' cache:
# MegaCli64 -LDSetProp EnDskCache -LAll -aAll # MegaCli64 -LDSetProp ADRA -LALL -aALLEnable write cache, but first verify if the controller is battery backed:
# MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 | grep -e '^isSOHGood' -e '^Charger Status'If the above results display no BBU, do not proceed.
If we have a battery backed controller, enable write cache.
# MegaCli64 -LDSetProp WB -LALL -aALLIf battery fails or is discharged, disable write cache:
# MegaCli64 -LDSetProp NoCachedBadBBU -LALL -aALLVerify policy is Enabled:
# MegaCli64 -LDInfo -LAll -aAll |grep 'Disk Cache'Disk Cache Policy: Enabled
Disable local device caching:
# hdparm -W0 /dev/sda- Add the above to /etc/rc.local to persist reboots.
Edit /etc/fstab and modify the mount options, ie: /dev/mapper/vg_root-lv_root / ext4 defaults,nobarriers,data=writeback 1 1 ... ...The filesystem(s) would need be remounted for changes to take effect.
Next, we will change the scheduler to Deadline.
# echo 'deadline' > /sys/block/sda/queue/scheduler # echo 200 > /sys/block/sda/queue/iosched/read_expire # echo 500 > /sys/block/sda/queue/iosched/write_expire- Add the above commands to /etc/rc.local to persist reboots.