May 30, 2008 at 12:11 pm
· Filed under Linux
First of all, this post is nowhere near a complete reference for linux memory usage and troubleshooting high memory usage. It only has the steps I’d taken to troubleshoot my own server when it gets overloaded by increased traffic. It happens once a while, and usually I can fix it by tuning some Apache, MySQL and other config setting.
1. using top command
After executing top command, press “Shift” + “>” and look at “RES” column. The RES column is the most reliable indicator of the real memory usage of that process.
top result
2. ps axu –sort:rss
show memory usage sorted by lowest memory usages first.
A general Apache which serves static html page should consume less than 10MB per process.
For heavily serving PHP pages, in my case it uses 18MB-39MB each httpd process.
mysqld has a memory usage of 120MB in my case. I can tell that the query cache settings worked as planned.
Permalink
March 4, 2008 at 11:32 am
· Filed under Linux
- Check Linux Kernel version:
uname -a
cat /proc/version
- Check Redhat based Linux version
cat /etc/redhat-release
- Check PHP version on Linux server
php -v
- Check mysql version on linux server
mysql -V
- Check apache version on linux server
httpd -v
Permalink
November 12, 2007 at 5:23 pm
· Filed under Linux
- Click VM-> install VMware tools
- In Fedora 8 terminal window, copy WMwareTools-6.0.2-59284.tar.gz into your home folder
- unzip it. gzip -d WMwareTools-6.0.2-59284.tar.gz | tar -xvf WMwareTools-6.0.2-59284.tar
- run vmware-install.pl
Permalink
September 24, 2007 at 1:58 pm
· Filed under Linux
I just read this one from SWsoft forum.
There is a SQL injection vulnerable security hole exists on Plesk 8.x.x. Yes, it’s even on 8.2.0, which is the latest stable version.
It’s /usr/local/psa/admin/plib/class.Session.php.
Here’s the fix.
Permalink
September 20, 2007 at 2:31 pm
· Filed under Linux, Uncategorized
1. Check folder size
$ du -hs /path/to/directory
2. Zip a folder
$ zip -r filename.zip /path/to/folder
3. Mount a portable harddrive / usb drive
$/sbin/fdisk -l
4. Check memory usage
$ free -m
by look into the free column of -/+ buffers/cache line, it’s the free memory that can be used by applications.
5. Check if a package is installed (RedHat Enterprise/Fedora/Suse/CentOS)
$rpm -qa | grep PACKAGE-NAME
Permalink