NAME | NAME | DESCRIPTION | FILES | ATTRIBUTES | SEE ALSO
proc - /proc
The ChorusOS operating system provides a /proc
file system derived from the FreeBSD 4.1 implementation of /proc
. Due to major differences in the implementation of the two systems,
only a subset of the FreeBSD /proc
file system has
been retained. However, due to enhancements of the process model introduced
by the ChorusOS operating system, such as the support of multi-threaded processes,
extensions have been introduced to reflect the multi-threaded nature of the
processes.
Such a file system is usually mounted, by convention, under the /proc
directory. This directory is then populated and depopulated
dynamically and automatically depending upon the life cycle of the processes.
Note that ChorusOS actors are not reflected in this file system. Upon process
creation (using fork() or posix_spawn())
an entry whose name is derived from the process identifier is created in the /proc
directory. This per-process entry is in turn a directory
whose layout is almost identical from one process to another. Threads running
in this process are also represented by a regular file in the /proc
file system (on a basis of one-to-one correspondence).
The list of entries that are supported below each process are listed in the table below.
Entry |
Description |
---|---|
/proc |
Mount point |
/proc/curproc |
Symbolic link to the current process |
/proc/xxx |
Per-process directory (where xxx is the PID of the process) |
/proc/xxx/file |
Symbolic link to the executable file |
/proc/xxx/stats |
Per-process instrumentation |
/proc/xxx/status |
Process status information mostly used by ps(1) |
/proc/xxx/threads/ |
Process threads directory |
/proc/xxx/threads/tt |
Per-thread directory (where tt is the id of the thread) |
/proc/xxx/threads/tt/stats |
Per-thread instrumentation |
For each actor or process currently active on the system, the following
information is made available to the C_OS
via the stats file of the process directory in the /proc
file system:
Function |
Instrument Type |
Description |
---|---|---|
process_virt_pages |
Gauge (high threshold) |
Number of virtual memory pages used by a process |
process_phys_pages |
Simple Gauge |
Number of physical memory pages used by a process |
process_lock_pages |
Simple Gauge |
Number of locked memory pages used by a process |
open_files |
Gauge (high threshold) |
Current number of open file descriptors |
internal_cpu |
Counter |
Cumulated (all threads) internal CPU usage in milliseconds (similar to user mode) |
external_cpu |
Counter |
Cumulated (all threads) external CPU usage in milliseconds (similar to system mode) |
For each thread currently active on the system, the following information is made available via the stats entry of the process directory in the /proc file system:
Function |
Instrument Type |
Description |
---|---|---|
internal_cpu |
Counter |
Internal CPU time spent in milliseconds (similar to user mode) |
external_cpu |
Counter |
External CPU time spent in milliseconds (similar to supervisor mode) |
waiting_cnt |
Counter |
Number of times the thread has been blocked |
/proc
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | NAME | DESCRIPTION | FILES | ATTRIBUTES | SEE ALSO