Twitter feed php cache

If you’ve ever wanted to display your latest Twitter tweets on a website, here is method to do that using PHP. This approach has the following features: Tweets are cached to avoid exceeding Twitter’s limit of 150 requests for a user’s RSS feed per hour A fallback is provided in case the twitter feed fails to load Replies (tweets beginning with @) can optionally be ignored A … [Read more...]

Optimize apache web server

1. SSH into your server as root. 2. Run top. 3. Press shift + m. 4. Note the highest RES memory used by httpd. 5. Hit Q to exit top. 6. Execute: service httpd stop 7. Once httpd is stopped, execute: free -m 8. Note the memory listed under "used". 9. Find the guaranteed memory for your VPS plan. Support can tell you how much you have guaranteed if you cannot find it. 10. Subtract the … [Read more...]

Tracking CPU average load

To keep track of your system’s CPU load averages you will need to install the sar program. This program is usually found in the sysstat package. To install sysstat on Centos or Fedora type the following command as root: yum install sysstat Viewing statistics Type the following command to get today’s CPU load average statistics: sar -q | less The output of sar is piped to the … [Read more...]

Useful commands

Useful Commands Check system usage, updated every second: vmstat 1 Check jow much free ram you have on your system: free -m Check I/O utilization on your drive(s): iostat -dkx Clear Memory Cache sync | echo 3 > /proc/sys/vm/drop_caches … [Read more...]

Monitor network traffic with iftop

Install iftop Product Name: IFTOP Product Version: 0.17 Homepage: http://www.ex-parrot.com/~pdw/iftop/ Description: ftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question “why is our ADSL link so slow?” From Centos EPEL Repo: yum … [Read more...]

Upgrade OpenSSH on CentOS 5

The commands below are the ones I used to install version 5.8 (the latest stable at the time of this post), but can essentially be used for any compatible version. First, download the OpenSSH source tarball from the vendor and unpack it. You can find the tarballs at http://www.openssh.com/portable.html wget http://mirror.mcs.anl.gov/openssh/portable/openssh-5.8p2.tar.gz tar -xvzf … [Read more...]

Check open ports on linux

There are multiple methods to see what ports are open in Linux. nmap can be used to scan your machine to see whats ports are open. Issue the following command to scan your computers machine: nmap -sS -O once the scan has finished you will get the following ouput: Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2005-01-16 05:48 GMT Interesting ports on localhost.localdomain … [Read more...]

Monitor and track TCP connections on the network

You can use netstat command or tcptrack command. Both command can show established TCP connection and provides the ability to monitor the same. netstat command netstat command prints information about the Linux networking subsystem. It also works under UNIX and *BSD oses. It can display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships … [Read more...]

How to configure DNS Clustering across all your WHM servers

DNS Cluster

Having a speedy and efficient nameserver setup for WHM servers is crucial for keeping the customers happy. More the nameservers you have better is the speed and efficiency. If you have at least two WHM servers, you can set up what is known as clusters. When a DNS change occurs on one of your main servers, that change will be replicated immediately to all the other servers in the … [Read more...]

Facebook Or Google Plus ?

Google-Vs-Facebook

Google + is the search giant's most ambitious attempt to break into the social networking realm, currently dominated by Facebook whose users spend 700 billion minutes per month on the site. While this project is not yet complete and accessible only by invitation, it has spurred high expectations and big interest and China has already banned it as of today. Facebook and other social … [Read more...]