# top工具 **Repository Path**: llqm/top-tool ## Basic Information - **Project Name**: top工具 - **Description**: 用C语言实现类似top功能的命令行工具。 - **Primary Language**: C - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-18 - **Last Updated**: 2023-09-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # top工具 #### 介绍 用C语言实现类似top功能的命令行工具。 #### 软件架构 软件架构说明 #### 安装教程 1如果用户的系统上尚未安装ncurses库,需要先进行安装。在Ubuntu系统上安装ncurses库。 sudo apt-get update sudo apt-get install libncurses-dev #### 使用说明 1. 编译:gcc -o t test.c -lncurses -lm 2. 运行: ./t ./t -i [刷新间隔时间] ./t -p [pid] //只输出指定进程的详细信息 ./t -n [进行top命令次数] //输出满足需要的top命令次数后结束任务 3. ./t 命令运行可捕捉键盘输入, 有效字符: - q //退出top - s //获取用户输入的间隔时间 - p //与默认一致不做处理,即按%cpu值排序输出 - h //显示帮助信息 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)