All Projects → leeyoshinari → performance_monitor

leeyoshinari / performance_monitor

Licence: MIT license
Monitor Linux system

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to performance monitor

Processhacker
A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
Stars: ✭ 6,285 (+20850%)
Mutual labels:  monitor, performance-monitoring
Holy Lance
A Linux Resource / Performance Monitor based on PHP.
Stars: ✭ 311 (+936.67%)
Mutual labels:  monitor, performance-monitoring
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+7503.33%)
Mutual labels:  monitor, performance-monitoring
App perf
Open source application performance monitoring tool with emphasis on ease of setup and use. Providing similar functionality like NewRelic/AppNeta/Skylight etc.
Stars: ✭ 353 (+1076.67%)
Mutual labels:  monitor, performance-monitoring
Mthawkeye
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Stars: ✭ 1,119 (+3630%)
Mutual labels:  monitor, performance-monitoring
Nemetric
前端性能指标的监控,采集以及上报。用于测量第一个dom生成的时间(FP/FCP/LCP)、用户最早可操作时间(fid|tti)和组件的生命周期性能,,网络状况以及资源大小等等。向监控后台报告实际用户测量值。
Stars: ✭ 145 (+383.33%)
Mutual labels:  monitor, performance-monitoring
Droidtelescope
DroidTelescope(DT),Android端App性能监控框架
Stars: ✭ 231 (+670%)
Mutual labels:  monitor, performance-monitoring
speedy
Test, track, monitor and analyze your internet speed.
Stars: ✭ 35 (+16.67%)
Mutual labels:  monitor
logger-python
Log API requests and responses with Python
Stars: ✭ 22 (-26.67%)
Mutual labels:  aiohttp
Intercept-netkeeper-account
截取NetKeeper拨号时的真实账号,截获到的账号可以用于路由器、电脑等的pppoe拨号,可用4.9及其以下版本的NetKeeper
Stars: ✭ 57 (+90%)
Mutual labels:  monitor
monitor-man
HTTP API monitor based on postman and newman.
Stars: ✭ 44 (+46.67%)
Mutual labels:  monitor
bundlemon
Monitor your bundle size
Stars: ✭ 53 (+76.67%)
Mutual labels:  monitor
StatusPilatus
Monitor your PC like never before!
Stars: ✭ 52 (+73.33%)
Mutual labels:  monitor
aiohttp-cache
A cache system for aiohttp server
Stars: ✭ 39 (+30%)
Mutual labels:  aiohttp
dde-istate-menus
a dde-dock plugin which aims to implement most features of Istat menus(macOS) for Deepin V20
Stars: ✭ 30 (+0%)
Mutual labels:  monitor
vaper
Take a look at the relations among servers.
Stars: ✭ 16 (-46.67%)
Mutual labels:  monitor
pyladies-courseware
Homework/task submit and review web app · based on React and Python aiohttp
Stars: ✭ 14 (-53.33%)
Mutual labels:  aiohttp
mix-agent
基于rust语言开发的一套运维监控探针,支持widnows、linux、macos系统
Stars: ✭ 14 (-53.33%)
Mutual labels:  monitor
stream video server
demonstrates how to create video streaming server with the help of aiohttp and opencv
Stars: ✭ 15 (-50%)
Mutual labels:  aiohttp
swarm-monitor
Monitor a Docker Swarm with Blinkt! LED
Stars: ✭ 48 (+60%)
Mutual labels:  monitor

performace_monitor

中文文档

Recommend: There is a shell tool that integrates server monitor, you can use it to ssh linux and view monitor. Welcome to use it.

Introduction

Completed functions

  1. Monitoring the CPU usage, IO wait, Memory, Disk IO, Network, and TCP connections of the server.
  2. Monitoring the CPU usage, Context switching, Memory, Disk read and write, and TCP connections of the specified port.
  3. For Java applications, monitoring size of JVM and Garbage collection; when the frequency of Full GC is too high, an email alert will be sent.
  4. When the Server CPU usage is too high, or free memory is too low, an email alert will be sent; And can clear the cache automatically.
  5. Start or Stop monitoring specified port at any time.
  6. When the port restarts, it can automatically re-monitor.
  7. Support Operational monitoring, when the port stopped, an email alert will be sent.
  8. Stopping the Agent directly on the Server.
  9. Monitoring data can be visualized according to the specified time period.
  10. Calculate the percentiles of the CPU, Disk IO, and Network.
  11. Monitoring data sampling frequency is up to about 1 time/sec, and any frequency can be set.
  12. The real-time usage of server(CPU, Memory, and Disk) can be viewed directly on the page.
  13. A Server can manager multiple Agents at the same time.
  14. If Server is stopped, it doesn't affect the monitoring of Agent.

