QNX命令:hogs

hogs工具用于按CPU使用率降序显示进程列表,循环更新并突出高占用者。它包括PID、进程名、运行时长、系统时间占比和内存使用等信息。在多核系统中,SYS列数据不准确,建议使用top或更精确的tracelogger。
摘要由CSDN通过智能技术生成

hogs

List the processes that are hogging the CPU

Syntax:

hogs [options] [pids ...]

Runs on:

QNX Neutrino

Options:

-i iter

Limit the output to the specified number of iterations (default: no limit).

-m [e][t][p][s]

Specify the type of memory mappings to include in the memory total for each process:

  • e — MAP_ELF mappings
  • t — MAP_STACK mappings
  • s — MAP_SHARED mappings
  • p — MAP_PRIVATE mappings (the default)

You can concatenate these types; for example, -msp gives memory for both shared and private mappings.

-p priority

Run hogs at the given priority (default: the same as the parent process).

-S [c|m|p]

Sort by:

  • c — CPU (the default)
  • m — memory
  • p — process ID

-s sec

Sleep this long between updates (default: 3 seconds).

-% num [c|m]

Show only processes that consume this percentage or more CPU (c, the default) or memory (m). You can use this option to reduce the amount of output.

Description:

The hogs utility displays a list of processes in descending order by percentage of CPU usage (i.e., it shows who's hogging the processor). It loops forever, sleeping between updates.

The format of the output is tabular, and includes:

PID

The ID of the process being reported.

NAME

The name of the process.

MSEC

The number of milliseconds for which this process has been running since the last iteration.

PIDS

The amount of time that the process ran in this iteration, as a percentage of the times of all the other processes running.

SYS

The amount of time that the process ran in this iteration, as a percentage of the iteration time.

MEMORY

The amount of memory that the process used. The types of mappings included depend on the -m option.

  • The SYS column is incorrect on multicore systems; the numbers in this column will add up to (roughly) the number of processors times 100%. Use the top utility instead.
  • The numbers from hogs are approximate. For more precise data, use tracelogger and the System Analysis Toolkit (see the SAT User's Guide).

Examples:

Display the processes that are using 10% or more of the CPU:

$ hogs -% 10c

Related concepts

System Analysis Toolkit User's Guide

Fine-Tuning Your System (QNX Neutrino User's Guide)

Related reference

pidin

ps

top

tracelogger

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值