Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ ctop: monitor container performance Linux command line artifact     - Docker Basic and Advanced (Linux)

- How to Debian Linux the default Python version switch to alternative version (Linux)

- CentOS directory structure Explanation (Linux)

- Quickly locate the mistakes by gdb location (Programming)

- Windows Desktop use VNC remote connect Linux (Linux)

- Linux ls command (Linux)

- SSH keys using login and password to log prohibited practice (Linux)

- SolrCloud-5.2.1 cluster deployment and testing (Server)

- OpenvSwitch 2.1.2 shell script to start and stop (Linux)

- JavaScript prototype and the prototype chain (Programming)

- OpenJDK7 source compiler installation on CentOS 6.5 (Linux)

- Is Linux the most secure operating system (Linux)

- Android 5.1 OTA package compilation error (Programming)

- Linux Monitoring Command (Linux)

- Java multi-threaded shared communications variables (Programming)

- Nginx1.8 version upgrade method AMH4.2 Free manually compile (Server)

- Update GAMIT10.6 command (Linux)

- Security measures under Unix multi-user operating system (Linux)

- Debian 8 Jessie install LAMP server tutorial (Server)

- Ubuntu 14.10 / 14.04 how to install Quick Start tool Mutate 2.2 (Linux)

 
         
  ctop: monitor container performance Linux command line artifact
     
  Add Date : 2018-11-21      
         
         
         
  Ctop is a new command line based tool, which can be used to monitor progress in the container hierarchy. Container by using the controller group (cgroup) resource management functions, provides a virtual environment operating system level. Input and output of the tool from the cgroup collection and memory, CPU, block-related data, as well as the owner, boot time and other metadata, and presented in human-friendly format to the user, so you can quickly assess the health of the system. Based on the obtained data, it can be speculated that the lower container technique attempts. ctop also help to detect in low-memory environments who consume large amounts of memory.

Features

Some features ctop follows:

Collect CPU, memory and input-output block metric
Collection and owners, container technology and statistical information related to the task
Sort by any field of information
In the tree view displays information
Folding / unfolding cgroup tree
Select and track cgroup / container
Choose to display data refresh time window
Pause Refresh Data
Detection based on systemd, Docker and LXC container
Based on advanced features Docker and LXC container
Open / shell connection for in-depth diagnosis
Stop / kill container types
 

installation

ctop is written in Python, so, in addition to Python 2.6 or later outside (with a built-in cursor support), no other external dependencies. Pip recommend using Python installed, if you have not installed pip, please install and use pip install ctop.

Note: Sample article from Ubuntu (14.10) System

$ Sudo apt-get install python-pip
Installation using pip ctop:

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 forpackage ctop
Installing collected packages: ctop
Running setup.py install for ctop
changing mode of build / scripts-2.7 / ctop from644 to 755
changing mode of / usr / local / bin / ctop to 755
Successfully installed ctop
Cleaning up ...
If you choose not to use pip to install, you can also use wget installed directly from github:

poornima @ poornima-Lenovo: ~ $ wget https://raw.githubusercontent.com/yadutaf/ctop/master/cgroup_top.py -O ctop
--2015-04-2919: 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 in0s
2015-04-2919: 32: 59 (61.0 MB / s) - ctop saved [27314/27314]
poornima @ poornima-Lenovo: ~ $ chmod + x ctop
If cgroup-bin package is not installed, you may encounter an error message, you can install the package needs to be resolved.

poornima @ poornima-Lenovo: ~ $ ./ctop
[ERROR] Failed to locate cgroup mountpoints.
poornima @ poornima-Lenovo: ~ $ sudo apt-get install cgroup-bin

Usage Options

ctop [--tree] [- refresh =] [- columns =] [- sort-col =] [- follow =] [- fold =, ...] ctop (-h | --help )
When you enter ctop screen, you can use the (up) and down (down) arrow keys to navigate between the containers. Click on a selected container is the container, press q or Ctrl + C to exit the container.

Now, let's look at a pile of options listed above exactly how to use it.

-h / --help - displays help letter

poornima @ poornima-Lenovo: ~ $ ctop -h
Usage: ctop [options]
Options:
-h, - help show this help message andexit
--tree show tree view bydefault
--refresh = REFRESH Refresh display every
--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 - displays a tree view of the container

By default, the list view displays

When you enter ctop window, you can use the F5 button in between the tree / list view switching.

--fold = - folded in the tree view named path to the cgroup

This option requires the use of --tree combination of options.

Examples: ctop --tree --fold = / user.slice

'Ctop --fold' output

In ctop window, use the +/- keys to expand or collapse the child cgroup.

Note: At this moment, pip warehouse also not have the latest version of ctop, does not support the command line '--fold' option

--follow = - track / path highlighted cgroup

Examples: ctop --follow = / user.slice / user-1000.slice

As you can see in the screen below it, with a cgroup "/user.slice/user-1000.slice" path is highlighted, allowing users easy to trace, even if the display position has changed, too.

'Ctop --follow' output

You can also use the 'f' button to make the highlights are tracking the selected container. By default, tracing is turned off.

--refresh = - specified frequency to refresh the display, the default 1 seconds

This is for every user needs to change the display refresh rate is useful. Use 'p' button to pause and refresh select text.

--columns = - Limited show only the selected columns. 'Name' needs to be the first field, followed by followed by other fields. By default, the field includes: owner, processes, memory, cpu-sys, cpu-user, blkio, cpu-time

Examples: ctop --columns = name, owner, type, memory

'Ctop --column' output

-sort-col = - by the specified column. Default cpu-user sort

Examples: ctop --sort-col = blkio

If there are additional container Docker and LXC support, tracking options are also available:

press' a'- connected to the output terminal
press' e'- open container of a shell
press' s'- stop the container (SIGTERM)
press' k'- kill container (SIGKILL)
Currently Jean-Tiare Le Bigot also actively develop ctop in the hope that we can see the same commands as the top local features in the tool.
     
         
         
         
  More:      
 
- How do I use Linux development environment (Linux)
- Debian 8 Jessie install LAMP server tutorial (Server)
- MySQL High Availability plan several options (Database)
- Sublime Text 3 practical functions and shortcut keys used to collect (Linux)
- Hutchison DG standby database CPU consumption reached bottleneck repair (Database)
- Linux maximum number of threads and limit the number of queries the current thread (Linux)
- Linux environment variable configuration and save places (Linux)
- CentOS 6.4 Python 2.6 upgrade to 2.7 (Linux)
- How to Create a file can not be changed under Linux (Linux)
- Install mono offline on CentOS (Server)
- Oracle: RETURNING clause (Database)
- Linux variable learning experience (Linux)
- CentOS replaces update source and Linux kernel compilation summary (Linux)
- Use the command line MySQL database backup and recovery (Database)
- Python 2.7.9 Installation on Linux CentOS 6.6 (Linux)
- grep command Series: grep command to search for multiple words (Linux)
- CentOS 6.5 configuration SSDB 1.8.0 (Server)
- CentOS 7 How to install MySQL Server (Database)
- Windows7 / 8 / 8.1 hard drive to install Ubuntu 14.04 dual system (Linux)
- Zabbix monitoring tool deployment under Ubuntu server (Server)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.