Get the App
SLTechnology News&Howtos  ›  Servers  › 

Build performance monitoring Spotlight o under linux Centos

Shulou Source: shulou.com Published: 2022-06-02 18:13:34 10月02日 Update

The company has to do stress testing, there is a Linux server, system Centos6.5, in order to intuitively show system performance, better to analyze the server, so to build a monitoring. Stop gossiping and get to the point.

First of all, a Linux server: system Centos6.5

Second, install the monitoring software client on my laptop

Software download address link:

Link: http://pan.baidu.com/s/14Vwlw password: tmw4

To configure spotlight login users, note that spotlight cannot use root users to connect by default. Users need to create a user with root permissions. Baidu is the only way to assign permissions to new accounts. Here, we focus on building a performance monitoring Spotlight on Unix under linux Centos.

(1) useradd spotlight

(2) passwd spotlight

(3) vim / etc/passwd

(4) change the UID and GID of spotlight to 0:0

Next, let's start installing sysstat on the server.

Use iostat, mpstat, sar

Yum install sysstat-y

The installation package of sysstat is: sysstat-9.0.4-20.el6.x86_64.rpm. After installation, there will be functions of iostat, mpstat, sar and sa.

Start sysstat

/ etc/init.d/sysstat start

Set sysstat self-startup

Chkconfig sysstat on

-

The main command provided by the sysstat toolkit: iostat mpstat sar

Mpstat, the abbreviation of Multiprocessor Statistics, is a real-time system monitoring tool. It reports along with some statistics for CPU, which are stored in the / proc/stat file. In a multi-CPUs system, it can view not only the average status information of all CPU, but also the information of a specific CPU. Only the parameters related to CPU of mpstat are described below. The syntax of mpstat is as follows:

Mpstat [- P {| ALL}] [internal [count]]

Mpstat-P 0 1 5

Mpstat-P ALL 1 5

The method of viewing the traffic of network card

Sar-n DEV 1 5

The last 1 / 4 of the command means: take the value once every second, take 5 times. IFACE:LAN interface

Rxpck/s: packets received per second

Txpck/s: packets sent per second

Rxbyt/s: bytes received per second

Txbyt/s: bytes sent per second

Rxcmp/s: compressed packets received per second

Txcmp/s: compressed packets sent per second

Rxmcst/s: multicast packets received per second

16:35:25 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

16:35:26 lo 0.00 0.00 0.00

16:35:26 eth0 3.00 2.00 258.00 284.00 0.00 0.00 0.00

16:35:26 eth2 51.00 89.00 5680.00 122874.00 0.00 0.00 0.00

16:35:26 sit0 0.00 0.00 0.00

16:35:26 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

16:35:27 lo 0.00 0.00 0.00

16:35:27 eth0 4.00 3.00 274.00 834.00 0.00 0.00 0.00

16:35:27 eth2 81.00 106.00 11816.00 138982.00 0.00 0.00 0.00

16:35:27 sit0 0.00 0.00 0.00

16:35:27 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

16:35:28 lo 4.00 4.00 422.00 422.00 0.00 0.00 0.00

16:35:28 eth0 1.00 1.00 70.00 598.00 0.00 0.00 0.00

16:35:28 eth2 9.00 20.00 1811.00 25787.00 0.00 0.00 0.00

16:35:28 sit0 0.00 0.00 0.00

16:35:28 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

16:35:29 lo 0.00 0.00 0.00

16:35:29 eth0 8.91 7.92 629.70 7144.55 0.00 0.00 0.00

16:35:29 eth2 20.79 22.77 1927.72 32144.55 0.00 0.00 0.00

16:35:29 sit0 0.00 0.00 0.00

16:35:29 IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

16:35:30 lo 8.08 8.08 607.07 607.07 0.00 0.00 0.00

16:35:30 eth0 6.06 5.05 418.18 1969.70 0.00 0.00 0.00

16:35:30 eth2 2.02 2.02 153.54 177.78 0.00 0.00 0.00

16:35:30 sit0 0.00 0.00 0.00

Average: IFACE rxpck/s txpck/s rxbyt/s txbyt/s rxcmp/s txcmp/s rxmcst/s

Average: lo 2.40 2.40 204.60 204.60 0.00 0.00 0.00

Average: eth0 4.60 3.80 330.40 2176.40 0.00 0.00 0.00

Average: eth2 32.80 48.00 4281.20 64057.00 0.00 0.00 0.00

Average: sit0 0.00 0.00 0.00

Iostat 1 2

[root@localhost home] # iostat 1 2

Linux 2.6.32-358.el6.x86_64 (localhost.localdomain) 11 July 2013 _ x86 CPU 641)

Avg-cpu:% user nice% system% iowait% steal% idle

0.07 0.00 0.12 0.07 0.00 99.74

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn

Scd0 0.00 0.00 0.00 288 0

Sda 0.23 2.58 5.69 168800 372132

Dm-0 0.79 2.44 5.69 159410 372080

Dm-1 0.00 0.04 0.00 2376 0

Avg-cpu:% user nice% system% iowait% steal% idle

0.00 0.00 0.00 100.00

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn

Scd0 0.00 0.00 0.00 00

Sda 0.00 0.00 0.00 00

Dm-0 0.00 0.00 0.00 00

Dm-1 0.00 0.00 0.00 00

Note that after the above installation is successful, set up the service to start automatically.

Second,

Install SpotlightonUnix_70.exe on this machine

The installation of this place is the next step, it will not be verbose.

Configure your database environment in the software when you are finished.

As shown in the picture

Tags: Data systems services monitoring information servers users software performance commands bytes tools methods permissions links configuration intuition functions pressures parameters Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi vpn MariaDB OPPO Reno NVidia