Implement

  1. Framework: aiohttp.
  2. Template rendering: jinja2.
  3. Visualization: echarts.
  4. Thread pool and queue to monitor.
  5. Database: InfluxDB.
  6. In order to ensure the accuracy of the monitoring data, use Linux's commands to get data directly, and there is no curve fitting during visualization.

Usage

  1. Clone performance_monitor

    git clone https://github.com/leeyoshinari/performance_monitor.git

    The server folder is the Server, and only one needs to be deployed; the agent folder is Agent, and deployed on the servers that need to be monitored.

  2. Deploy InfluxDB, installation steps on CentOS are as follows:
    (1) Download and install
    wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.3.x86_64.rpm
    yum localinstall influxdb-1.8.3.x86_64.rpm
    (2) Start
    systemctl enable influxdb
    systemctl start influxdb
    (3) Modify configuration
    vim /etc/influxdb/influxdb.conf
    Around line 256, modify port: bind-address = ":8086"
    Around line 265, log disable: log-enabled = false
    Restart InfluxDB
    (4) Create database
    create database test
    use test
    create user root with password '123456' create user and password
    grant all privileges on test to root grant privileges

  3. Respectively modify the configuration files config.ini in the server and agent folders.

  4. Check the version of sysstat. Respectively use commands iostat -V and pidstat -V, the version of 12.4.0 has been tested, if not, please click me to download it.

  5. Respectively run server.py in server and agent folders.

    nohup python3 server.py &
  6. Visit pages
    (1) After Agent is started, visit http://ip:port, you can see the server's data(CPU, Meeory, Disk, Network, etc.).
    agent home

    (2) After server is started, visit http://ip:port/'context', you can see some informations about Agents.
    server home

    (3) Click MonitorList tab to see the monitoring page. Select server and enter the port, then click the startMonitor button to start monitoring the port on the selected server; click the stopMonitor button to stop monitoring the port on the selected server.
    startMonitor

    (4) Click Visualize tab to see the visualization page. Select server, type, disk, startTime and endTime, then click the Visualize button to visualize the monitoring data.
    Visualize

Package

Using pyinstaller to package python code. After packaging, it can be quickly deployed agent on other Agents without installing python3.7+ and third-party packages.
Before packaging, you must ensure that the python code can run normally.

  1. Package server
    (1) Enter the server folder, run:

    pyinstaller -F server.py -p draw_performance.py -p config.py -p Email.py -p logger.py -p process.py -p request.py -p __init__.py --hidden-import draw_performance --hidden-import config --hidden-import logger --hidden-import Email --hidden-import process --hidden-import request
    

    (2) Enter dist folder, find the executable file server,
    (3) Copy config.ini to the dist folder,
    (4) Copy templates and static to the dist folder,
    (5) Start server

    nohup ./server &
  2. Package agent
    (1) Enter agent folder, run:

    pyinstaller -F server.py -p performance_monitor.py -p logger.py -p config.py -p common.py -p __init__.py --hidden-import logger --hidden-import performance_monitor --hidden-import common --hidden-import config

    (2) Enter dist folder, find the executable file server,
    (3) Copy config.ini to the dist folder,
    (4) Copy the dist folder to other servers, and start server

    nohup ./server &

    NOTE: Since the agent needs to run on the server to be monitored, the executable file packaged on the server of the CentOS system X86 architecture can only run on the server of the CentOS system X86 architecture; servers of other system and architecture need to be repackaged agent.

Note

  1. The server must support the following commands: ps, jstat, iostat, pidstat and netstat, if not, please install them.

  2. The network card of server must be in full duplex mode, if not, the network usage will be incorrect.

  3. The version of sysstat must be 12+, the 12 version has been tested, other versions have not been tested, and using old version may cause data abnormalities; please click me to download the latest version.

  4. If you don’t know how to install Python3.7+ on Linux server, please click me.

  5. The code can be run on almost any linux system that can run python. The tested systems have CentOS, Ubuntu, KylinOS, NeoKylin, support X86_64 and ARM architecture.

  6. If you encounter the issue #8 , please rename draw_performance1.py to draw_performance.py, and rename performance_monitor1.py to performance_monitor.py. If you know how to solve this issue, please tell me, thank you very much!

Requirements

  1. aiohttp>=3.6.2
  2. aiohttp_jinja2>=1.2.0
  3. jinja2>=2.10.1
  4. influxdb>=5.2.3
  5. requests
  6. Python 3.7+
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].