EZ Linux Admin random header image

Entries Tagged as 'Linux Tricks'

Optimize MySQL DataBases

June 29th, 2010 by EZ linux · No Comments

If you are online then you should run: mysqlcheck
mysqlcheck -o –all-databases
If you are offline then you can run myisamchk which is a little more thorough.
myisamchk –sort-index
myisamchk -r tbl_name

Click to continue →

Tags: Linux Software / Scripts · Linux Tricks

When asking about a networking issue, get these details from the server

April 5th, 2010 by EZ linux · No Comments

Kernal version
uname -a
Nic / Lan driver version
dmesg | grep r8169
Internet controller
lspci -nn | grep Ethernet
Details on etho nic card
sudo ethtool eth0
Module size
lsmod | grep r8169
Module versions
cat /proc/modules | grep r8169
Don’t worry all these commands are safe and just for reporting.

Click to continue →

Tags: Cheat Sheets · Hardware · Linux Commands · Linux Tricks

Mod_cband the new Mod_Bandwidth

March 29th, 2010 by EZ linux · 1 Comment

I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it’s free. The new mod to regulate bandwidth and more is called Mod_cband I’m not sure what cband means but I [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks

Raise apache 2.0 max clients hard limit in cpanel

March 23rd, 2010 by EZ linux · No Comments

Apache 2.0 makes raising the max client from the default 256 hard limit a little harder now. If you have cpanel then it’s even a little harder or I should you just need to know what to do, figuring it out is a shot in the dark.
One main difference is you have raise the server [...]

Click to continue →

Tags: Cpanel and WHM · Linux Software / Scripts · Linux Tricks

My new favorite rsync command

March 3rd, 2010 by EZ linux · No Comments

rsync -vae ssh 12.123.123.123:/home/dwhsbackup/daily/username/ /backup/cpbackup/daily2/username/ –bwlimit=10000 –exclude-from ‘/root/exclude.txt’

Click to continue →

Tags: Linux Commands · Linux Software / Scripts · Linux Tricks

Calm down rsync if it overloads your IO memory or CPU

March 3rd, 2010 by EZ linux · No Comments

The trick is to limit I/O bandwidth for rsync.
The –bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:
rsync –delete –numeric-ids –relative –delete-excluded –bwlimit=10000 /path/to/source /path/to/dest/?
10 megs a second is plenty of speed and will keep the server running smoothly when your [...]

Click to continue →

Tags: Cheat Sheets · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks

rsync running slow?

March 3rd, 2010 by EZ linux · No Comments

Today I was transferring files through rsync it was taking forever, my guess was the new server or old server was out of memory so I killed some procs and even rebooting the server but still it was crawling. So I thought I would think out of the box and after a couple trial and [...]

Click to continue →

Tags: Hardware · Linux Commands · Linux Tricks

Free /usr partition space by a symlink to domlogs

February 10th, 2010 by EZ linux · No Comments

First move the domlogs folder to the backup partition:
mv /usr/local/apache/domlogs /backup
Then create a symbolic link to it:
ln -s /backup/domlogs /usr/local/apache/domlogs

Click to continue →

Tags: Linux Commands · Linux Tricks

Show All Running Processes in Linux

January 21st, 2010 by EZ linux · No Comments

To see every process type:
ps -A
To see every process except what’s running from root type:
ps -U root -u root -N

Click to continue →

Tags: Cheat Sheets · Linux Commands · Linux Tricks

Flushing iptables

January 21st, 2010 by EZ linux · No Comments

iptables can block many different things and often it will block good servers inside of a network. The best to see if it’s a iptables issue. Try to clean them out with this if you have CSF on the server:
csf -f
If you still have a issue try to stop iptables like this:
service iptables stop

Click to continue →

Tags: Linux Commands · Linux Security · Linux Tricks