当前位置:网站首页>查看线程名and设置线程名
查看线程名and设置线程名
2022-06-09 12:01:00 【aningxiaoxixi】
1
先知道pid 在那一列
ps -aux | head -n 10
2
查看 进程pid
ps -aux | grep a.out
3
查看进程名字相关信息
ps -T -p 3680 # 可以看到pid tid
top -H -p 3759 # 可以查看cpu 利用率
4
如何设置linux 线程名字
参考:Linux 平台 C/C++ 代码中设置线程名
A 添加头文件
#include <sys/prctl.h>
B 在线程回调函数里面 添加名字设置
prctl(PR_SET_NAME, thread_name1);
边栏推荐
- SIGIR 2022 | CMI: micro video recommendation combining comparative learning and multi interest mining
- 聊聊最近的一些情况
- [reprint] understand G1 garbage collector
- .NET基础知识快速通关11
- 道友,你在项目中使用Redis跟三圣母有啥关系?
- Play with Web3: create your own erc-721 (NFT)
- LR11 installation error: vc2005 is missing on this computer_ sp1_ with_ atl_ fix_ Redist, please install all missing required components, and then run this installation again.
- Lombok - exception non static variable org cannot be referred from a static context
- ORM框架简介和常用ORM框架
- . Net basic knowledge quick pass 11
猜你喜欢

Tag greedy - brush questions to prepare knowledge - greedy problem solving methods + lt.455 Distribute cookies + lt.376 Wobble sequence

Go language time Format pit

死锁的排查工具有哪些?

Golang-RPC(七):如何调试gRPC服务

Range method returns the object conversion method

什么是硬实时数据库系统?

JUC-实现Future

.NET基础知识快速通关8

What are the deadlock troubleshooting tools?

PostgreSQL weekly news - june1,2022
随机推荐
Live broadcast preview | database salon – [special session on open source ecology]
柴云鹏:创新能力的培养至关重要|OceanBase 数据库大赛访谈
谢孟军:中国 Go 语言领军人创业第五年
Nanny tutorial: how to become a contributor to Apache linkis documents
Flutter插件推荐spider
Zotero | Literature Association
什么是硬实时数据库系统?
PostgreSQL每周新闻—2022年6月1日
GDI+ 中图像矩阵变换
What are the deadlock troubleshooting tools?
3. < tag backtracking, combination and pruning > lt.17 Letter combination of telephone number
Classes internes anonymes et variables locales
Are there any financial products with guaranteed principal and interest in 2022? I want to invest and manage money, but I'm afraid of losing money
MySQL SQL statement optimization
Composition maximum area
Zotero | 文献关联
勤于奋说说这几天干嘛了
保姆级教程:如何成为Apache Linkis文档贡献者
leetcode 1332. Remove Palindromic Subsequences(删掉回文子串)
GDI+ 中区域的使用