A tutorial on using Conky to monitor system running information under Linux

Source: Internet
Author: User
Tags curl zip disk usage

Conky is a System Monitor written in the ' C ' language and released under the GNU GPL and the BSD license agreement, which is available in both Linux and BSD operating systems. This application is based on the X-Windows system, which originally came from the Torsmo branch.

Characteristics

A concise user interface;

Highly configurable;

It can use a built-in part (more than 300) or use an external script to display the state of the system on the desktop or its own container;

low resource consumption;

It can display a wide range of system parameters, including but not limited to CPU, memory, swap partitions, temperature, process, disk usage, network status, battery charge, mail transceiver, system message, music Player control, weather information, latest news, upgrade information, etc.

In many operating systems such as CrunchBang Linux and Pinguy OS are installed by default;

A little-known fact about Conky.

Conky This name comes from a Canadian television program;

It has been ported to Nokia N900;

The authorities are no longer defending it;

Installation and use of Conky in Linux

Before we install Conky, we need to use the following command to install packages such as lm-sensors, curl, and hddtemp:

The code is as follows:

# apt-get Install lm-sensors Curl hddtemp

Then the detection sensor:

The code is as follows:

# Sensors-detect

Note: When prompted by the system, answer ' Yes '.

Detect all detected sensors:

The code is as follows:

# sensors

Sample output

The code is as follows:

acpitz-virtual-0

Adapter:virtual Device

Temp1: +49.5°c (crit = +99.0°c)

coretemp-isa-0000

Adapter:isa Adapter

Physical ID 0: +49.0°c (high = +100.0°c, Crit = +100.0°c)

Core 0: +49.0°c (high = +100.0°c, Crit = +100.0°c)

Core 1: +49.0°c (high = +100.0°c, Crit = +100.0°c)

Conky can be installed from the software warehouse or compiled from source code:

The code is as follows:

# yum Install Conky [on the RedHat system]

# apt-get Install Conky-all [on the Debian system]

Note: Before installing Conky on Fedora/centos, you must enable the Epel software warehouse.

After installing Conky, simply enter the following command to open it:

Copy Code

The code is as follows:

$ Conky &

Running Conky Monitor

This allows Conky to run as a window and use the Conky base configuration file located in/etc/conky/conky.conf.

You might want to integrate Conky into the desktop and don't want it to appear every time you have a window, and here's what you need to do:

Copy the profile/etc/conky/conky.conf to your home directory and rename it to. CONKYRC, the starting point (.) is to make sure that the profile is hidden.

The code is as follows:

$ cp/etc/conky/conky.conf/home/$USER/.CONKYRC

Now restart Conky to apply the new changes:

The code is as follows:

$ KILLALL-SIGUSR1 Conky

Conky Monitor Window

You may want to edit the Conky configuration file located in your home directory, and the content of this configuration file is very easy to understand.

The following is a sample of the Conky configuration file:

Configuration of Conky

From the above window, you can change the color, border, size, scaling, background, alignment, and several other properties. By setting different alignment options for different conky windows, we can run several Conky scripts at the same time.

Let Conky use other scripts instead of the default configuration, and how do I find these scripts?

You can write your own conky scripts or use scripts from the Internet, and we don't recommend using any of the potentially dangerous scripts found on the Internet unless you know what you're doing. However, there are some famous themes and Web pages that contain trustworthy Conky scripts, such as the following:

http://ubuntuforums.org/showthread.php?t=281865

Http://conky.sourceforge.net/screenshots.html

In the URL above, you will find that each screenshot has a hyperlink that will point to the script file.

Testing Conky Scripts

Here I'm going to test by running a Conky script written by a third party in my Debian Jessie system:

The code is as follows:

$ wget Https://github.com/alexbel/conky/archive/master.zip

$ unzip Master.zip

Switch the current working directory to the directory you just unzipped:

The code is as follows:

$ CD Conky-master

Rename Secrets.yml.example to Secrets.yml:

The code is as follows:

$ mv Secrets.yml.example secrets.yml

Install Ruby before you need to run this (Ruby) script:

The code is as follows:

$ sudo apt-get install ruby

$ Ruby Starter.rb

Gorgeous Conky appearance

Note: You can modify this script to show your current weather, temperature, etc.;

If you want the Conky to boot, add the following lines to the boot Startup application setting (Startup applications):

Copy Code

The code is as follows:

Conky--pause 10

Save and exit.

Finally, this lightweight and eye-catching utility GUI package is no longer active and officially no longer maintained. The latest stable release version is Conky 1.9.0, released on May 3, 2012. On the Ubuntu forum, a topic about user-shared conky configuration has more than 2000 pages. (the link to this forum theme is: http://ubuntuforums.org/showthread.php?t=281865/)

Conky Home

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.