27.11.2014 Views

INTRO (7) NetBSD Miscellaneous Information Manual INTRO (7 ...

INTRO (7) NetBSD Miscellaneous Information Manual INTRO (7 ...

INTRO (7) NetBSD Miscellaneous Information Manual INTRO (7 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SYSCTL (7) <strong>NetBSD</strong> <strong>Miscellaneous</strong> <strong>Information</strong> <strong>Manual</strong> SYSCTL (7)<br />

kern.proc (KERN_PROC)<br />

Return the entire process table, or a subset of it. An array of struct kinfo_proc structures is<br />

returned, whose size depends on the current number of such objects in the system. The third and<br />

fourth level numeric names are as follows:<br />

Third level name<br />

KERN PROC ALL<br />

KERN PROC GID<br />

KERN PROC PID<br />

KERN PROC PGRP<br />

KERN PROC RGID<br />

KERN PROC RUID<br />

KERN PROC SESSION<br />

KERN PROC TTY<br />

KERN PROC UID<br />

Fourth level is:<br />

None<br />

A group ID<br />

A process ID<br />

A process group<br />

A real group ID<br />

A real user ID<br />

A session ID<br />

A tty device<br />

A user ID<br />

kern.proc2 (KERN_PROC2)<br />

As for KERN_PROC, but an array of struct kinfo_proc2 structures are returned. The fifth level<br />

name is the size of the struct kinfo_proc2 and the sixth level name is the number of structures to<br />

return.<br />

kern.proc_args (KERN_PROC_ARGS)<br />

Return the argv or environment strings (or the number thereof) of a process. Multiple strings are<br />

returned separated by NUL characters. The third level name is the process ID. The fourth level<br />

name is as follows:<br />

KERN PROC ARGV<br />

KERN PROC ENV<br />

KERN PROC NARGV<br />

KERN PROC NENV<br />

The argv strings<br />

The environ strings<br />

The number of argv strings<br />

The number of environ strings<br />

kern.profiling (KERN_PROF)<br />

Return profiling information about the kernel. If the kernel is not compiled for profiling, attempts<br />

to retrieve any of the KERN_PROF values will fail with EOPNOTSUPP. The third level names for<br />

the string and integer profiling information is detailed below. The changeable column shows<br />

whether a process with appropriate privilege may change the value.<br />

Third level name Type Changeable<br />

kern.profiling.count u_short[ ] yes<br />

kern.profiling.froms u_short[ ] yes<br />

kern.profiling.gmonparam struct gmonparam no<br />

kern.profiling.state integer yes<br />

kern.profiling.tos struct tostruct yes<br />

The variables are as follows:<br />

kern.profiling.count (GPROF_COUNT)<br />

Array of statistical program counter counts.<br />

kern.profiling.froms (GPROF_FROMS)<br />

Array indexed byprogram counter of call-from points.<br />

kern.profiling.gmonparams (GPROF_GMONPARAM)<br />

Structure giving the sizes of the above arrays.<br />

<strong>NetBSD</strong> 3.0 December 27, 2007 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!