May 182013
 

This is a simple email alert for when your server process load reaches a defined threshold.

I wish I had retained the (StackExchange?) link I had found to give me the code below. Thank you to the original author. If you have a link to the source post for this code, please give credit in the comments below.

Save the code below as cpucheck.sh and execute via crontab every 15 minutes. It will email you at [email protected] a list of the top 10 cpu consuming running processes when the load average reaches 6.0 or higher.

#!/bin/bash
SUBJECT="`hostname` server load is high"
[email protected]
uptime > /tmp/load
if [ `uptime | awk '{ print$10 }' | cut -d. -f1` -gt 6 ];
then
echo "============================================" >> /tmp/load
`ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 >> /tmp/load `
mail -s "$SUBJECT" $TO < /tmp/load
exit
fi

Adjust -gt 6 to be any minimum load number you prefer to receive the alert.

Remove “| head -10″ if you would prefer to see the entire list of running processes.

Helpful resources:

Apr 032012
 

Passive mode ftp requires some or all “unprivileged” (1024-65534) ports to be open on the webserver. The default Plesk firewall configuration blocks all ports except for those single ports required for system services (HTTP, POP, etc.)

To enable passive mode ftp on a Plesk server:

SSH into your server and as root, edit /etc/proftpd.conf.

Add the line in the <global> section:

PassivePorts 60000 65534

* I prefer to limit the number of available ports for greater security.

 

Enable passive FTP in Plesk with this firewall rule

Enable passive FTP in Plesk with this firewall rule

Login to your Plesk Panel.

Go to Modules -> Firewall to access your firewall configuration.
Select Edit Firewall Configuration.

Add a new Rule:

 Name of the rule: FTPD Passive Ports
 Match direction: Incoming (only)
 Action: Allow
 Ports:
 Add port or port range: 60000-65534
 Select TCP
 Click Add

Click OK and then click Activate (twice)

More information about Passive vs. Active FTP

Jul 152010
 

Created by the same team that also brought us the indispensable YSlow tests, Boomerang allows us to collect the page load times from actual visitors.

While performing page load testing on your development machines using Firebug, YSlow, and other tools is important, nothing beats getting real world “perceived” page load times from your real visitors, along with other useful metrics.

The software works by adding some javascript to the page(s) that you’d like to benchmark and then deploying some php or other code that will save the incoming results into a database. The website below offers example code:

Try Boomerang.

Jul 142010
 

Rather than asking your visitor to provide their operating system and browser information by asking them to go through various Help -> About menus on their computer, send them to www.supportdetails.com.

This simple, free service will display all of their pertinent information and provide a handy form that they can use to email it to you. Tracking down problems that might or might not be related to browser compatibility is tricky enough, this makes the “OK, what browser are you using?” step much simpler.

Thank you to Imulus Design+Interactive for supplying this service.