pidin
Display information about the processes in the system (QNX Neutrino)
Syntax:
pidin [-hklv] [-d delay] [-F formats] [-f formats] [-M formats]
[-n node] [-o prio] [-P pid] [-p pid] [shorthand ...]
Runs on:
QNX Neutrino
Options:
- -d delay
- The delay, in tenths of a second, to use when looping with the -l option. The default is 10.
- -F formats
- A combination of format codes, like the
format string for
printf().
Each code consists of a percent sign (
%), an optional width for the field, and a format character (e.g.,"%I %60N"). For more information, seeFormat characters,
below.If you don't specify any format codes, the default is
"%a %b %N %p %J %B". - -f formats
- The same as the -F option, but the formats parameter is a contiguous string of format codes that gets expanded. For example, -f mbe is expanded to -F "%m %b %e".
- -h
- Display a brief usage message.
- -k
- Keep displaying data for PIDs and TIDs until an error occurs, for example, encountering a PID/TID in an unknown state (because the PID/TID is partially alive).
- -l
- Loop mode; display statistics every delay tenths of a second (specified with the -d option).
- -M formats
- A combination of format characters, each following a percent sign
(
%), like the format string for printf(), that controls the formatting of information about memory regions. For more information, seeMemory format characters,
below. - -n node
- The name of the remote node from which to get the information.
Note:The -n option isn't compatible with the
oformat or the extsched and fds shorthands. Instead, you can use on -f; for example:on -f remote_node pidin fds - -o prio
- Run at prio priority.
- -P pid
- Show only the process family you're interested in (pid may be a name or number).
- -p pid
- Show only the process you're interested in
(pid may be a name or number).
Note:If the pid for the -P or -p option is a number, it's interpreted as a process ID; otherwise, it's interpreted as a name. To avoid confusion, don't assign a numerical name to a process.
- -v
- (QNX Neutrino 7.0 or later) Be verbose; provide additional information that depends on the format characters or shorthand, as described below.
- shorthand
- A name that represents a certain combination of format codes or a
special command:
- abilities
- arguments
- backtrace
- channels
- environment
- extsched
- family
- fds
- flags
- info
- irqs
- libs
- mapinfo
- memory
- net
- pmem
- rc
- regs
- rlimits
- rmasks
- sched
- session
- signals
- syspage
- threads
- timers
- times
- tolerance
- ttimes
- users
You need to type only as many characters of the name as are required to uniquely identify it. For more information, see
Shorthand forms,
below.
Description:
The pidin utility displays information about the processes running on a QNX Neutrino system. The amount of information it displays depends on which abilities are enabled (see procmgr_ability() in the C Library Reference):
- If you don't have any special abilities, pidin displays basic information.
- If PROCMGR_AID_XPROCESS_QUERY is enabled, you get more information.
- If PROCMGR_AID_XPROCESS_QUERY and PROCMGR_AID_XPROCESS_MEM_READ are enabled, you get full information.
By default, pidin displays the statistics once and then exits. If you specify the -l option, pidin loops forever, displaying statistics after the delay specified by the -d option.
If you specify the -l and -k options, pidin loops until a error occurs, displaying statistics after the given delay. The most common error encountered is a race condition: procnto indicates that a process exists, but the process is gone when pidin queries it.
Unlike ps, pidin lists zombie processes (see the examples below).
Format characters
A- Display the arguments.
a- Display the process ID.
B- Display what you're blocked on.
The output includes a
Blockedcolumn whose value depends on the thread's state:State Value CONDVARAddress of the condvar JOINThread ID of the blocking thread MUTEXThe address of the mutex, or the IDs of the process and thread blocked on, followed by the number of times locked, in the form pid -tid#timesRECEIVEID of the channel within the process that the thread is blocked on REPLYProcess IDa,b SEMAddress of the semaphore SENDProcess IDa,b STACKStack size WAITPAGEVirtual address of the page WAITTHREADThread ID of the blocking thread a If the process is running on a remote node, the process ID is followed by
@and the node name.b If you specify the -v option, the value also includes the client's coid, the coid type (s if applicable), the server channel that the client is connected to, and the scoid.
b- Display the thread ID.
C- Display the process ID of one of the process's children.
If you specify the
Gformat, other children are listed as siblings of this child. For more information about the relationships among processes, seeProcess information
in the appendix on the /proc filesystem in The QNX Neutrino Cookbook. c- Display the code size of the process.
D- Display the process's debug flags:
Flag Value Meaning _DEBUG_FLAG_STOPPED 0x00000001The thread isn't running _DEBUG_FLAG_ISTOP 0x00000002The thread is stopped at a point of interest _DEBUG_FLAG_IPINVAL 0x00000010The instruction pointer isn't valid _DEBUG_FLAG_ISSYS 0x00000020System process _DEBUG_FLAG_SSTEP 0x00000040Stopped because of single-stepping _DEBUG_FLAG_CURTID 0x00000080The thread is the current thread _DEBUG_FLAG_TRACE_EXEC 0x00000100Stopped because of a breakpoint _DEBUG_FLAG_TRACE_RD 0x00000200Stopped because of read access _DEBUG_FLAG_TRACE_WR 0x00000400Stopped because of write access _DEBUG_FLAG_TRACE_MODIFY 0x00000800Stopped because of modified memory _DEBUG_FLAG_RLC 0x00010000The Run-on-Last-Close flag is set _DEBUG_FLAG_KLC 0x00020000The Kill-on-Last-Close flag is set _DEBUG_FLAG_FORK 0x00040000The child inherits flags (stop on fork or spawn) _DEBUG_FLAG_EXEC 0x00080000(QNX Neutrino 6.6 or later) Stop on exec _DEBUG_FLAG_THREAD_EV 0x00100000(QNX Neutrino 6.6 or later) Stop when creating or destroying a thread _DEBUG_FLAG_64BIT 0x00200000(QNX Neutrino 7.0 or later) The thread is running in a 64-bit architecture d- Display the data size of the process.
E- Display the environment.
e- Display the parent PID.
F- Show the threads' flags in hexadecimal, as follows:
Flag Value Meaning _NTO_TF_INTR_PENDING 0x00010000The thread has a pending interrupt _NTO_TF_DETACHED 0x00020000The thread is detached _NTO_TF_SHR_MUTEX 0x00040000(QNX Neutrino 7.0 or later) This thread places no restrictions on which threads it will share mutexes with (see below) _NTO_TF_SHR_MUTEX_EUID 0x00080000(QNX Neutrino 7.0 or later) This thread shares mutexes only with threads that have the same effective user ID as it does (see below) _NTO_TF_THREADS_HOLD 0x00100000Threads are being held _NTO_TF_UNBLOCK_REQ 0x00400000There's an unblock pending on the thread _NTO_TF_ALIGN_FAULT 0x01000000An alignment fault has occurred _NTO_TF_SSTEP 0x02000000Single-stepping is turned on _NTO_TF_ALLOCED_STACK 0x04000000A stack has been allocated for the thread _NTO_TF_NOMULTISIG 0x08000000Signals don't terminate all threads in the process _NTO_TF_LOW_LATENCY 0x100000000(QNX Neutrino 7.0 or later) The thread should be scheduled to run on the same CPU as the one the kernel is currently running on. For more information, see _NTO_TCTL_LOW_LATENCY in the entry for ThreadCtl() in the C Library Reference. _NTO_TF_IOPRIV 0x80000000The thread has I/O privileges If neither _NTO_TF_SHR_MUTEX nor _NTO_TF_SHR_MUTEX_EUID is set, the thread doesn't share mutexes with any threads outside its process.
f- Show the processes' flags in hexadecimal, as follows:
Flag Value Meaning _NTO_PF_NOCLDSTOP 0x00000001The process isn't sent a SIGCHILD signal when its children stop _NTO_PF_LOADING 0x00000002The process hasn't been fully loaded _NTO_PF_TERMING 0x00000004The process is terminating _NTO_PF_ZOMBIE 0x00000008The process is a zombie _NTO_PF_NOZOMBIE 0x00000010The process won't become a zombie on its death _NTO_PF_FORKED 0x00000020The process is a child by way of fork() _NTO_PF_ORPHAN_PGRP 0x00000040The process is an orphan _NTO_PF_STOPPED 0x00000080The process has been stopped _NTO_PF_DEBUG_STOPPED 0x00000100The process has been stopped by the debugger _NTO_PF_BKGND_PGRP 0x00000200The process is running in the background _NTO_PF_NOISYNC 0x00000400(QNX Neutrino 7.1 or later) Used internally by the process manager _NTO_PF_CONTINUED 0x00000800The process was stopped, but has now been made to continue _NTO_PF_CHECK_INTR 0x00001000The process is attached to some interrupts _NTO_PF_COREDUMP 0x00002000The process has written a coredump file _NTO_PF_RING0 0x00008000The process is running in a privileged supervisor state (known as ring 0
in some architectures)_NTO_PF_SLEADER 0x00010000The process is a session leader _NTO_PF_WAITINFO 0x00020000The process will produce wait information when it terminates _NTO_PF_DESTROYALL 0x00080000The process is being destroyed _NTO_PF_NOCOREDUMP 0x00100000The process is not permitted to create core files _NTO_PF_WAITDONE 0x00400000The process's termination status has already been retrieved, so another wait won't succeed _NTO_PF_TERM_WAITING 0x00800000The process is waiting to terminate _NTO_PF_ASLR 0x01000000(QNX Neutrino 6.6 or later) The process is using address space layout randomization (ASLR) _NTO_PF_EXECED 0x02000000(QNX Neutrino 6.6 or later) Used internally by the process manager _NTO_PF_APP_STOPPED 0x04000000(QNX Neutrino 7.0 or later) The process has been stopped _NTO_PF_64BIT 0x08000000(QNX Neutrino 7.0 or later) The code that the process is running was compiled for a 64-bit architecture _NTO_PF_NET 0x10000000(QNX Neutrino 7.0.1 or later) Used by Qnet _NTO_PF_NOLAZYSTACK 0x20000000(QNX Neutrino 7.0.4 or later) Memory for the stack was reserved when the thread was allocated _NTO_PF_NOEXEC_STACK 0x40000000(QNX Neutrino 7.1 or later) The process doesn't require an executable stack _NTO_PF_LOADER_PERMS 0x80000000(QNX Neutrino 7.1 or later) Used internally by the process manager G- Display the process ID of one of the process's siblings.
If you specify the
Cformat, pidin displays the process ID of one of each process's children. You can use the child and sibling information to determine a process's children. For more information about the relationships among processes, seeProcess information
in the appendix on the /proc filesystem in The QNX Neutrino Cookbook. H- (QNX Neutrino Core OS 6.3.2 or later)
Display the scheduling-specific information for each thread.
For adaptive partitioning scheduling, the information is the name of the partition that the thread is running in. For more information, see the Adaptive Partitioning User's Guide.
h- (QNX Neutrino Core OS 6.3.2 or later) Display the thread name; if a thread doesn't have a name, pidin displays the thread's ID (tid) instead.
I- Display the PID and TID, joined by a hyphen.
i- (QNX Neutrino Core OS 6.3.2 or later) Display the runmask and inherit mask. For more information, see the Multicore Processing chapter of the QNX Neutrino Programmer's Guide.
J- Display the state of the thread; see
Thread life cycle
in the QNX Neutrino Microkernel chapter of the System Architecture guide. j- (QNX Neutrino 6.6 or later) Display a hexadecimal number whose bits indicate which signals are blocked.
K- Display the last kernel call that was executed.
k- Display the process abilities.
L- Display the session ID.
l- (
el
) Display the last CPU that the thread ran on. M- Display the memory owned by the PID.
m- Display the stack size of the thread. The output includes the amount of stack currently mapped
and, in parentheses, the maximum allowed for the thread. For more information, see
Stack allocation
in the Processes chapter of the QNX Neutrino Programmer's Guide. N- Display the short name of the process.
n- Display the long name of the process.
O- (QNX Neutrino 6.6 or later) Display the loaded shared libraries.
o- (QNX Neutrino Core OS 6.3.2 or later)
Display the connection IDs and file descriptors associated with the process.
If you don't have permission to access them,
pidin provides only limited information.
The information for each connection and file descriptor includes the following:
- the file descriptor, followed by
sif it's a side channel - the ID of the process the connection is to
- open flags (
ror-, followed bywor-), orMPfor a mountpoint - the offset
- the name of the file or device, if available.
Note:The -n option isn't compatible with theoformat; useon -f remote_node pidin -F "%o"instead. - the file descriptor, followed by
P- (Uppercase
P
) Display the process group. p- (Lowercase
p
) Display the thread priority. The letter following the scheduling priority number stands for the scheduling policy used, as follows:f— FIFO schedulingr— round-robin schedulingo— other (currently the same as round-robin scheduling)s— sporadic scheduling
For more information on these scheduling policies, see
Thread scheduling
in the System Architecture guide. Q- Display the interrupt handlers.
For each handler, pidin shows:
- the interrupt ID returned by InterruptAttach(), InterruptAttachArray(), or InterruptAttachEvent()
- the interrupt vector passed to InterruptAttach() or InterruptAttachEvent()
- the mask level count
- the interrupt flags, as a letter (if set) or a hyphen (if not set):
- T — _NTO_INTR_FLAGS_TRK_MSK
- P — _NTO_INTR_FLAGS_PROCESS
- E — _NTO_INTR_FLAGS_END
- N — _NTO_INTR_FLAGS_NO_UNMASK
- A — _NTO_INTR_FLAGS_ARRAY (used internally to indicate that the interrupt handler was attached using InterruptAttachArray())
- the address of the interrupt handler and the interrupt handler area, separated by a colon
- a description of the sigevent to be delivered. Valid descriptions include:
- SIGNAL signo
- SIGNAL_CODE signo code:value
- SIGNAL_THREAD signo code:value
- PULSE coid:priority code:value
- UNBLOCK
- INTR
- THREAD code:value
q- (QNX Neutrino 6.4.0 or later)
Display the backtrace of the addresses of calling routines.
For best results, use this format with the
Iformat (as in thebacktraceshorthand form). R- Display information about the timers:
- the timer ID returned by TimerCreate()
- the thread ID associated with this timer (0 for the entire process)
- the number of overruns
- the type of clock used:
REAL— CLOCK_REALTIMESOFT— CLOCK_SOFTTIMEMONO— CLOCK_MONOTONIC
- the timer flags:
X— _NTO_TI_EXPIREDA— _NTO_TI_ABSOLUTEa— _NTO_TI_ACTIVEP— _NTO_TI_PRECISE
- the time left before expiry, in microseconds, followed by a slash (/), and then by the timer interval, in microseconds
- the timer tolerance, in microseconds, or INF for infinitely tolerant timers
- the description of the sigevent to be delivered when
the timer expires:
- SIGNAL signo
- SIGNAL_CODE signo code:value
- SIGNAL_THREAD signo code:value
- PULSE coid:priority code:value
- UNBLOCK
- INTR
- THREAD code:value
r- Show the values of the registers.
S- Display the signal-ignore mask.
s- Display the signal-queued mask.
T- Display the number of threads.
t- Display the time at which the process was started.
U- Display the process's user ID, as a number.
u- Display the number of nanoseconds spent running in user space.
V- Display the process's group ID, as a number.
v- Display the number of nanoseconds spent running in system space.
W- Display the process's effective user ID, as a number.
w- Display the number of nanoseconds that the process's terminated children spent running in user space.
X- Display the process's effective group ID, as a number.
x- Display the number of nanoseconds that the process's terminated children spent running in system space.
Y- Display the process's set user ID, as a number.
y- Display the time at which the thread was started.
Z- Display the process's set group ID, as a number.
z- Display the number of nanoseconds that the thread spent running in user and system space.
[- For each channel, display the channel ID, flags, the lengths of the pulse, send,
receive, and reply queues, and (in QNX Neutrino 7.1 or later) the security type (see
Using security policies
in the System Security Guide).Flag Value Meaning _NTO_CHF_FIXED_PRIORITY 0x0001uSuppress priority inheritance when receiving messages _NTO_CHF_UNBLOCK 0x0002uDeliver a pulse when a thread that's REPLY-blocked on a channel attempts to unblock before its message is replied to _NTO_CHF_THREAD_DEATH 0x0004uDeliver a pulse on the death of any thread in the process that owns the channel _NTO_CHF_DISCONNECT 0x0008uDeliver a pulse when all connections from a process are detached _NTO_CHF_NET_MSG 0x0010uReserved for the io_pkt* resource manager _NTO_CHF_COID_DISCONNECT 0x0040uDeliver a pulse to this channel for each connection that belongs to the calling process when the channel that the connection is attached to is destroyed _NTO_CHF_PULSE_POOL 0x0100uThe channel was created with ChannelCreatePulsePool() and the pulses are queued in a private pulse pool. _NTO_CHF_PRIVATE 0x1000uThe channel is private. _NTO_CHF_MSG_PAUSING 0x2000uThe kernel can pause a message that would otherwise cause a deadlock. _NTO_CHF_INHERIT_RUNMASK 0x4000uWhen a thread receives a message on the channel, the thread inherits the sender's runmask. In this case, the sender's runmask completely replaces the receiver's runmask—it does not restrict the processors that the receiver can run on to the intersection of the two runmasks. The new runmask remains until it is explicitly changed by a call to ThreadCtl() or the thread does another MsgReceive(). When a thread receives a pulse on the channel, the thread's runmask is set to its inherit mask; for information about inherit masks, see
Processor affinity, runmasks, and inherit masks
in the Programmer's Guide.If the receiving thread is running on a processor that the new runmask excludes, the thread is rescheduled.
For more information, see ChannelCreate() in the C Library Reference.
\- (QNX Neutrino 6.6 or later) Display the process's supplementary group IDs.
]- (QNX Neutrino 6.6 or later) Display the process's application ID.
^- (QNX Neutrino 6.6 or later) Display the process's default timer tolerance in nanoseconds, or infinite if the timers are infinitely tolerant.
_- (Underscore; QNX Neutrino 7.0 or later) Display the process's security type. For more
information, see
Using security policies
in the System Security Guide. #- (Pound sign; QNX Neutrino 7.1 or later) Display the process's hard and soft resource limits.
$- Display the CPU ranking name.
Memory format characters
<- Display the memory object's code size.
=- Display the memory object's data size.
>- Display the memory object's address.
?- Display the memory object's offset.
M- Display the memory owned by the process.
:(colon)- Display the memory object's name, or
Mapped Phys Memoryfor mapped physical memory. ;(semicolon)- Display the offset that was used in the mmap() call when physical memory was mapped.
@- Display the memory object's flags, which can include:
E— MAP_ELFF— MAP_FIXEDP— MAP_PRIVATES— MAP_SHARED
For more information about these flags, see the entry for mmap() in the QNX Neutrino Library Reference.
Shorthand forms
- abilities (equivalent to -F
"%a %N %k") - (QNX Neutrino 7.1 or later) Display the abilities for each displayed process.
- arguments
(equivalent to -F
"%a %A") - Show the arguments of the displayed processes.
- backtrace
(equivalent to -F
"%I %q") - (QNX Neutrino 6.4.0 or later)
Display backtrace information for each thread in the displayed processes.
For example:
$ pidin -p devc-con-hid back pid-tid backtrace 4103-01 b033ab5b:b03323cb:b03324f3:804f6ed:804c120:804a285 4103-02 b033af63:805ca60:b031f0adThe output includes the process ID hyphenated to the thread ID, followed by a backtrace of the addresses of the calling routines.
- channels
(equivalent to -F
"%a %b %N %[") - (QNX Neutrino 6.4.0 or later) For each channel, display the channel ID, flags, the lengths of
the pulse, send, receive, and reply queues, and (in QNX Neutrino 7.1 or later) the
security type (see
Using security policies
in the System Security Guide).This shorthand is useful if you're trying to track pulse leaks—that is, a process not receiving pulses. This can cause a growth in kernel memory usage, since pulse structures are allocated in the kernel.
- environment
(equivalent to -F
"%a %N %E") - Show the environment of the displayed processes.
- extsched
- (QNX Neutrino Core OS 6.3.2 or later)
Display details of the active extended scheduler configuration.
For the adaptive partitioning scheduler, this is one line of global configuration and then one line for each defined partition (showing the name, budget, critical budget, and overload notifications). For more information, see the Adaptive Partitioning User's Guide.
Note:The extsched shorthand is supported only for the local node. To get this information from a remote node, use:on -f remote_node pidin extsched - family
(equivalent to -F
"%a %N %L %P %e %G %C") - Show the sessions, process groups, parents, siblings, and children of the displayed processes.
- fds
(equivalent to -F
"%a %N %o") - (QNX Neutrino Core OS 6.3.2 or later)
Show information about the process's connections and file descriptors.
Note:The -n option isn't compatible with the fds shorthand; use
on -f remote_node pidin fdsinstead. - flags
(equivalent to -F
"%a %N %f") - Show the processes' flags in hexadecimal.
- info
- Display information about the system, such as the type of
processor(s) and the amount of free memory.
For example:
CPU:X86_64 Release:7.1.0 FreeMem:906MB/1023MB BootTime:Aug 11 09:56:26 ETD 2020 Actual resident free memory:907Mb Processes: 31, Threads: 80 Processor1: 328366 Core i7/5/3 Stepping 3 2665MHz FPU Processor2: 328366 Core i7/5/3 Stepping 3 2709MHz FPUFreeMem is how much memory is available; the actual resident free memory can be higher than that if memory is reserved but hasn't yet been allocated. For example, when you're creating a new process, a certain amount of memory is reserved for the main thread's stack but the physical pages aren't allocated right away.
- irqs
(equivalent to -F
"%a %b %N %Q") - Show the IRQ handlers owned by the process.
- libs
(equivalent to -F
"%a %N %O") - (QNX Neutrino 6.6 or later) Show the shared libraries loaded by the process.
- 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.5 @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 SIt includes:
- the memory object's name, or
Mapped Phys Memoryfor 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
- the memory object's name, or
- memory
(equivalent to -F
"%a %b %N %p %J %c %d %m"-M" %M @%> %? %< %=") - Show the memory used by the displayed processes; pidin
displays the shared memory regions, including shared objects,
and stack usage for each thread. Shared code and data regions
are removed from the size of the process.
The stack numbers represent the amount of stack currently mapped and, in parentheses, the maximum allowed for that thread. An asterisk (*) is printed if the thread creator is responsible for reclaiming the memory used for the stack.
- If you create a thread (e.g., pthread_create()), and let QNX Neutrino kernel allocate the stack, there is no *. QNX Neutrino kernel reclaims the stack memory automatically.
- If you create a thread and provide your own stack (e.g., pthread_attr_setstack()), there is an *. You need to reclaim the stack memory.
- For the main thread, QNX Neutrino kernel creates a thread and provides memory for the stack, therefore an * is printed. QNX Neutrino kernel reclaims the stack memory.
Entries for /dev/mem indicate shared memory that's mapped into the process address space. For example:
/dev/mem @38100000 ( 0) 172KIf the entries for different processes show the same object (
@38100000in this example), they all reference the same shared memory object. The processes can map that shared memory differently; the number in parentheses is the offset that was used in the mmap() call, and the last number is the size of the mapping.If a shared object that contains text relocations is remapped as private, pidin mem displays an exclamation mark (!) beside the name.
- net
- Display system information about all the nodes on the Qnet network.
- pmem
(equivalent to -F
"%a %b %N %p %J %c %d %m") - Display process memory only.
- rc
- Show the process name and arguments of all remote nodes connected to your machine.
- regs
(equivalent to -F
"%a %b %N %r") - Show the values of the registers.
- rlimits (equivalent to -F
"%#") - (QNX Neutrino 7.1 or later) Display the hard and soft resource limits. For example:
$ pidin -p$$ rlim Resource limits: soft : hard CPU (seconds) infinity : infinity File size (blocks) infinity : infinity Core dump (blocks) infinity : infinity Data segment size (kB) infinity : infinity Stack size (kB) infinity : infinity Locked memory (kB) infinity : infinity Virtual memory (kB) infinity : infinity Open file descriptors 1000 : 1000 Processes infinity : infinity Threads infinity : infinity Memory usage (.1% RAM) infinity : infinity Open connections infinity : infinity Registered events 256 : 256 Timers created infinity : infinity - rmasks
(equivalent to -F
"%a %b %N %i") - (QNX Neutrino Core OS 6.3.2 or later) Display runmasks and inherit masks.
- sched
(equivalent to -F
"%a %b %N %p %J %l %$ %H") - (QNX Neutrino Core OS 6.3.2 or later) Display useful scheduling parameters for each thread.
- session
(equivalent to -F
"%L %a %P %e %N") - Sort by session ID, then process ID. By default, pidin sorts the output by process ID.
- signals
(equivalent to -F
"%a %b %N %S %s %j") - Show the signal state of the displayed processes.
- syspage[=section]
- Show the contents of the system page.
You can specify which section to print by indicating a name (e.g.,
the command pidin syspage=asinfo displays the
asinfo section).
The default is to show all sections.
For example, if you want to find out how much space the image file system (IFS) occupies in the memory, run the following command:
and look for the lines with imagefs. For more details, see the sample output shown in thepidin syspage=asinfoExamples
section below.The information always includes the system page's header, which consists of the size, total_size, type, and num_cpu members. You can get additional information for the following sections:
- asinfo
- cacheattr
- callout
- cpuinfo
- hwinfo
- intrinfo
- mdriver
- qtime
- smp
- strings
- system_private
- typed_strings
If the section doesn't have any additional information, or the section you specify doesn't exist, pidin displays the system page's header anyway. For more information about the contents of the system page, see the
System Page
chapter of Building Embedded Systems. See also theWorking with Memory
chapter of the QNX Neutrino Programmer's Guide. - threads
(equivalent to -F
"%a %b %N %h %J %B") - Show the process ID, thread ID (in QNX Neutrino 7.0 or later), short process name, thread name, thread state, and what the thread is blocked on. If a thread doesn't have a name, pidin displays the thread ID (tid) again.
- timers
(equivalent to -F
"%a %b %N %R") - Show the timers owned by the process.
- 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 startedutime—the number of CPU seconds consumed by the processstime—the number of CPU seconds consumed by the kernel on behalf of the processcutime—the number of CPU seconds consumed by the children of the processcstime—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
cutimeandcstimeonly after the children terminate.Note:CPU usage is calculated by sampling. When the timer interrupt occurs, the kernel determines which process is running, and adds the time to the total running times of the active thread and its process. If the kernel itself is active, it also adds the time to the system times (stime) of the active thread and its process. Theutimeis the total running time minus the system time.As a result, these times are approximate, and can be inaccurate (e.g., if a process is driven by the timer interrupt). To determine more accurate times, use the system profiler. For more information, see the System Analysis Toolkit User's Guide or the Analyzing Performance chapter of the IDE User's Guide.
- tolerance
(equivalent to -F
"%a %N %^") - (QNX Neutrino 6.6 or later) Show the process's default timer tolerance.
- ttimes
(equivalent to -F
"%a %b %N %J %t %y %z") - Show thread times.
- users
(equivalent to -F
"%a %N %U %V %W %X %Y %Z %\\") - Display the real, effective, and saved user IDs and group IDs, and the supplemental group IDs for the
user who launched the processes.
This option doesn't display the users' or groups' names, just the numerical IDs.
Examples:
The pidin command prints a listing similar to this:
pid tid name prio STATE Blocked
1 1 /sys/procnto-instr 0f READY
1 3 /sys/procnto-instr 10r RUNNING
1 4 /sys/procnto-instr 12r RECEIVE 1
1 5 /sys/procnto-instr 12r RECEIVE 1
1 6 /sys/procnto-instr 12r RECEIVE 1
1 11 /sys/procnto-instr 12r RECEIVE 1
1 12 /sys/procnto-instr 10r RECEIVE 1
1 13 /sys/procnto-instr 10r RECEIVE 1
1 15 /sys/procnto-instr 255r RECEIVE 1
1 16 /sys/procnto-instr 10r RECEIVE 1
1 17 /sys/procnto-instr 10r RECEIVE 1
2 1 sbin/tinit 10o REPLY 1
3 1 proc/boot/slogger2 10o RECEIVE 1
5 1 proc/boot/pci-serv 10o RECEIVE 1
6 1 roc/boot/devb-eide 10o SIGWAITINFO
6 2 roc/boot/devb-eide 21r RECEIVE 1
...
(Zombie) in place of the process's
name (and no other details except the PID), as seen here:
...
376856 1 bin/bash 10r REPLY 1
1830937 1 ./ps_zombie 10r REPLY 1
1835034 (Zombie)
1847323 1 bin/sh 10r SIGSUSPEND
...
(Zombie) text or any other details.
Using pidin -F "%I %60N" displays the PID and TID, along with up to 60 characters of the processes' short name:
pid-tid name
1-01 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-03 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-04 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-05 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-06 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-11 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-12 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-13 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-15 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-16 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
1-17 rldbuild/cdr/qnx6/tmp/target/qnx6/x86_64/boot/sys/procnto-instr
2-01 sbin/tinit
3-01 proc/boot/slogger2
5-01 proc/boot/pci-server
6-01 proc/boot/devb-eide
...
The pidin mem command displays:
pid tid name prio STATE code data stack
1 1 /procnto-smp-instr 0f RUNNING 0 0 480(480)
1 2 /procnto-smp-instr 0f READY 0 0 480(480)
1 4 /procnto-smp-instr 1r RECEIVE 0 0 256K(256K)
1 5 /procnto-smp-instr 10r CONDVAR 0 0 8192(8192)
1 6 /procnto-smp-instr 10r CONDVAR 0 0 8192(8192)
1 7 /procnto-smp-instr 255r RECEIVE 0 0 8192(8192)
1 8 /procnto-smp-instr 255r RECEIVE 0 0 8192(8192)
1 9 /procnto-smp-instr 255r RECEIVE 0 0 8192(8192)
1 10 /procnto-smp-instr 255r RECEIVE 0 0 8192(8192)
1 11 /procnto-smp-instr 21r RECEIVE 0 0 8192(8192)
1 12 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
1 13 /procnto-smp-instr 10r RUNNING 0 0 8192(8192)
1 14 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
1 15 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
1 16 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
1 18 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
1 19 /procnto-smp-instr 10r RECEIVE 0 0 8192(8192)
procnto-smp-instr @ffff80000002a000 762K 125K
2 1 proc/boot/slogger2 10r RECEIVE 0 684K 12K(516K)*
slogger2 @ 8048000 64K 8192
libc.so.5 @ 100000000 692K 24K
libslog2.so.1 @ 1002b5000 32K 4096
slogger2/console.2 @ 180000000 ( 0) 20K
/slogger2/random.5 @ 180005000 ( 0) 20K
ogger2/devb_eide.7 @ 18000a000 ( 0) 20K
2/io_usb_otg.49165 @ 18000f000 ( 0) 20K
r2/io_audio.159763 @ 180014000 ( 0) 20K
...
The pidin syspage=asinfo command displays:
Section:asinfo offset:0x00000568 size:0x00000240
0) 0-ffff o:ffff a:0000 p:100 n:io
20) 0-ffffffff o:ffff a:0010 p:100 n:memory
40) 0-ffffff o:0020 a:0010 p:100 n:memory/isa
a0) 0-9fbff o:0040 a:0017 p:100 n:memory/isa/ram
180) 1000-cfff o:00a0 a:0007 p:100 n:memory/isa/ram/sysram
1a0) 20f98-9fbff o:00a0 a:0007 p:100 n:memory/isa/ram/sysram
c0) 100000-ffffff o:0040 a:0037 p:100 n:memory/isa/ram
1c0) 100000-40e507 o:00c0 a:0007 p:100 n:memory/isa/ram/sysram
1e0) 5e533c-ffffff o:00c0 a:0027 p:100 n:memory/isa/ram/sysram
60) 6000000-ffefffff o:0020 a:0013 p:100 n:memory/device
100) 6000000-ffeafff o:0060 a:0017 p:100 n:memory/device/ram
220) 6000000-ffeafff o:0100 a:0007 p:100 n:memory/device/ram/sysram
80) fff00000-ffffffff o:0020 a:0005 p:100 n:memory/rom
e0) 1000000-5ffffff o:0020 a:0037 p:100 n:memory/ram
200) 1000000-5ffffff o:00e0 a:0027 p:100 n:memory/ram/sysram
120) 40e508-5e533b o:0020 a:0005 p:100 n:memory/imagefs
140) 400400-40e507 o:0020 a:0007 p:100 n:memory/startup
160) 40e508-5e533b o:0020 a:0007 p:100 n:memory/bootram
