Sometimes I need to download big ISOs or other large files onto my work laptop, but GlobalProtect forces me to do so via the VPN. In order to speed things up and use my local network connection, I need to…
Sometimes I need to download big ISOs or other large files onto my work laptop, but GlobalProtect forces me to do so via the VPN. In order to speed things up and use my local network connection, I need to…
I’m a big user of Chef, but was bummed when I couldn’t find any resolver information in Ohai data. I needed to make some changes to an nginx config to use resolver, but wanted to use the resolver that’s already…
Every true sysadmin has been in this predicament — “I need to run this command on a bunch of machines.” The typical approach is to create a for loop, and run the command serially. This works well, but if a)…
If a replica shard is in an INITIALIZATION state and the primary shard is healthy, then the shard is being replicated from the primary to the replica. You can use the cat API to get this state:
1 2 3 4 5 |
$ curl '0:9200/_cat/shards' prod_article_index 0 p STARTED 13708596 55.2gb 192.168.27.181 es-a05.mycompany.com prod_article_index 0 r INITIALIZING 192.168.25.158 es-a04.mycompany.com prod_article_index 1 r INITIALIZING 192.168.25.158 es-a04.mycompany.com prod_article_index 1 p STARTED 13710169 55gb 192.168.11.214 es-m04.mycompany.com |
Now, we…
Promox has built-in support for installing templates, but they’re pretty outdated and not well-maintained. openvz.org, on the other hand, regularly updates their templates, and has a wide selection to choose from. In order to make these templates available for use…
The Cyrus IMAP server (which is used by FastMail, FYI), is pretty picky when it comes to enforcing RFCs. When performing a recent email migration (from Zoho, which is less picky), I got a boatload of errors along the way.…
There are times when I need to create a number of OpenVZ containers in Proxmox at once, which would take way too long via the user interface. There are a number of ways to accomplish this programmatically, but the most…
1 2 |
_HOSTS="host1 host2 host3 host4" echo -n $_HOSTS | parallel -vv --gnu -j +3 -d " " -I HOST "rsync -crlvz -e 'ssh -p 22' --stats --progress --exclude '.git*' . [email protected]:$TARGET_DIR" |
1 |
sudo yum install php-pecl-xhprof graphviz |
You’ll now need to have this module loaded in PHP; this varies depending on which handler you use:
1 2 |
sudo service restart php-fpm # if you're using PHP-FPM/FastCGI sudo service restart httpd # if you're using mod_php |
cd into wp-content/plugins
1 |
git clone https://github.com/Upstatement/xhprof-for-wordpress.git |
In wp-config.php:
1 |
define('PROFILE', true); |
In your admin dashboard, enable “WP XHProf Profiler” from the plugins section.…
It happens — you’re on a server that just can’t be upgraded any further, and you need more resources. Or, you need to backup a Chef server. Or, you need to setup a QA instance. Or, you need to finally…
Recent Comments