Month: May 2013

  • How to measure or calculate maximum memory usage of Apache

    For Debian: ps -ylC apache2 | awk ‘{x += $8;y += 1} END {print “Apache Memory Usage (MB): “x/1024; print “Average Proccess Size (MB): “x/((y-1)*1024)} For Centos/RedHat: ps -ylC httpd | awk ‘{x += $8;y += 1} END {print “Apache Memory Usage (MB): “x/1024; print “Average Proccess Size (MB): “x/((y-1)*1024)}’ The output should be like…

  • How to install QmailToaster in Centos.

    Download & Run Pre-Install Scripts 1. Create a directory for qmailtoaster files. mkdir -p /usr/src/qtms-install 2. Change directory to the above created directory. cd /usr/src/qtms-install 3. Download the installation script. (The script is meant for 64 bit). wget http://www.qmailtoaster.com/centos/cnt5064/cnt5064-deps.sh 4. Run the installation script. bash cnt5064-deps.sh 5. cnt50-svcs.sh & firewall.sh wget http://www.qmailtoaster.com/centos/cnt50/cnt50-svcs.sh 6. Rename cnt50-svcs.sh…

  • How to monitor MySQL process.

    rpaco@choi:~$ mytop -uroot -p<mypassword> Output should be like this. MySQL on localhost (5.0.45) up 0+05:34:18 [15:50:11] Queries: 16.6M qps: 869 Slow: 0.0 Se/In/Up/De(%): 20/00/00/00 qps now: 682 Slow qps: 0.0 Threads: 9 ( 1/ 1) 22/00/00/00 Key Efficiency: 99.9% Bps in/out: 0.0/ 1.8 Now in/out: 8.4/ 1.4k Id User Host/IP DB Time Cmd Query or…

  • How to check the max_connections in MySQL database.

    rpaco@choi:~$mysql -uroot -h localhost -p Enter Password: mypassword Type the command below. mysql> show variables like ‘max_connections’; +—————–+——-+ | Variable_name   | Value | +—————–+——-+ | max_connections | 100   | +—————–+——-+ Set temporary values. This values will be reset when mysql service restart. mysql>set global max_connections = 200; To set it permanently. vi /etc/mysql/my.cnf # #…

  • Check RAM Memory Chip Speed and Specification From Within a Linux System

    root@choi:~# dmidecode –type memory # dmidecode 2.11 SMBIOS 2.6 present. Handle 0x0008, DMI type 16, 15 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 8 GB Error Information Handle: No Error Number Of Devices: 2 Handle 0x0009, DMI type 17, 28 bytes Memory Device Array…

  • How to update vzkernel in host OS running OpenVZ

    This is how you can update your kernel in your host OS. 1. Check the installed kernel first. [root@choi ~]# rpm -qa | grep vzkernel vzkernel-2.6.32-042stab057.1.x86_64 2. Search for available vzkernel [root@choi ~]# yum search vzkernel Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: mirror.usonyx.net * extras: mirror.usonyx.net * openvz-kernel-rhel6: mirror.secureax.com…

  • Create Partition and Format Partition in Centos 6.4

    In this notes, I have inserted two HDD on a 1U server which have 2 existing HDD (raid 1) setup and currently running. I have inserted 2x 1TB HDD in the 3rd and 4th slot of the server. 1. To check if the disk have been detected, you may type the command below “fdisk -l”…