mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-25 00:50:15 +08:00
20150507-1 选题
This commit is contained in:
parent
88a8a966c2
commit
f7d1200cd5
@ -0,0 +1,192 @@
|
||||
Command Line Tool to Monitor Linux Containers Performance
|
||||
================================================================================
|
||||
ctop is a new command line based tool available to monitor the processes at the container level. Containers provide operating system level virtualization environment by making use of the cgroups resource management functionality. This tool collects data related to memory, cpu, block IO and metadata like owner, uptime etc from cgroups and presents it in a user readable format so that one can quickly asses the overall health of the system. Based on the data collected, it tries to guess the underlying container technology. ctop is useful in detecting who is using large amounts of memory under low memory situations.
|
||||
|
||||
### Capabilities ###
|
||||
|
||||
Some of the capabilities of ctop are:
|
||||
|
||||
- Collect metrics for cpu, memory and blkio
|
||||
- Gather information regarding owner, container technology, task count
|
||||
- Sort the information using any column
|
||||
- Display the information using tree view
|
||||
- Fold/unfold cgroup tree
|
||||
- Select and follow a cgroup/container
|
||||
- Select a timeframe for refreshing the displayed data
|
||||
- Pause the refreshing of data
|
||||
- Detect containers that are based on systemd, Docker and LXC
|
||||
- Advance features for Docker and LXC based containers
|
||||
- open / attach a shell for further diagnosis
|
||||
- stop / kill container types
|
||||
|
||||
### Installation ###
|
||||
|
||||
**ctop** is written using Python and there are no other external dependencies other than having to use Python version 2.6 or greater (with built-in cursor support). Installation using Python's pip is the recommended method. Install pip if not already done and install ctop using pip.
|
||||
|
||||
*Note: The examples shown in this article are from an Ubuntu (14.10) system*
|
||||
|
||||
$ sudo apt-get install python-pip
|
||||
|
||||
Installing ctop using pip:
|
||||
|
||||
poornima@poornima-Lenovo:~$ sudo pip install ctop
|
||||
|
||||
[sudo] password for poornima:
|
||||
|
||||
Downloading/unpacking ctop
|
||||
|
||||
Downloading ctop-0.4.0.tar.gz
|
||||
|
||||
Running setup.py (path:/tmp/pip_build_root/ctop/setup.py) egg_info for package ctop
|
||||
|
||||
Installing collected packages: ctop
|
||||
|
||||
Running setup.py install for ctop
|
||||
|
||||
changing mode of build/scripts-2.7/ctop from 644 to 755
|
||||
|
||||
changing mode of /usr/local/bin/ctop to 755
|
||||
|
||||
Successfully installed ctop
|
||||
|
||||
Cleaning up...
|
||||
|
||||
If using pip is not an option, you can also install it directly from the github using wget:
|
||||
|
||||
poornima@poornima-Lenovo:~$ wget https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py -O ctop
|
||||
|
||||
--2015-04-29 19:32:53-- https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py
|
||||
|
||||
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 199.27.78.133
|
||||
|
||||
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|199.27.78.133|:443... connected.
|
||||
|
||||
HTTP request sent, awaiting response... 200 OK Length: 27314 (27K) [text/plain]
|
||||
|
||||
Saving to: ctop
|
||||
|
||||
100%[======================================>] 27,314 --.-K/s in 0s
|
||||
|
||||
2015-04-29 19:32:59 (61.0 MB/s) - ctop saved [27314/27314]
|
||||
|
||||
----------
|
||||
|
||||
poornima@poornima-Lenovo:~$ chmod +x ctop
|
||||
|
||||
You might get an error message while launching ctop if cgroup-bin package is not installed. It can be resolved by installing the required package.
|
||||
|
||||
poornima@poornima-Lenovo:~$ ./ctop
|
||||
|
||||
[ERROR] Failed to locate cgroup mountpoints.
|
||||
|
||||
poornima@poornima-Lenovo:~$ sudo apt-get install cgroup-bin
|
||||
|
||||
Here is a sample output screen of ctop:
|
||||
|
||||

