Weblog Super Cache Issue

On this site I run weblog with automatic updates enabled. I noticed, about a week or so ago, that I saw the following at the top of all of my pages:

define( ‘WPCACHEHOME’, ‘/home/bsdman/it.thelibrarie.com/weblog/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager

Well that’s less than fun, but I don’t really care enough to fix it. Unless that’s also screwing with the CSS and making it difficult to see the entire article under the theme I use… The scroll bar was present, but the bottom of the page cut off a lot of the instructions. Awesome.

Lots of searching and I find out that member “stealingsand” is very helpful. http://wordpress.org/support/topic/warning-wp-super-cache-caching-broken-the-script-advanced-cachephp-could-not

I performed the following:
SSH into your box
nano /weblog/wp-config.php

define( ‘WPCACHEHOME’, ‘/home/bsdman/it.thelibrarie.com/weblog/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager

This was listed at the top instead of after the ?php section. I just moved it down with the other defines, saved, and exited. Fixed!

iSCSI and iSCSIadm

On a development Oracle environment we were running Oracle (RHEL 6.x) on a Dell PowerEdge R510 server and connected via iSCSI to a SuperMicro NAS (Nas4Free 9.1.x) on a bonded 1Gb ethernet switch (LACP on Cisco). We then changed out the one SuperMicro NAS for an updated and larger NAS and reconnected to the Oracle environment. Unfortunately we also saw attempts to contact the old/retired NAS on iSCSI.

View all iSCSI sessions
iscsiadm -m session

tcp: [2] 10.10.0.137:3260,1 iqn.2013.us.temp.zfs.freenas1:disk0
tcp: [3] 10.10.0.138:3260,1 iqn.2014.us.temp.zfs.freenas2:disk0

Logout of an iSCSI connection
iscsiadm -m node --targetname "iqn.2014.us.temp.zfs.freenas2:disk0" --logout

Logging out of session successful

Discover all available iSCSI on a host
iscsiadm -m discovery -t st -p IPADDRESSOFHOST_ORGROUP

Login to all discovered iSCSI
iscsiadm -m node --loginall=all

Login to specific iSCSI target
iscsiadm -m node -T FQN_IQN:DISK_NUMBER -l -p IPADDRESSOFHOST_ORGROUP

Linux Copy Changed Files

I had a CentOS box that needed to backup files to another NAS system.

So I ran the following:
cp -rufT /source/dir/ /mnt/nas/dest/dir/
Everything copied without a hitch. I then edited one of the files and ran the copy command again. I was greeted with:

cp: overwrite ‘/mnt/nas/dest/dir/file’?

I forgot that CentOS, among other major providers, has an alias for the ‘cp’ command when running as root.

nano /root/.bashrc
Comment out the cp line
Rerun the copy command

Cisco Callmanager Custom Ringtone

I’ve verified the steps work (with some deviation required) for CM 4.x through 8.x

As I have access to both Windows and Linux, I have directions that may utilize either one of these platforms.

Save your file as a .wav. I ended up using VLC Player to convert/stream to a .wav file.

On linux (with sox installed)
sox -t wav MYWAVEFILE.wav -t raw -r 8000 -U -b 8 -c 1 NEWFILE.raw resample -ql

Next steps are not well described, but I may expand them later.

Open your callmanager web page
Login on the OS Administration portal
Grab the ringtone.xml file (mine was in the / dir) (TFTP files)
Edit this based on your current ring tone files (follow along like a template)
Upload both the newly edited ringtone.xml and the ringtone.raw
Login on the Unified Serviceability portal
Tools > Services Feature
Restart the TFTP service

Check your phone and verify you can see the new ringtone. I found that certain models (7940) didn’t like ringtones longer than ~5 seconds whereas others (7945) were totally fine.

Chrome Resolving Host Slow Loading

Running Windows 7 Ent x64 fully patched. I noticed that chrome would take a while to open pages – even pages that I had already visited during the day – and I figured there was a problem with my system.

Windows updates had recently patched the system
McCrappy had been removed in favor of Kaspersky
Chrome had been updated to the latest version
Java/Flash/etc were already all up to date

Long story short, I disabled the Built-in Asynchronous DNS functionality of Chrome and noticed a substantial speed difference (gain).

Open a chrome window
navigate to chrome://flags
Find Built-in Asynchronous DNS (about halfway down the page)
Change to disable, and then restart the browser

Block IP Linux Blackhole

I used to always write up iptables to block certain IP addresses, or use hosts.allow and hosts.deny entries, but Benjamin Cane showed me the light.

Blackhole that IP with a null route!

Add the route
ip route add blackhole IPADDRESSOFOFFENDER

Show the routes
ip route show

Remove the route
ip route del IPADDRESSOFOFFENDER
ip route show

Verify the null route
ssh: connect to host IP port 22: No route to host.

Ramblings Of An IT Person