Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the cTop tool in linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what is the use of cTop tools in linux. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

What is cTop?

Ctop provides a concise and concise real-time overview of metrics for multiple containers. It is a top-like interface for container metrics.

It shows container metrics such as CPU utilization, memory utilization, disk I ID O read and write, process ID (PID) and network send (TX-sent from this server) and accept (RX-accepted by this server).

Ctop comes with built-in support for Docker and runc; connectivity to other container and cluster systems is planned for future releases.

It does not require any parameters and uses the Docker host variable by default.

Recommended reading:

Portainer-A simple Docker graphical management interface

Rancher-A complete container management platform for production environment

How to install cTop

The developer provides a simple shell script to help us use ctop directly. All we have to do is download the ctop shell file in the / bin directory to ensure global access. * * give ctop script file execution permission.

Download the ctop shell script in the / usr/local/bin directory.

$sudo wget https://github.com/bcicen/ctop/releases/download/v0.7/ctop-0.7-linux-amd64-O / usr/local/bin/ctop

Set execution permissions on the ctop shell script.

$sudo chmod + x / usr/local/bin/ctop

In addition, you can install and run ctop through docker. Before you do that, make sure you have installed docker.

$docker run-- rm-ti\-- name=ctop\-v / var/run/docker.sock:/var/run/docker.sock\ quay.io/vektorlab/ctop:latest how to use cTop

Start the ctop program directly without any parameters. By default, the a key bound to it is used to show all containers (running and not running).

The ctop header shows your system time and the total number of containers.

$ctop

You may get similar output as follows.

How to manage containers

You can use ctop to manage containers. Select a container you want to manage and press enter to select the desired options such as start, stop, remove, etc.

How to sort containers

The default ctop uses the state field to sort the container. Press the s key to sort the containers by different aspects.

How to view container metrics

If you want to see more details and metrics about containers, just select the appropriate container you want to view and press the o key.

How to view container logs

Select the appropriate container in which you want to view the log and press l.

Show only active containers

Run the ctop command with the-an option to display only the active container

Open the help dialog box

To run ctop, simply press the h key to open the help section.

The above is all the content of the article "what is the use of cTop tools in linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report