Linux Tips and Tricks

Linux Tips and Tricks

Limit the CPU usage of a particular process


Hi All,

Here is the new utility called cpulimit

What is it ?

cpulimit is a simple program which attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). This is useful to control batch jobs, when you don’t want them to eat too much cpu. It does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.

how to get it ?

sudo apt-get install cpulimit

Download it from

How to use it ?

cpulimit -e <process-name/PID> -l 30


cpulimit -e 2223 -l 30
cpulimit -e firefox -l 50

Thanks & Bye

posted under Uncategorized | No Comments »

Check website is up or not


Hi All,

Now we are gonna check the particular website is up or not. For that we need the lynx command

lynx is a general purpose distributed information browser for the World Wide Web

if you don’t have command in your OS, then you can download and install it from the below URL

or if you use the ubuntu, then execute the below command

sudo apt-get install lynx

Once it is installed, you can try the below program.

$ cat
lynx -dump $1 &> /dev/null
if [ $? = 0 ]
echo “website is up”
echo “website is down. Trigger the email”

Output :

$ ./
website is up
$ ./
website is down. Trigger the email

posted under Uncategorized | No Comments »

Show Desktop icon for Ubuntu


Here is the trick to create the show desktop icon for the ubuntu operating system.

Make sure you already having the utility called xte. (type xte in the console and check whether it is already exists or not), If not, then do

sudo apt-get install xautomation

The above command will automatically install the xte utility.

or download the debian package from the below website and install manually.

now goto the desktop and right click –> choose “create launcher”

Type: Application
Name : Show Desktop
Command : xte “keydown Control_L” “keydown Alt_L” “key d” “keyup Control_L” “keyup Alt_L”
Comment : Show Desktop

press ok to create the launcher, and drag the launcher to your gnome panel. That’s all. you created the show desktop icon for your ubuntu.

Enjoy and let me know if you face any problems.

posted under Uncategorized | No Comments »

Recent Comments