Giter VIP home page Giter VIP logo

taskmgr's Introduction

Taskmgr

linux资源管理 截图录屏_选择区域_20210215172040

项目背景

一直在同时使用Windows和Linux,在对计算机的资源监视方面,感觉linux下的ps和top工具不如Windows下的资管管理器直观,简洁和高效。因此,决定按照Windows下的资源管理器格式写一版Linux下的资源管理器

上手指南

下载dist目录下的Taskmgr文件,查看其文件属性是否可执行,将其改为可执行文件。使用root权限可以直接在Linux下运行,该文件是通过pyinstaller打包,已经包含了所需要的第三方库,该项目仅在deepin20下经过测试,如果使用过程发现bug,请提交反馈。如果你想查看代码,请下载Taskmgr.py和pns.py。

技术原理

该项目主要技术难点在于进程部分的网速统计,需要抓取网卡上的所有数据包,并通过/proc/pid/fp找到所有的socket文件对应的inode号。通过inode号和/proc/net/tcp和/proc/net/udp目录下的socket的信息匹配,并将该socket信息和捕获到的数据包进行匹配,最终计算出每个进程的网速。 其余信息通过/proc目录和psutils库得到。具体做法,有时间再写。

版本控制

version :0.0.2

作者

instinctisbase

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.