|
||||
ctop screen
|
||||
|
||||
### Usage options ###
|
||||
|
||||
ctop [--tree] [--refresh=] [--columns=] [--sort-col=] [--follow=] [--fold=, ...] ctop (-h | --help)
|
||||
|
||||
Once you are inside the ctop screen, use the up (↑) and down(↓) arrow keys to navigate between containers. Clicking on any container will select that particular container. Pressing q or Ctrl+C quits the container.
|
||||
|
||||
Let us now take a look at how to use each of the options listed above.
|
||||
|
||||
-h / --help - Show the help screen
|
||||
|
||||
----------
|
||||
|
||||
poornima@poornima-Lenovo:~$ ctop -h
|
||||
Usage: ctop [options]
|
||||
|
||||
Options:
|
||||
-h, --help show this help message and exit
|
||||
--tree show tree view by default
|
||||
--refresh=REFRESH Refresh display every <seconds>
|
||||
--follow=FOLLOW Follow cgroup path
|
||||
--columns=COLUMNS List of optional columns to display. Always includes
|
||||
'name'
|
||||
--sort-col=SORT_COL Select column to sort by initially. Can be changed
|
||||
dynamically.
|
||||
|
||||
----------
|
||||
|
||||
--tree - Display tree view of the containers
|
||||
|
||||
By default, list view is displayed
|
||||
|
||||
Once you are inside the ctop window, you can use the F5 button to toggle tree / list view.
|
||||
|
||||
--fold=<name> - Fold the <name> cgroup path in the tree view.
|
||||
|
||||
This option needs to be used in combination with --tree.
|
||||
|
||||
----------
|
||||
|
||||
Eg: ctop --tree --fold=/user.slice
|
||||
|
||||

|
||||
Output of 'ctop --fold'
|
||||
|
||||
Inside the ctop window, use the + / - keys to toggle child cgroup folding.
|
||||
|
||||
Note: At the time of writing this article, pip repository did not have the latest version of ctop which supports '--fold' option via command line.
|
||||
|
||||
--follow= - Follow/Highlight the cgroup path.
|
||||
|
||||
----------
|
||||
|
||||
Eg: ctop --follow=/user.slice/user-1000.slice
|
||||
|
||||
As you can see in the screen below, the cgroup with the given path "/user.slice/user-1000.slice" gets highlighted and makes it easier for the user to follow it even when the display position gets changed.
|
||||
|
||||

|
||||
Output of 'ctop --follow'
|
||||
|
||||
You can also use the 'f' button to allow the highlighted line to follow the selected container. By default, follow is off.
|
||||
|
||||
--refresh= - Refresh the display at the given rate. Default 1 sec
|
||||
|
||||
This is useful in changing the refresh rate of the display as per user requirement. Use the 'p' button to pause the refresh and select the text.
|
||||
|
||||
--columns=<columns> - Can limit the display to selected <columns>. 'name' should be the first entry followed by other columns. By default, the columns include owner, processes,memory, cpu-sys, cpu-user, blkio, cpu-time.
|
||||
|
||||
----------
|
||||
|
||||
Eg: ctop --columns=name,owner,type,memory
|
||||
|
||||

