1. pidin
Pidin:
pidin [options] argument - display system stats
-d delay delay period in tenths of a second
-F format a string consisting of format identifiers
-f formats contiguous string of format codes (-f mbe = -F %m %b %e)
-h this message
-k print PID & NID data until an error occurs
-l display statistics at intervals decided by -d option
-M formats format string (as in printf())
-n node remote QNX node you are interested in
-o prio run at prio priority
-P pid process family (pid or name) you are interested in
-p pid process (pid or name) you are interested in
-v verbose output
Formats
A - arguments
B - what you are blocked on
E - environment
F - thread flags
H - extended scheduling
I - pid and tid
J - state of the threads (sorted by tid) of the processes
K - what kernel call was executed last
L - session id of the process
M - memory owned by the pid
N - short name of the process
O - shared libraries
P - parent group
Q - interrupts
R - timers
S - signal ignore mask
T - number of threads
U - uid
V - gid
W - euid
X - egid
Y - supplemental uid
Z - supplemental gid
a - pid
b - tid
c - code size (process)
d - data size (process)
e - parent pid
f - process flags
h - thread name
i - runmask and inherit mask
l - last CPU the thread ran on
m - stack size (process)
n - long name of process
o - coids/fds of the process
p - prio of thread
q - backtrace
s - signal queued mask
t - start time
u - amount of cpu seconds the process has consumed
v - amount of cpu seconds system has consumed on behalf of the process
w - the number of CPU seconds consumed by the children of the process
x - the number of CPU seconds consumed by the kernel on behalf of the children of the process
y - thread start time
z - thread's sutime
[ - channels
\ - supplemental groups
] - appid
_ - security type id
The following format identifiers may not work for all processes
C - children of the process
D - debug flags
G - siblings of the process
If no format is given then "%a %b %N %p %J %B" is used.
Where argument is one of:
arg, backtrace, channels, env, extsched, fam, fds, flags, info, irqs, libs,
map, mem, net, pmem, rc, regs, rmasks, sched, sig, sess, threads, timers,
times, ttimes, user
or
syspage{=section}
where section is one of:
system_private, qtime, callout, cpuinfo, cacheattr, asinfo,
hwinfo, typed_strings, strings, intrinfo, smp
其中mapinfo
mapinfo (equivalent to -F "%a %b %N %p %J %c %d %m" -M " %: @%> %; %< %= %@")
(QNX Neutrino 6.4.0 or later) Show information about memory mappings.
The output looks like this:
4101 8 proc/boot/io-usb-otg 10o RECEIVE 80K 424K 4096(20K)
libc.so.4 @b0300000 452K 16K
devu-hcd-uhci.so @b8200000 24K 4096
devu-hcd-ohci.so @b8207000 24K 4096
devu-hcd-ehci.so @b820e000 28K 4096
Mapped Phys Memory @40100000 (ee000000) 12K S
It includes:
• the memory object's name, or Mapped Phys Memory for mapped physical memory
• the memory object's address, followed by the offset if applicable
• the object's code and data sizes
• the memory object's flags (s表示share,只有data suze,没有code size)
times
times (equivalent to -F "%a %N %L %t %u %v %w %x")
Display times for the process.
For each process displayed, show:
• start time—the time and date that the process was started
• utime—the number of CPU seconds consumed by the process
• stime—the number of CPU seconds consumed by the kernel on behalf of the process
• cutime—the number of CPU seconds consumed by the children of the process
• cstime—the number of CPU seconds consumed by the kernel on behalf of the children of the process
The times for the child processes are added to cutime and cstime only after the children terminate.
From <http://www.qnx.com/developers/docs/7.0.0/com.qnx.doc.neutrino.utilities/topic/p/pidin.html>
2. slog2info (buffer set at /dev/shmem/slogger2)
• Dump the logs only from a given buffer_set file:
slog2info -l /dev/shmem/slogger2/my_test_buff
• Dump the logs from all buffer_sets with a matching name:
slog2info -b my_test_buff
• Dump information pertaining to a given buffer set file:
slog2info -i -l /dev/shmem/slogger2/my_test_buff
3. hogs
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).
From <hogs>
4. aps show
# aps show
+-------- CPU Time --------+-- Critical Time --
Partition name id | Budget | Max | Used | Budget | Used
--------------------+------------------------+---------------------
System 0 | 10.0% | 100.0% | 5.11% | 800ms | 0.000ms
pCluster 1 | 10.0% | 20.0% | 4.16% | 0ms | 0.000ms
pAdas 2 | 10.0% | 15.0% | 12.47% | 0ms | 0.000ms
pVims 3 | 10.0% | 20.0% | 0.00% | 0ms | 0.000ms
pAudio 4 | 10.0% | 40.0% | 3.27% | 0ms | 0.000ms
pAndroid 5 | 50.0% | 85.0% | 7.27% | 0ms | 0.000ms
--------------------+------------------------+---------------------
Total | 100.0% | | 32.28% |
5. showmem -a
**************************************************************************************S T A R T *****************************************************************************************
name | pid | AS (KB) | Total mem (KB) | Stack (KB) | Code (KB) | Data (KB) | Heap (KB) |Shared Lib (KB) |Mapped Mem (KB) |
/proc/boot/procnto-smp-instr | 1 | 0(bytes) | 820 | 0(bytes) | 715 | 104 | 0(bytes) | 0(bytes) | 0(bytes) |
/bin/slogger2 | 4098 | 6120 | 3614 | 36 | 60 | 368 | 304 | 10 | 2836 |
/bin/secpolgenerate | 12291 | 3128 | 4004 | 64 | 124 | 232 | 3052 | 20 | 512 |
/bin/gsl_hab_server | 5582852 | 1376 | 1476 | 56 | 104 | 668 | 620 | 28 | 0(bytes) |
/bin/bmetrics_service | 16389 | 104 | 284 | 28 | 16 | 164 | 68 | 8 | 0(bytes) |
版权声明:本文为jackjones_008原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。