Display information about the processes in the system (QNX Neutrino)
pidin [options] [shorthand ...]
The options are:
If you don't specify any format codes, the default is "%a %b %N %p %J %B".
| The -n option isn't compatible with the o
format or the extsched and fds shorthands.
Instead, you can use
on -f remote_node pidin fds
|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.|
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.
The pidin utility displays information about the processes running on a QNX Neutrino system.
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.
The format letters that you can specify with the -F or -f option include the following:
|CONDVAR||Address of the condvar|
|JOIN||Thread ID of the blocking thread|
|MUTEX||The 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 #times|
|RECEIVE||ID of the channel within the process that the thread is blocked on|
|SEM||Address of the semaphore|
|WAITPAGE||Virtual address of the page|
|WAITTHREAD||Thread 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.
|_DEBUG_FLAG_STOPPED||0x00000001||The thread isn't running|
|_DEBUG_FLAG_ISTOP||0x00000002||The thread is stopped at a point of interest|
|_DEBUG_FLAG_IPINVAL||0x00000010||The instruction pointer isn't valid|
|_DEBUG_FLAG_SSTEP||0x00000040||Stopped because of single-stepping|
|_DEBUG_FLAG_CURTID||0x00000080||The thread is the current thread|
|_DEBUG_FLAG_TRACE_EXEC||0x00000100||Stopped because of a breakpoint|
|_DEBUG_FLAG_TRACE_RD||0x00000200||Stopped because of read access|
|_DEBUG_FLAG_TRACE_WR||0x00000400||Stopped because of write access|
|_DEBUG_FLAG_TRACE_MODIFY||0x00000800||Stopped because of modified memory|
|_DEBUG_FLAG_RLC||0x00010000||The Run-on-Last-Close flag is set|
|_DEBUG_FLAG_KLC||0x00020000||The Kill-on-Last-Close flag is set|
|_DEBUG_FLAG_FORK||0x00040000||The child inherits flags (stop on fork or spawn)|
|_NTO_TF_INTR_PENDING||0x00010000||The thread has a pending interrupt|
|_NTO_TF_DETACHED||0x00020000||The thread is detached|
|_NTO_TF_THREADS_HOLD||0x00100000||Threads are being held|
|_NTO_TF_UNBLOCK_REQ||0x00400000||There's an unblock pending on the thread|
|_NTO_TF_ALIGN_FAULT||0x01000000||An alignment fault has occurred|
|_NTO_TF_SSTEP||0x02000000||Single-stepping is turned on|
|_NTO_TF_ALLOCED_STACK||0x04000000||A stack has been allocated for the thread|
|_NTO_TF_NOMULTISIG||0x08000000||Signals don't terminate all threads in the process|
|_NTO_TF_FROZEN||0x10000000||The thread is frozen|
|_NTO_TF_IOPRIV||0x80000000||The thread has I/O privileges|
|_NTO_PF_NOCLDSTOP||0x00000001||The process isn't sent a SIGCHILD signal when its children stop.|
|_NTO_PF_LOADING||0x00000002||The process hasn't been fully loaded|
|_NTO_PF_TERMING||0x00000004||The process is terminating|
|_NTO_PF_ZOMBIE||0x00000008||The process is a zombie|
|_NTO_PF_NOZOMBIE||0x00000010||The process won't become a zombie on its death|
|_NTO_PF_FORKED||0x00000020||The process is a child by way of exec()|
|_NTO_PF_ORPHAN_PGRP||0x00000040||The process is an orphan|
|_NTO_PF_STOPPED||0x00000080||The process has been stopped|
|_NTO_PF_DEBUG_STOPPED||0x00000100||The process has been stopped by the debugger|
|_NTO_PF_BKGND_PGRP||0x00000200||The process is running in the background|
|_NTO_PF_NO_LIMITS||0x00000400||The process has no limits on its resources|
|_NTO_PF_CONTINUED||0x00000800||The process was stopped, but has now been made to continue|
|_NTO_PF_CHECK_INTR||0x00001000||The process is attached to some interrupts|
|_NTO_PF_COREDUMP||0x00002000||The process has written a coredump file|
|_NTO_PF_PTRACED||0x00004000||The process is being traced|
|_NTO_PF_RING0||0x00008000||The process is running in a privileged supervisor state (known as “ring 0” in some architectures)|
|_NTO_PF_SLEADER||0x00010000||The process is a session leader|
|_NTO_PF_WAITINFO||0x00020000||The process will produce wait information when it terminates|
|_NTO_PF_VFORKED||0x00040000||The process was created with vfork()|
|_NTO_PF_DESTROYALL||0x00080000||The process is being destroyed|
|_NTO_PF_NOCOREDUMP||0x00100000||The process is not permitted to create core files|
|_NTO_PF_NOCTTY||0x00200000||The process doesn't have a controlling TTY|
|_NTO_PF_WAITDONE||0x00400000||The process's termination status has already been retrieved, so another wait won't succeed|
|_NTO_PF_TERM_WAITING||0x00800000||The process is waiting to terminate|
|_NTO_PF_THREADWATCH||0x80000000||Not currently used|
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.
The information for each connection and file descriptor includes the following:
| The -n option isn't compatible with the o
format; instead, use:
on -f remote_node pidin -F "%o"
For more information on these scheduling policies, see “Thread scheduling” in the System Architecture guide.
The memory format letters that you can specify with the -M options include the following:
For more information about these flags, see the entry for mmap() in the QNX Neutrino Library Reference.
Each shorthand form represents a certain combination of format codes or a special command. You need to type only as many characters of the name as are required to uniquely identify it. The shorthand forms include the following:
$ pidin -p devc-con-hid back pid-tid backtrace 4103-01 b033ab5b:b03323cb:b03324f3:804f6ed:804c120:804a285 4103-02 b033af63:805ca60:b031f0ad
The output includes the process ID hyphenated to the thread ID, followed by a backtrace of the addresses of the calling routines.
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.
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.
| 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
| The -n option isn't compatible with the fds
shorthand; instead, use
on -f remote_node pidin fds
The output looks like this:
4101 8 proc/boot/io-usb 10o RECEIVE 80K 424K 4096(20K) libc.so.3 @b0300000 452K 16K devu-uhci.so @b8200000 24K 4096 devu-ohci.so @b8207000 24K 4096 devu-ehci.so @b820e000 28K 4096 Mapped Phys Memory @40100000 (ee000000) 12K S
The stack numbers represent the amount of stack currently mapped and, in parentheses, the maximum allowed for that thread. An asterisk (*) next to a stack size indicates that memory used in the stack isn't automatically returned to the system heap when the thread exits.
Entries for /dev/mem indicate shared memory that's mapped into the process address space. For example:
/dev/mem @38100000 ( 0) 172K
If the entries for different processes show the same object (@38100000 in 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.
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. See the output in the display as shown in the “Examples” 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:
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 “Structure of the system page” in the Customizing Image Startup Programs chapter of Building Embedded Systems.
For each process displayed, show:
The times for the child processes are added to cutime and cstime only after the children terminate.
| 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.
The utime is 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 Your System with Kernel Tracing chapter of the IDE User's Guide.
This option doesn't display the user name or group name, just the numerical IDs.
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/slogger 10o RECEIVE 1 5 1 proc/boot/pci-bios 10o RECEIVE 1 6 1 roc/boot/devb-eide 10o SIGWAITINFO 6 2 roc/boot/devb-eide 21r RECEIVE 1 …
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/boot/sys/procnto-instr 1-03 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-04 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-05 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-06 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-11 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-12 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-13 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-15 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-16 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 1-17 rldbuild/cdr/qnx6/tmp/target/qnx6/x86/boot/sys/procnto-instr 2-01 sbin/tinit 3-01 proc/boot/slogger 5-01 proc/boot/pci-bios 6-01 proc/boot/devb-eide …
The pidin mem command displays:
pid tid name prio STATE code data stack 1 1 /sys/procnto-instr 0f READY 1812K 12K 0(320)* 1 3 /sys/procnto-instr 10r RUNNING 1812K 12K 0(8192) 1 4 /sys/procnto-instr 12r RECEIVE 1812K 12K 0(8192) 1 5 /sys/procnto-instr 12r RECEIVE 1812K 12K 0(8192) 1 6 /sys/procnto-instr 12r RECEIVE 1812K 12K 0(8192) 1 11 /sys/procnto-instr 12r RECEIVE 1812K 12K 0(8192) 1 12 /sys/procnto-instr 10r RECEIVE 1812K 12K 0(8192) 1 13 /sys/procnto-instr 10r RECEIVE 1812K 12K 0(8192) 1 15 /sys/procnto-instr 255r RECEIVE 1812K 12K 0(8192) 1 16 /sys/procnto-instr 10r RECEIVE 1812K 12K 0(8192) 1 17 /sys/procnto-instr 10r RECEIVE 1812K 12K 0(8192) procnto-instr @cfbe5000 12K 12K 2 1 sbin/tinit 10o REPLY 8192 36K 4096(516K)* ldqnx.so.2 @b0300000 344K 16K 3 1 proc/boot/slogger 10o RECEIVE 8192 104K 4096(516K)* ldqnx.so.2 @b0300000 344K 16K 5 1 proc/boot/pci-bios 10o RECEIVE 36K 40K 8192(516K)* ldqnx.so.2 @b0300000 344K 16K 6 1 roc/boot/devb-eide 10o SIGWAITINFO 52K 91M 8192(516K)* 6 2 roc/boot/devb-eide 21r RECEIVE 52K 91M 4096(12K) …
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
hogs, ps, showmem, top
QNX Neutrino Microkernel chapter of the System Architecture guide
Fine-Tuning Your System in the QNX Neutrino User's Guide