3 fs, exsort \- file server maintenance
143 these commands are available only on the console of an
147 .\" The console requires the machine's password to be supplied before
148 .\" accepting commands. Typing a control-D will cause
149 .\" the server to request
150 .\" the password again.
153 prints a `usage string' for the named
155 by default all commands.
156 Also, many commands print menus of their options if given
157 incorrect or incomplete parameters.
160 disables permission checking and allows
162 This may help in initializing a file system.
163 Use this with caution.
169 prints the contents of the ARP cache and
174 changes the current file system, that is, the file tree to which
194 verifies the consistency of the current file system.
195 With no options it checks and reports the status.
196 It suspends service while running.
202 Read every block in the file system (can take a
207 will stop short of the actual contents
208 of a file and just verify the block addresses.
213 each block has a tag that acts as a backwards pointer for
214 consistency checking.
218 and also clear the contents
219 of blocks that have bad tags.
222 Print every file name.
225 Print every directory name.
228 Rebuild the list of free blocks
229 with all blocks that are not referenced.
230 This option is only useful on non-cache/WORM
232 If the filesystem was modified, the summary printed
233 at the conclusion of the check may not reflect the true
234 state of the freelist and may also print a list of
239 blocks are actually on the free list and the true
240 state of the filesystem can be determined by running
245 Each block address that is out of range or duplicate is cleared.
246 Note that only the second and subsequent
247 use of a block is cleared.
248 Often the problems in a file system are
249 caused by one bad file that has a lot of
250 garbage block addresses.
255 (by number of diagnostic messages)
258 to clear the addresses in that file.
261 can be used to reclaim the free list.
264 Cause every directory and indirect block not on the current WORM disk
265 to be advanced to the current WORM on the next dump.
266 This is a discredited idea to try to keep operating
267 on the knee of the cache working set.
271 reduces the file system's
273 to fit the device containing the file system.
274 This is useful after copying a partially-full file system
275 into a slightly smaller device.
278 afterward will construct a new free list that contains no
279 blocks outside the new, smaller file system.
282 prints the block numbers in
284 directory entry (direct, indirect and doubly indirect)
285 and checks the tags of the blocks cited.
290 block number (using zero origin)
294 Note that only the block numbers in the directory entry itself
297 does not recurse through indirect blocks.
300 clears the internal directory entry and abandons storage
303 It ignores the usual rules for sanity, such as checking against
304 removing a non-empty directory.
308 will place the abandoned storage in the free list.
311 prints the CPU utilization and state of the processes in the file server.
312 If the name of a process type argument is given,
313 then CPU utilization for only those processes is printed.
316 creates a file on the current file system.
320 are names or numbers from
323 is the low 9 bits of the permission mode of the file, in octal.
329 creates a locked file, append-only file, or directory.
332 controls the cached WORM file systems,
333 specifically the current file system.
336 .BI mvstate " state1 state2 " [ platter ]
350 will cause I/O errors in the last dump to be retried.
355 will cause I/O errors in the last dump to be retried in
356 reallocated slots in the next dump.
361 will flush the cache associated with the WORM.
366 aborts the background process dumping to WORM; as a consequence it
367 leaves holes in the dump file system.
368 Other uses are possible but arcane.
371 limits affected blocks to those on that platter.
373 .BR prchain " [\fIstart\fP] [\fIback-flag\fP]
374 Print the chain of superblocks for the directory containing the
375 roots of the dumped file systems, starting at block number
377 (default 0) going forward (backwards if
379 is supplied and is non-zero).
381 .BR searchtag " [\fIstart\fP] [\fItag\fP] [\fIblocks\fP]
382 Reads the WORM device starting at block
386 blocks (default 1000)
387 until it finds a block with numeric tag
390 .BR savecache " [\fIpercent\fP]
391 Copy the block numbers, in native endian longwords, of blocks in the
397 If an argument is given,
398 then that percent (most recently used) of each cache bucket
401 .BR loadcache " [\fIdskno\fP]
404 and for every block there on WORM disk side
407 read the block from WORM to the cache.
410 is not supplied, all blocks in
414 .BR morecache " dskno [\fIcount\fP]
417 blocks from the beginning of WORM disk side
420 If no count is given,
425 .BR startdump \ [ 01 ]
430 the background dump process.
433 Verify that the superblock on the WORM is readable, ignoring the cached copy.
435 .BR blockcmp " [\fIwbno\fP] [\fIcbno\fP]
436 Compares the WORM block
440 and prints the first 10 differences, if any.
443 Prints how many times each user has caused the system to allocate new space on the WORM;
444 the units are megabytes.
447 Clears the accounting records for
451 prints the current date. It may be adjusted
454 With no sign, it sets the date to the absolute number of seconds
455 since 00:00 Jan 1, 1970 GMT; with a sign it trims the current
459 restores permission checking back to normal after a file system
460 has been initialized.
463 sets permissions such that
466 can read and search any directories.
467 This is the permission necessary to do a
469 command anywhere in the file system to discover disk usage.
472 starts a dump to WORM immediately for
473 the named filesystem,
474 or the current filesystem if none is named.
475 File service is suspended while the cache is scanned;
476 service resumes when the copy to WORM starts.
479 prints for every connection the number of allocated fids.
482 prints the current status of each named
484 including uid, gid, wuid (uid of the last user to modify the file),
485 size, qid, and disk addresses.
488 toggles flags, initially all off:
500 Report as connections are made to the file server.
503 Report authentications.
506 Disable authentication.
509 (Very noisy.) Print all 9P messages to and from the server.
518 Report received RIP packets.
521 Report I/O on the WORM device.
524 Report SNTP activity.
527 If given a second numeric
532 the flag is altered only on that connection.
537 and halts the machine, returning to the boot ROM.
540 clunks all the fids on the named
542 which has the same format as in the output of the
550 With no options it adds user
556 and makes the directory
558 owned by user and group
568 Add a group: add the name to
570 but don't create the directory.
571 By convention, groups are numbered starting from 10000, users from 0.
586 is missing, remove the existing leader.
591 to the member list of
597 from the member list of
603 command the file server overwrites
605 to reflect the internal state of the user table.
610 messages, in particular for system maintenance.
611 Previously attached connections are unaffected.
614 will enable normal behavior.
617 sets the machine's password and writes it in non-volatile RAM.
620 prints the system configuration information.
624 clears the profiling buffer and enables profiling;
627 stops profiling and writes the data to
633 If a number is not specified, the profiling state toggles.
640 maintains an IP routing table. The
643 .TF "add dest gate mask"
645 .B add \f2dest gate \fP[\f2mask\fP]
646 Add a static route from IP address
650 with an optional subnet
654 Delete an entry from the routing table.
657 Display the contents of the routing table.
660 Enables the table to be filled from RIP packets.
663 Disables the table from being updated by RIP packets.
668 queries the SNTP server
671 and sets the time with its response.
675 commands are connected with a service or device identified by the
676 last character of the name:
680 Ethernet controllers;
684 Marvell SATA targets;
689 command prints overall statistics about the file system.
692 command takes an optional argument identifying the characters
695 commands to run. The option is remembered and becomes the
696 default for subsequent
698 commands if it begins with a minus sign.
701 writes dirty blocks in memory to the magnetic disk cache.
704 reports the time required to execute the
708 with no options prints the set of queue-locks held by each process in
709 the file server. If things are quiescent, there should be no output.
712 it prints a stack traceback of that process.
719 to initialize the file server's internal representation of the users
721 Incorrectly formatted entries in
724 If file is explicitly
726 the system builds a minimal functional users table internally;
727 this can help recover from disasters.
738 for the system to function. The
740 table looks like this:
755 reports when the file server was last compiled and last rebooted.
758 reports, one per line, the names of users connected to the file server and the
759 status of their connections.
760 The first number printed on each line is the channel number of the connection.
763 are given the output selects connections owned by those users.
766 moves the WORM disk in slot
768 of the first jukebox to the output shelf.
771 moves the WORM disk from the input shelf of the first jukebox to slot
777 of the first jukebox out of service;
779 puts it back in service.
782 put discs back where the jukebox thinks they belong,
783 and does this for all jukeboxes.
785 When the file server boots, it prints the message
788 for config mode hit a key within 5 seconds
791 If a character is typed within 5 seconds of the message appearing,
792 the server will enter config mode.
795 for the commands available in config mode.
796 The system also enters config mode if, at boot time,
797 the non-volatile RAM does not appear to contain a valid configuration.
800 is a regular command to be run on a CPU server, not on the file server
806 and sorts the cache disk block numbers contained therein.
807 It assumes the numbers are 4-byte integers and guesses the
808 endianness by looking at the data.
809 It then prints statistics about the cache.
812 it writes the sorted data back to
818 ``The Plan 9 File Server''.
822 .B /sys/src/cmd/disk/exsort.c
826 commands should accept an argument identifying a jukebox.