Linux installation using the monitoring software Collectl method

  
                

As a Linux system monitoring tool, Collectl is a recommended software. Collectl can keep track of the running status of the system. It can also use collectl for intelligent statistics like the iotop command. The following small series will introduce you to the installation of Collectl. And use.

System Resource Monitoring

Collectl as a lightweight monitoring tool is the most versatile tool in its class. Users can monitor different complex system matrix values ​​and retain data for later analysis. Unlike other tools that only monitor specific system parameters, Collectl can monitor different variables simultaneously and record them in a suitable way.

Unlike different or focused on a small set of statistics, using a single output method, or using iterative, most of the monitoring tools that run as a daemon, collectl can be implemented at the same time. Users can choose any of a variety of subsystems to monitor memory, CPU, disk, inode, wireless bandwidth, lustre, memory, network, network file system, process, quadratic, slabs, sockets and TCP. information.

Let's take a look at the following commands before going deeper.

$ collectl

waiting for1 second sample. .

#《--------CPU--------》"----------Disks-----------" "----------Network----------"

#cpu sys inter ctxsw KBRead Reads KBWrit Writes KBIn PktIn KBOut PktOut

00864177200000100< Br>

521338273400820001

1012222647009230201

107631722008030102

CPU usage, disk input and output, and network activity are loaded in units per second. This information is easy to read for those who can understand the data. This list will continue to increase over a given time interval and can directly form a file tracking log. The collectl tool provides a variety of commands to record, find, and do other processing of this data.

Installing the collectl tool

For Ubuntu/Debian users, Collectl is the default resource, so you can get it with the apt command.

$ sudo apt-get install collectl

Fedora/CentOS users can get it using the yum command.

$ yum install collectl

Using

The necessary understanding - Collector subsystem

The subsystem is a different type of system resource that can be detected. Like CPU, memory, bandwidth, etc. can form a subsystem. Running only the collectl command will output CPU, disk and network subsystem information in batch mode, as we saw above.

As you can see from the operating instructions, Collectl recognizes the following subsystems.

Total Subsystem

b - buddy info (memory clip)

c - CPU

d -Disk

f - NFS V3 Data

i -InodeandFileSystem

j -Interrupts

l -Lustre

m -Memory

n -Networks

s -Sockets

t - TCP

x -Interconnect

y -Slabs(system object caches)

Detail Subsystem

This is a series of details, and in most cases is derived from the corresponding total data. Currently, there is no corresponding total data for the "environmental variables" and “process”2 classes. If you have 3 disks, select -sd and you will only see a single message from the combination of 3 disks. If you select -sD, each disk information will be displayed separately.

C - CPU

D -Disk

E -Environmental data (fan, power, temp), via ipmitool

F - NFS Data

J -Interrupts

L -Lustre OST detail OR client Filesystem detail

M -Memory node data, which is also known as numa data

N -Networks

T -65 TCP counters only available in plot format

X -Interconnect

Y -Slabs(system object caches)

Z -Processes

Use “-s” to monitor specific subsystems and add subsystem identifications to them. Let us give a few examples now.

1. Monitoring cpu usage

Monitoring total CPU usage with “-sc”

$ collectl -sc

waiting for1 second Sample. .

#"--------CPU--------"

#cpu sys inter ctxsw

3018003729

3017673599

Use “-C” to observe individual CPU usage. The result will be output multiple lines, one for each CPU.

$ collectl -sC

waiting for1 second sample. .

# SINGLE CPU STATISTICS

# Cpu User Nice Sys Wait IRQ Soft Steal Idle

0300000096

1300000096

2200000097

3100000098

0200000097

1202000095

2100000098

3401000095

If you want, you can use both C and c to get a single item. The CPU monitors the data and aggregates the data.

2. Memory Monitoring

Use the m subsystem to view memory.

$ collectl -sm

waiting for1 second sample. .

#"-----------Memory------------"

#Free Buff Cach Inac Slab Map

2G220M1G1G210M3G

2G220M1G1G210M3G

2G220M1G1G210M3G

Not difficult to explain. M is used to view more memory details.

$ collectl -sM

waiting for1 second sample. .

# MEMORY STATISTICS

# Node Total Used Free Slab Mapped Anon Locked Inact Hit%

07975M5939M2036M215720K372184K06652K1434M0

07975M5939M2036M215720K372072K06652K1433M0

3. View Disk Usage

d and D can view the overview and details of disk usage.

$ collectl -sd

waiting for1 second sample. .

#"----------Disks-----------"

#KBRead Reads KBWrit Writes

4113624< Br>

008013

$ collectl -sD

waiting for1 second sample. .

# DISK STATISTICS (/sec)

# "---------reads---------" "-------- -writes---------"--------averages--------" Pct

#Name KBytes Merged IOs Size KBytes Merged IOs Size RWSize QLen Wait SvcTim Util

sda 0000000000000

sda 0000000000000

sda 10211715322621

sda 0000921151818112125

“--verbose” To see additional information. Unlike the D command, it expands the overview and contains more information.

$ collectl -sd --verbose
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved