Month: April 2013

  • Check current network bandwidth usage on Linux System

    root@choi:/usr/local/bin# vim netspeed #!/bin/bash if [ -z “$1” ]; then echo echo usage: $0 network-interface echo echo e.g. $0 eth0 echo exit fi IF=$1 while true do R1=`cat /sys/class/net/$1/statistics/rx_bytes` T1=`cat /sys/class/net/$1/statistics/tx_bytes` sleep 1 R2=`cat /sys/class/net/$1/statistics/rx_bytes` T2=`cat /sys/class/net/$1/statistics/tx_bytes` TBPS=`expr $T2 – $T1` RBPS=`expr $R2 – $R1` TKBPS=`expr $TBPS / 1024` RKBPS=`expr $RBPS / 1024` echo “tx…

  • Sysstat – CPU Load, Uptime. RAM usage check in Linux System

    Automatic Installation root@choi:~# apt-get install sysstat Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: libsensors4 multiarch-support Suggested packages: lm-sensors isag The following NEW packages will be installed: libsensors4 multiarch-support sysstat 0 upgraded, 3 newly installed, 0 to remove and 282 not upgraded. Need to get…

  • How to check memory usage in your linux machine

    1. Download memtop through the link below. wget http://memtop.googlecode.com/files/memtop-1.0.2.py 2. Once downloaded, you may execute the command below. python memtop-1.0.2.py The screenshot shown is the actual result using memtop.

  • Login to Plesk MySQL

    mysql -u admin -p`cat /etc/psa/.psa.shadow`

  • How to create a php redirection script.

    <?php /* Redirect browser */ header(“Location: http://webserverpage.com/”); /* Make sure that code below does not get executed when you redirect. */ exit; ?>

  • How to set your local time in Centos 6

    You may create a symlink from /usr/share/zoneinfo/Singapore to your localtime. ln -sf /usr/share/zoneinfo/Singapore /etc/localtime

  • How To Integrate Drivers For Windows XP/Server 2003/Media Center 2005

    1. Download “nLite” software. http://www.nliteos.com/download.html 2. Install nLite to your machine or to your computer. 3. Start/Run the application after the installation. Click Next Put your Windows installer disc in the drive and point nLite to where it is located. It will ask where to copy the files to if it is on a CD/DVD…