|
||||
Output of 'ctop --column'
|
||||
|
||||
-sort-col=<sort-col> - column using which the displayed data should be sorted. By default it is sorted using cpu-user
|
||||
|
||||
----------
|
||||
|
||||
Eg: ctop --sort-col=blkio
|
||||
|
||||
If there are additional containers supported like Docker and LXC, following options will also be available:
|
||||
|
||||
press 'a' - attach to console output
|
||||
|
||||
press 'e' - open a shell in the container context
|
||||
|
||||
press 's' – stop the container (SIGTERM)
|
||||
|
||||
press 'k' - kill the container (SIGKILL)
|
||||
|
||||
[ctop][1] is currently in active development by Jean-Tiare Le Bigot. Hopefully we would see more features in this tool like our native top command :-).
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/how-tos/monitor-linux-containers-performance/
|
||||
|
||||
作者:[B N Poornima][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/bnpoornima/
|
||||
[1]:https://github.com/yadutaf/ctop
|
@ -0,0 +1,134 @@
|
||||
Install uGet Download Manager 2.0 in Debian, Ubuntu, Linux Mint and Fedora
|
||||
================================================================================
|
||||
After a long development period, which includes more than 11 developement releases, finally uGet project team pleased to announce the immediate availability of the latest stable version of uGet 2.0. The latest version includes numerous attractive features, such as a new setting dialog, improved BitTorrent and Metalink support added in the aria2 plugin, as well as better support for uGet RSS messages in the banner, other features include:
|
||||
|
||||
- A new “Check for Updates” button informs you about new released versions.
|
||||
- Added new languages & updated existing languages.
|
||||
- Added a new “Message Banner” that allows developers to easily provide uGet related information to all users.
|
||||
- Enhanced the Help Menu by including links to the Documentation, to submit Feedback & Bug Reports and more.
|
||||
- Integrated uGet download manager into the two major browsers on the Linux platform, Firefox and Google Chrome.
|
||||
- Improved support for Firefox Addon ‘FlashGot’.
|
||||
|
||||
### What is uGet ###
|
||||
|
||||
uGet (formerly known ad UrlGfe) is an open source, free and very powerful multi-platform GTK based download manager application was written in C language, that released and licensed under GPL. It offers large collection of features such as resuming downloads, multiple download support, categories support with an independent configuration, clipboard monitoring, download scheduler, import URLs from HTML files, integrated Flashgot plugin with Firefox and download torrent and metalink files using aria2 (a command-line download manager) that integrated with uGet.
|
||||
|
||||
I have listed down all the key features of uGet Download Manager in detailed explanation.
|
||||
|
||||
#### Key Features of uGet Download Manager ####
|
||||
|
||||
- Downloads Queue: Place all your downloads into a Queue. As downloads finishes, the remaining queue files will automatically start downloading.
|
||||
- Resume Downloads: If in case, your network connection disconnected, don’t worry you can start or resume download where it was left.
|
||||
- Download Categories: Support for unlimited categories to manage downloads.
|
||||
- Clipboard Monitor: Add the types of files to clipboard that automatically prompt you to download copied files.
|
||||
- Batch Downloads: Allows you to easily add unlimited number of files at once for downloading.
|
||||
- Multi-Protocol: Allows you to easily download files through HTTP, HTTPS, FTP, BitTorrent and Metalink using arial2 command-line plugin.
|
||||
- Multi-Connection: Support for up to 20 simultaneous connections per download using aria2 plugin.
|
||||
- FTP Login & Anonymous FTP: Added support for FTP login using username and password, as well as anonymous FTP.
|
||||
- Scheduler: Added support for scheduled downloads, now you can schedule all your downloads.
|
||||
- FireFox Integration via FlashGot: Integrated FlashGot as an independent supported Firefox extension that handles single or massive selection of files for downloading.
|
||||
- CLI / Terminal Support: Offers command line or terminal option to download files.
|
||||
- Folder Auto-Creation: If you have provided the save path for the download, but the save path doesn’t exist, uget will automatically create them.
|
||||
- Download History Management: Keeps a track of finished download and recycled entries, per list 9,999 files. Entries which are older than the custom limit will be deleted automatically.
|
||||
- Multi-Language Support: By default uGet uses English, but it support more than 23 languages.
|
||||
- Aria2 Plugin: uGet integrated with Aria2 plugin to give more user friendly GUI.
|
||||
|
||||
If you want to know a complete list of available features, see the official uGet [features page][1].
|
||||
|
||||
### Install uGet in Debian, Ubuntu, Linux Mint and Fedora ###
|
||||
|
||||
The uGet developers added latest version in various repos throughout the Linux platform, so you can able to install or upgrade uGet using supported repository under your Linux distribution.
|
||||
|
||||
Currently, a few Linux distributions are not up-to-date, but you can get the status of your distribution by going to the [uGet Download page][2] and selecting your preferred distro from there for more details.
|
||||
|
||||
#### On Debian ####
|
||||
|
||||
In Debian Testing (Jessie) and Debian Unstable (Sid), you can easily install and update using the official repository on a fairly reliable basis.
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install uget
|
||||
|
||||
#### On Ubuntu & Linux Mint ####
|
||||
|
||||
In Ubuntu and Linux Mint, you can install and update uGet using official PPA repository ‘ppa:plushuang-tw/uget-stable‘. By using this PPA, you automatically be kept up-to-date with the latest versions.
|
||||
|
||||
$ sudo add-apt-repository ppa:plushuang-tw/uget-stable
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install uget
|
||||
|
||||
#### On Fedora ####
|
||||
|
||||
In Fedora 20 – 21, latest version of uGet (2.0) available from the official repositories, installing from these repo is fairly reliable.
|
||||
|
||||
$ sudo yum install uget
|
||||
|
||||
**Note**: On older versions of Debian, Ubuntu, Linux Mint and Fedora, users can also install uGet. but the available version is 1.10.4. If you are looking for updated version (i.e. 2.0) you need to upgrade your system and add uGet PPA to get latest stable version.
|
||||
|
||||
### Installing aria2 plugin ###
|
||||
|
||||
[aria2][3] is a excellent command-line download utility, that is used by uGet as a aria2 plugin to add even more great functionality such as downloading torrent files, metalinks, multi-protocol & multi-source download.
|
||||
|
||||
By default uGet uses CURL as backend in most of the today’s Linux systems, but the aria2 Plugin replaces CURL with aria2 as the backend.
|
||||
|
||||
aria2 is a separate package that needs to be installed separately. You can easily install latest version of aria2 using supported repository under your Linux distribution or you can also use [downloads-aria2][4] that explains how to install aria2 on each distro.
|
||||
|
||||
#### On Debian, Ubuntu and Linux Mint ####
|
||||
|
||||
Use the official aria2 PPA repository to install latest version of aria2 using the following commands.
|
||||
|
||||
$ sudo add-apt-repository ppa:t-tujikawa/ppa
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install aria2
|
||||
|
||||
#### On Fedora ####
|
||||
|
||||
Fedora’s official repositories already added aria2 package, so you can easily install it using the following yum command.
|
||||
|
||||
$ sudo yum install aria2
|
||||
|
||||
#### Starting uGet ####
|
||||
|
||||
To start uGet application, from the desktop “Menu” on search bar type “uget“. Refer below screenshot.
|
||||
|
||||

|
||||
Start uGet Download Manager
|
||||
|
||||

|
||||
uGet Version: 2.0
|
||||
|
||||
#### Activate aria2 Plugin in uGet ####
|
||||
|
||||
To active the aria2 plugin, from the uGet menu go to Edit –> Settings –> Plug-in tab, from the drop-down select “arial2“.
|
||||
|
||||

|
||||
Enable Aria2 Plugin for uGet
|
||||
|
||||
### uGet 2.0 Screenshot Tour ###
|
||||
|
||||

|
||||
Download Files Using Aria2
|
||||
|
||||

|
||||
Download Torrent File Using uGet
|
||||
|
||||

|
||||
Batch Downloads Using uGet
|
||||
|
||||
uGet source files and RPM packages also available for other Linux distributions and Windows at [download page][5].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/install-uget-download-manager-in-linux/
|
||||
|
||||
作者:[Ravi Saive][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.tecmint.com/author/admin/
|
||||
[1]:http://uget.visuex.com/features
|
||||
[2]:http://ugetdm.com/downloads
|
||||
[3]:http://www.tecmint.com/install-aria2-a-multi-protocol-command-line-download-manager-in-rhel-centos-fedora/
|
||||
[4]:http://ugetdm.com/downloads-aria2
|
||||
[5]:http://ugetdm.com/downloads
|
Loading…
Reference in New Issue
Block a user