前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >java系统问题之cpu占用过高

java系统问题之cpu占用过高

原创
作者头像
CoffeeLand
修改2020-04-07 11:21:53
8800
修改2020-04-07 11:21:53
举报
文章被收录于专栏:CoffeeLandCoffeeLand

Table of Contents

  • Prerequisite
  • Top intro
  • Use top to find the thread information

Prerequisite

系统负载(system load)

系统负载(System Load)是系统CPU繁忙程度的度量,即有多少进程在等待被CPU调度(进程等待队列的长度)。

平均负载(Load average)

load average: 0.52, 0.27, 0.25

Load average 表示系统的cpu的平均的负载

平均负载(Load Average)是一段时间内系统的平均负载,这个一段时间一般取1分钟、5分钟、15分钟。

来自 <https://blog.csdn.net/ztf312/article/details/80342234>

Pwdx (显示进程的当前工作目录)

pwdx - report current working directory of a process

pwdx <pid>

Vim

代码语言:javascript
复制
+/{pat} 
For the first file the cursor will be positioned on the
 first occurrence of {pat}. See ":help search-pattern" for
 the available search patterns.
 
 - The file to edit is read from stdin. Commands are read from stderr, which should be a TTY.

jstack <pid>

jstack 15400 | vim +/0x3c2a -

表示直接从进程15400产生的线程stack信息, 去定位线程id是0x3c2a的线程栈信息

Top intro

实时显示系统的进程占CPU的情况, 或者是实时显示系统的负载情况

Use top to find the thread information

  • top (find the pid which has the largest cpu usage)
  • top -Hp <pid> (find the thread id )
  • Prinf "0x%x\n" <thread-id>
  • jstack <pid> | vim +/<hex_threadid> -

<hey, man or lady, 阅读完了,请点赞支持, 非常感谢:)>

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Table of Contents
  • Prerequisite
    • 系统负载(system load)
      • 平均负载(Load average)
        • Pwdx (显示进程的当前工作目录)
          • Vim
          • Top intro
          • Use top to find the thread information
          • <hey, man or lady, 阅读完了,请点赞支持, 非常感谢:)>
          相关产品与服务
          命令行工具
          腾讯云命令行工具 TCCLI 是管理腾讯云资源的统一工具。使用腾讯云命令行工具,您可以快速调用腾讯云 API 来管理您的腾讯云资源。此外,您还可以基于腾讯云的命令行工具来做自动化和脚本处理,以更多样的方式进行组合和重用。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档