SYS(4) SYS(4) Name sys - Machine boxes. Synopsis /b/sys/debug /b/sys/cmd /b/sys/null /b/sys/time /b/sys/atime /b/sys/random /b/sys/ads Description Boxes under /b/sys provide system services that either affect the whole machine or do not fit well on other place. /b/sys/debug is used to toggle debug flags in the kernel. Its con- tents appear to be the set of active debug flagseach one is a character. An string copied into it would either set or clear (if started by "-") the debug flags found in the string. Use grep defdbg on the source to see which debug flags are defined. /b/sys/cmd is a placeholder used to send system-wide commands to the machine, such as halt. No commands are defined yet. /b/sys/null is the great bit bucket. It discards data copied into, and appears to be always empty when data is copied from it. /b/sys/time is the node time in binary format. It is four bytes with the number of seconds since epoch. /b/sys/atime is the node time printed as a string. /b/sys/random contains a random number in binary format (four bytes). /b/sys/ads contains the set of boxes advertised to the network by the kernel at this machine (other boxes may be adver- tised by user processes). Copy a string made of two names (box name, ad name) separated by white space to stablish a new ad. Ads are sent upon request and also every 30 seconds. Ads are requested every time SYS(4) SYS(4) import(2) is used to mount network ads. Example → /b/sys/ads /b/mem /mem → /b/sys/ads /b/proc /proc To advertise /b/mem as /mem and /b/proc as /proc. Source /src/b/port/sysbox.c See also import(2) and →(1). Bugs There are some boxes missing from /b/sys. The reason is that no program on top of Plan B needs them yet. They will be added.