tpProcessManage类
ExternUtils
2025-07-05
基础信息
头文件: | include <tpProcessManage.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 成员函数
tpProcessManage(bool enabled=true, uint16_t samp=1000) | ||
---|---|---|
~tpProcessManage() | ||
getCpuUsage(int pid) | 获取进程以及子进程的CPU总使用率 | |
getCpuUsage(tpProcessInfo *app) | 获取进程以及子进程的CPU总使用率 | |
getGpuUsage(int pid) | 获取进程以及子进程的GPU总使用率 | |
getGpuUsage(tpProcessInfo *app) | ||
getMemoryUsage(int pid) | 获取进程以及子进程的内存总使用率 | |
getMemoryUsage(tpProcessInfo *app) | 获取进程以及子进程的内存总使用率 | |
getDiskReadSpeed(int pid) | 获取进程以及子进程的磁盘总读速度 | |
getDiskReadSpeed(tpProcessInfo *app) | 获取进程以及子进程的磁盘总读速度 | |
getDiskWriteSpeed(int pid) | 获取进程以及子进程的磁盘总写速度 | |
getDiskWriteSpeed(tpProcessInfo *app) | 获取进程以及子进程的磁盘总写速度 | |
getNetUpSpeed(int pid) | 获取进程以及子进程的网络总上传速度 | |
getNetUpSpeed(tpProcessInfo *app) | 获取进程以及子进程的网络总上传速度 | |
getNetDownSpeed(int pid) | 获取进程以及子进程的网络总下载速度 | |
getNetDownSpeed(tpProcessInfo *app) | 获取进程以及子进程的网络总下载速度 | |
update() | 更新进程树及信息(使能自动更新时无需调用) | |
tpProcessInfo * | findProcess(tpString &name) | 使用进程名查找进程(暂时不支持) |
tpProcessInfo * | findProcess(int pid) | 使用进程ID查找进程 |
printProcessTree(tpProcessInfo *app, int level=0) const | 打印某个进程的进程树(调试使用) | |
tpList< tpProcessInfo * > | getChildren(int pid) | |
tpProcessInfo * | getParent(int pid) | |
threadUpdateStat(uint16_t time_samp) | ||
updateInfo() | ||
updateNetLocalAddr() | ||
updateConnectInfo() | ||
initNetworkMonitor() | ||
deinitNetworkMonitor() | ||
countProcessInfo(tpProcessInfo *process, double samp) | ||
getProcessInfo(int pid) | ||
getProcessInfo(tpProcessInfo *process) | ||
updateProcessTree() | ||
updateProcessTree(uint16_t samp_time) | ||
getAllProcessMap(std::map< int, tpProcessInfo * > &processMap) | ||
std::map< int, tpProcessInfo * > * | getProcessInfoMap() | |
getPcapHandle() | ||
thread_pcap_cpature(void *param) | ||
packet_handler(unsigned char *args, const struct pcap_pkthdr *header, const unsigned char *packet) |
成员函数说明
tpProcessManage::tpProcessManage(bool enabled=true, uint16_t samp=1000)
暂无注释...
tpProcessManage::~tpProcessManage()
暂无注释...
double tpProcessManage::getCpuUsage(int pid)
点击查看...
获取进程以及子进程的CPU总使用率
double tpProcessManage::getCpuUsage(tpProcessInfo *app)
点击查看...
获取进程以及子进程的CPU总使用率
double tpProcessManage::getGpuUsage(int pid)
点击查看...
获取进程以及子进程的GPU总使用率
double tpProcessManage::getGpuUsage(tpProcessInfo *app)
暂无注释...
double tpProcessManage::getMemoryUsage(int pid)
点击查看...
获取进程以及子进程的内存总使用率
double tpProcessManage::getMemoryUsage(tpProcessInfo *app)
点击查看...
获取进程以及子进程的内存总使用率
double tpProcessManage::getDiskReadSpeed(int pid)
点击查看...
获取进程以及子进程的磁盘总读速度
double tpProcessManage::getDiskReadSpeed(tpProcessInfo *app)
点击查看...
获取进程以及子进程的磁盘总读速度
double tpProcessManage::getDiskWriteSpeed(int pid)
点击查看...
获取进程以及子进程的磁盘总写速度
double tpProcessManage::getDiskWriteSpeed(tpProcessInfo *app)
点击查看...
获取进程以及子进程的磁盘总写速度
double tpProcessManage::getNetUpSpeed(int pid)
点击查看...
获取进程以及子进程的网络总上传速度
double tpProcessManage::getNetUpSpeed(tpProcessInfo *app)
点击查看...
获取进程以及子进程的网络总上传速度
double tpProcessManage::getNetDownSpeed(int pid)
点击查看...
获取进程以及子进程的网络总下载速度
double tpProcessManage::getNetDownSpeed(tpProcessInfo *app)
点击查看...
获取进程以及子进程的网络总下载速度
void tpProcessManage::update()
点击查看...
更新进程树及信息(使能自动更新时无需调用)
tpProcessInfo * tpProcessManage::findProcess(tpString &name)
点击查看...
使用进程名查找进程(暂时不支持)
tpProcessInfo * tpProcessManage::findProcess(int pid)
点击查看...
使用进程ID查找进程
void tpProcessManage::printProcessTree(tpProcessInfo *app, int level=0) const
点击查看...
打印某个进程的进程树(调试使用)