Giter Club home page Giter Club logo

serverstatus's Introduction

Hi there 👋

serverstatus's People

Watchers

 avatar

serverstatus's Issues

支持 Python 3

由于编码类型不兼容,当前客户端程序在 Python 3 下报错:

Caught Exception: a bytes-like object is required, not 'str'

该问题导致服务端无法接收客户端信息。

改进方案:

  • 根据 Python 版本选用不同的 status-client.py 修改 status-client.py
  • 优化脚本部署流程,添加对 Python 版本的检测和自动配置

客户端在 Python 3.8 下运行失败

由于 platform.linux_distribution() 属性在 Python 3.5 中已废弃(3.5.9 Documentation),在 3.8 正式被移除(issue28167),因此会产生以下异常:

Caught Exception: module 'platform' has no attribute 'linux_distribution'

该问题位于获取 TCP 连接数的函数 get_load()

def get_load():
system = platform.linux_distribution()
if system[0][:6] == "CentOS":

解决方案:

使用 systemd 管理服务

三种发行版均默认支持 systemd,当前脚本采用的服务管理程序仍为 init。

改进方案:

  • 单独划分出使用 systemd 的脚本,与 init 版本共同维护

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.