3 cons \- console, clocks, process/process group ids, user, null, reboot, etc.
32 The console device serves a one-level directory
33 giving access to the console screen and
34 miscellaneous information.
42 causes the characters to be printed on the console screen. Console
43 input is handled by a different program (see
48 file contains a textual representation of the operating system's version and parameters.
49 At the moment, it contains one field: the 9P protocol version, currently
54 file contains a copy of the kernel configuration file used to build the kernel.
58 file holds the last 16 kilobytes of output written to the console
59 by the kernel's print statements or by processes writing to
61 It is useful for retrieving boot messages once the boot
66 file may be read to receive a copy of the data written
67 to the console by the kernel's print statements or by processes
70 Only data written after the file is opened is available.
71 If the machine's console is a serial line, the data is sent both to the
74 if its console is a graphics screen, the data is sent either to the
78 (It is advisable not to open
80 on terminals until you have started
85 file throws away anything written to it
86 and always returns zero when read.
90 file is a read-only file that produces an infinite stream of zero-valued bytes when read.
94 file contains, one per line, a listing of the drivers configured in the kernel, in the format
102 file contains the name of the authentication domain that
103 this host belongs to; see
105 Only the user named in
111 file contains the name of the user that owns the console device files.
112 The hostowner also has group permissions for any local devices.
116 return a stream of random bytes produced by the kernels cryptographic
117 random number generator. The rate at which data can be read depends on
118 the implementation and can vary from hundreds of megabytes to just
119 a few hundred bits a second. Therefore,
121 should be treated as a seed to
122 pseudo-random number generators which can produce a faster
129 causes the system to shutdown and, if
134 loads the named kernel image and restarts,
135 preserving the kernel configuration in
143 activates the remote kernel debugger (see
146 owner has the ability to open this file.
149 is a binary interface that provides
150 the same information as
154 and also controls clock frequency and clock trim.
155 All integers read or written from
157 are in big endian order.
158 Unlike the other files, reads and writes do not affect
159 the offset. Therefore, there is no need for a seek
160 back to zero between subsequent accesses.
163 returns 24 bytes, three 8 byte numbers, representing nanoseconds
164 since start of epoch, clock ticks, and clock frequency.
168 is a message with one of 3 formats:
169 .IP "\f5n\fP<8-byte \f2time\fP>" 1.2i
170 set the nanoseconds since epoch to the given
172 .IP "\f5d\fP<8-byte \f2delta\fP><4-byte \f2period\fP>" 1.2i
173 trim the nanoseconds since epoch by
178 .IP "\f5f\fP<8-byte \f2freq\fP>" 1.2i
179 Set the frequency for interpreting clock ticks to be
183 The rest of the files contain (mostly) read-only strings.
184 Each string has a fixed length: a
186 of more than that gives a result of that fixed length (the result does not
187 include a terminating zero byte);
190 of less than that length leaves the file offset so the
191 rest of the string (but no more) will be read the next time.
192 To reread the file without closing it,
194 must be used to reset the offset.
195 When the file contains numeric data
196 each number is formatted in decimal.
197 If the binary number fits in 32 bits, it is formatted as an
198 11 digit decimal number with
199 leading blanks and one trailing blank; totaling 12 bytes.
201 is formatted as 21 digit decimal numbers with leading blanks and one
202 trailing blank; totaling 22 bytes.
206 file holds six 32-bit numbers, containing the time in milliseconds
207 that the current process has spent in user mode, system calls,
208 real elapsed time, and then the time spent, by exited children and their descendants,
209 in user mode, system calls, and real elapsed time.
213 file holds one 32-bit number representing the seconds since start of epoch
214 and three 64-bit numbers, representing nanoseconds since
215 start of epoch, clock ticks, and clock frequency.
217 A write of a decimal number to
219 will set the seconds since epoch.
223 file holds the textual name of the machine, e.g.
229 file holds 10 numbers:
230 processor number, context switches, interrupts, system calls, page faults,
231 TLB faults, TLB purges, load average, idle time and time spent servicing interrupts.
232 The load average is in units of milli-CPUs and is decayed over time;
233 idle time and interrupt time are percentage units;
234 the others are total counts from boot time.
235 If the machine is a multiprocessor,
237 holds one line per processor.
240 resets all of the counts on all processors.
244 will inevitably cause the front to fall off.
246 The other files served by the
248 device are all single numbers:
257 parent's process number
267 .B /sys/src/9/port/devcons.c