Set up performance monitoring Spotlight in Centos
The company wants to perform a stress test with a Linux server and Centos6.5. To intuitively display the system performance and better analyze the server, we need to build a monitoring system. Let's go straight to the topic.
First, a Linux Server: Centos6.5
Second, install the monitoring software client on my laptop
Software link:
Link: http://pan.baidu.com/s/14Vwlw password: tmw4
Configure spotlight login users. Note that by default, spotlight cannot be connected by the root user. You must create a user with the root permission. For details about how to create an account and assign permissions, refer to Baidu. Here we will focus on setting up performance monitoring in Centos linux Spotlight on Unix.
(1) useradd spotlight
(2) passwd spotlight;
(3) vim/etc/passwd
(4) change the UID and GID of spotlight to 0: 0.
Next, we start to install sysstat on the server.
Use iostat, mpstat, and sar
Yum install sysstat-y
Sysstat installation package is: sysstat-9.0.4-20.el6.x86_64.rpm, after installation there will be iostat, mpstat, sar, sa Function
Start sysstat
/Etc/init. d/sysstat start
Set sysstat to start automatically
Chkconfigsysstat on
---------------------
The main command provided by the sysstat Toolkit: iostat mpstat sar
Mpstat is short for Multiprocessor Statistics and is a real-time system monitoring tool. Its report and CPU statistics are stored in the/proc/stat file. In a multi-CPUs system, it can not only view the average status information of all CPUs, but also view the information of specific CPUs. The following describes only the CPU-related parameters of mpstat. The mpstat syntax is as follows:
Mpstat [-P {| ALL}] [internal [count]
Mpstat-P 0 1 5
Mpstat-p all 1 5
How to view network card Traffic
Sar-n DEV 1 5
The value 1 4 after the command indicates that the value is obtained once every second and 5 times. IFACE: LAN interface
Rxpck/s: packets received per second
Txpck/s: Packets sent per second
Rxbyt/s: number of bytes received per second
Txbyt/s: number of bytes sent per second
Rxcmp/s: compressed data packets received per second
Txcmp/s: compressed data packets sent per second
Rxmcst/s: multicast packet received per second
16: 35 minutes 25 seconds IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
16: 35 minutes 26 seconds lo0.000.000.000.000.000.000.000.00
16: 35 minutes 26 seconds eth03.002.00258.00284.000.000.000.00
16: 35 minutes 26 seconds eth151.0089.005680.00122874.000.000.000.00
16: 35 minutes 26 seconds sit00.000.000.000.000.000.000.000.00
16: 35 minutes 26 seconds IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
16: 35 minutes 27 seconds lo0.000.000.000.000.000.000.000.00
16: 35 minutes 27 seconds eth04.003.00274.00834.000.000.000.00
16: 35 minutes 27 seconds eth181.00106.0011816.00138982.000.000.000.00
16: 35 minutes 27 seconds sit00.000.000.000.000.000.000.000.00
16: 35 minutes 27 seconds IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
16: 35 minutes 28 seconds lo4.004.00422.00422.000.000.000.00
16: 35 minutes 28 seconds eth01.001.0070.00598.000.000.000.00
16: 35 minutes 28 seconds eth19.000000001811.0025787.000.000.000.00
16: 35 minutes 28 seconds sit00.000.000.000.000.000.000.000.00
16: 35 minutes 28 seconds IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
16: 35 minutes 29 seconds lo0.000.000.000.000.000.000.000.00
16: 35 minutes 29 seconds eth08.917.92629.707144.550.000.000.00
16: 35 minutes 29 seconds eth120.7922.771927.7232144.550.000.000.00
16: 35 minutes 29 seconds sit00.000.000.000.000.000.000.000.00
16: 35 minutes 29 seconds IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
16: 35 minutes 30 seconds lo8.088.08607.07607.070.000.000.00
16: 35 minutes 30 seconds eth06.065.05418.181969.700.000.000.00
16: 35 minutes 30 seconds eth12.022.02153.54177.780.000.000.00
16: 35 minutes 30 seconds sit00.000.000.000.000.000.000.000.00
Average: IFACErxpck/stxpck/srxbyt/stxbyt/srxcmp/stxcmp/srxmcst/s
Average: lo2.402.40204.60204.600.000.000.00
Average: eth04.603.80330.402176.400.000.000.00
Average: eth132.8048.004281.2064057.000.000.000.00
Average: sit00.000.000.000.000.000.000.000.00
Iostat 1 2
[Root @ localhosthome] # iostat12
Linux2.6.32-358. el6.x86 _ 64 (localhost. localdomain) February _ x86_64 _ (1 CPU)
Avg-cpu: % user % nice % system % iowait % steal % idle
0.070.000.120.070.0099.74
Device: tpsBlk_read/sBlk_wrtn/sBlk_readBlk_wrtn
Stc00.000.000.002880
Sda0.232.585.69168800372132
Dm-00.792.445.69159410372080
Dm-10.000.040.0023760
Avg-cpu: % user % nice % system % iowait % steal % idle
0.000.000.000.000.000.00100.00
Device: tpsBlk_read/sBlk_wrtn/sBlk_readBlk_wrtn
Sp_00.000.000.0000
Sda0.000.000.0000
Dm-00.000.000.0000
Dm-10.000.000.0000
Note: After the installation is successful, you must set automatic service startup.
Second,
Install spotlightonunix_70.exe locally
This is the next step for installation.
Configure your database environment in the software.