Write speed on Linux
A quick non-destructive test of disk write performance on Linux. Useful for testing cheap HDD’s (write will almost always be worse than read): dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
A quick non-destructive test of disk write performance on Linux. Useful for testing cheap HDD’s (write will almost always be worse than read): dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
If compiling a Vanilla kernel for CentOS, you may encounter the following after rebooting: Setuproot: moving /dev failed: No such file or directory Setuproot: error mounting /proc: No such file or directory Setuproot: error mounting /sys: No such file or directory […] Kernel panic – not syncing: Attempted to kill init! To resolve the booting […]
Sometimes an email account goes over quota and the quota can’t be adjusted due to the following error: Error invalid maildir size file The following commands ran as root will resolve most email quota issues for a Cpanel account, including incorrect quota calculations. Substitute <cpaneluser> with the Cpanel user which owns the email account having […]
The following will copy two disks, partition table and all, with forensic quality, and pad the destination disk with zeroes if any data is unreadable on the source disk. Be sure you’ve identified which disk is which using combinations of dmesg and ‘fdisk -l’. The destination disk must also be equal or greater in size. […]
The other day I was surprised to find the ‘shutdown -h now’ command on the Redhat/Centos rescue CD doesn’t work. I’ve since discovered a few other ways to get a Linux OS to power off, each should accomplish the same thing – gracefully power down. shutdown -h now halt poweroff init 0
First, install the Maxmind GeoIP database. mkdir /usr/local/share/GeoIP cd /usr/local/share/GeoIP wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz gzip -d GeoIP.dat.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz gzip -d GeoLiteCity.dat.gz wget http://twiki.cpanel.net/twiki/pub/EasyApache3/CustomMods/custom_opt_mod-mod_geoip.tar.gz tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf custom_opt_mod-mod_geoip.tar.gz Then, recompile Apache and PHP. /scripts/easyapache
Cpanel creates a default address inbox for each domain consisting of the Cpanel user’s primary username. This address is not used for normal email, rather as a catch-all (if enabled) or a sink-hole for delivery failures or auto-generated mail from scripts. It is fairly safe to regularly empty out these mailboxes, and it will free […]
Sort the output of ‘du’ in human readable format (similar to the -h switch). du -k | sort -nr | awk ‘ BEGIN { split(“KB,MB,GB,TB”, Units, “,”); } { u = 1; while ($1 >= 1024) { $1 = $1 / 1024; u += 1 } $1 = sprintf(“%.1f %s”, $1, Units[u]); print $0; } […]
When connected with peers running older versions of Asterisk, the following error might come up and inbound calls from the peer are rejected: ERROR[xxxxx] chan_iax2.c: Call rejected, CallToken Support required. If unexpected, resolve by placing address x.x.x.x in the calltokenoptional list or setting user guest requirecalltoken=no To resolve this, place the following in iax_custom.conf and […]
On a particular Cpanel box I occasionally receive the following when attempting to install or update any Perl module — whether initiated by myself or by Cpanel: Undefined subroutine &Compress::Zlib::gzopen The fix is to remove all traces of Compress:Zlib with the following command: rm -rf `find /usr/lib/perl5/ | grep Compress | grep Zlib` When this […]