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 Removes temporary files after a recovery from worm.
283 After a cache ream and recover, temporary files and directories
284 refer to invalid data blocks producing checktag errors
285 on access. To get rid of these errors, the
287 flag can be used with the
289 command which will truncate temporary directories
290 and remove temporary files.
293 prints the block numbers in
295 directory entry (direct, indirect and doubly indirect)
296 and checks the tags of the blocks cited.
301 block number (using zero origin)
305 Note that only the block numbers in the directory entry itself
308 does not recurse through indirect blocks.
311 clears the internal directory entry and abandons storage
314 It ignores the usual rules for sanity, such as checking against
315 removing a non-empty directory.
319 will place the abandoned storage in the free list.
322 prints the CPU utilization and state of the processes in the file server.
323 If the name of a process type argument is given,
324 then CPU utilization for only those processes is printed.
327 creates a file on the current file system.
331 are names or numbers from
334 is the low 9 bits of the permission mode of the file, in octal.
340 creates a locked file, append-only file, or directory.
343 controls the cached WORM file systems,
344 specifically the current file system.
347 .BI mvstate " state1 state2 " [ platter ]
361 will cause I/O errors in the last dump to be retried.
366 will cause I/O errors in the last dump to be retried in
367 reallocated slots in the next dump.
372 will flush the cache associated with the WORM.
377 aborts the background process dumping to WORM; as a consequence it
378 leaves holes in the dump file system.
379 Other uses are possible but arcane.
382 limits affected blocks to those on that platter.
384 .BR prchain " [\fIstart\fP] [\fIback-flag\fP]
385 Print the chain of superblocks for the directory containing the
386 roots of the dumped file systems, starting at block number
388 (default 0) going forward (backwards if
390 is supplied and is non-zero).
392 .BR searchtag " [\fIstart\fP] [\fItag\fP] [\fIblocks\fP]
393 Reads the WORM device starting at block
397 blocks (default 1000)
398 until it finds a block with numeric tag
401 .BR savecache " [\fIpercent\fP]
402 Copy the block numbers, in native endian longwords, of blocks in the
408 If an argument is given,
409 then that percent (most recently used) of each cache bucket
412 .BR loadcache " [\fIdskno\fP]
415 and for every block there on WORM disk side
418 read the block from WORM to the cache.
421 is not supplied, all blocks in
425 .BR morecache " dskno [\fIcount\fP]
428 blocks from the beginning of WORM disk side
431 If no count is given,
436 .BR startdump \ [ 01 ]
441 the background dump process.
444 Verify that the superblock on the WORM is readable, ignoring the cached copy.
446 .BR blockcmp " [\fIwbno\fP] [\fIcbno\fP]
447 Compares the WORM block
451 and prints the first 10 differences, if any.
454 Prints how many times each user has caused the system to allocate new space on the WORM;
455 the units are megabytes.
458 Clears the accounting records for
462 prints the current date. It may be adjusted
465 With no sign, it sets the date to the absolute number of seconds
466 since 00:00 Jan 1, 1970 GMT; with a sign it trims the current
470 restores permission checking back to normal after a file system
471 has been initialized.
474 sets permissions such that
477 can read and search any directories.
478 This is the permission necessary to do a
480 command anywhere in the file system to discover disk usage.
483 starts a dump to WORM immediately for
484 the named filesystem,
485 or the current filesystem if none is named.
486 File service is suspended while the cache is scanned;
487 service resumes when the copy to WORM starts.
490 prints for every connection the number of allocated fids.
493 prints the current status of each named
495 including uid, gid, wuid (uid of the last user to modify the file),
496 size, qid, and disk addresses.
499 toggles flags, initially all off:
511 Report as connections are made to the file server.
514 Report authentications.
517 Disable authentication.
520 (Very noisy.) Print all 9P messages to and from the server.
529 Report received RIP packets.
532 Report I/O on the WORM device.
535 Report SNTP activity.
538 If given a second numeric
543 the flag is altered only on that connection.
548 and halts the machine, returning to the boot ROM.
551 clunks all the fids on the named
553 which has the same format as in the output of the
561 With no options it adds user
567 and makes the directory
569 owned by user and group
579 Add a group: add the name to
581 but don't create the directory.
582 By convention, groups are numbered starting from 10000, users from 0.
597 is missing, remove the existing leader.
602 to the member list of
608 from the member list of
614 command the file server overwrites
616 to reflect the internal state of the user table.
621 messages, in particular for system maintenance.
622 Previously attached connections are unaffected.
625 will enable normal behavior.
628 sets the machine's password and writes it in non-volatile RAM.
631 prints the system configuration information.
635 clears the profiling buffer and enables profiling;
638 stops profiling and writes the data to
644 If a number is not specified, the profiling state toggles.
651 maintains an IP routing table. The
654 .TF "add dest gate mask"
656 .B add \f2dest gate \fP[\f2mask\fP]
657 Add a static route from IP address
661 with an optional subnet
665 Delete an entry from the routing table.
668 Display the contents of the routing table.
671 Enables the table to be filled from RIP packets.
674 Disables the table from being updated by RIP packets.
679 queries the SNTP server
682 and sets the time with its response.
686 commands are connected with a service or device identified by the
687 last character of the name:
691 Ethernet controllers;
695 Marvell SATA targets;
700 command prints overall statistics about the file system.
703 command takes an optional argument identifying the characters
706 commands to run. The option is remembered and becomes the
707 default for subsequent
709 commands if it begins with a minus sign.
712 writes dirty blocks in memory to the magnetic disk cache.
715 reports the time required to execute the
719 with no options prints the set of queue-locks held by each process in
720 the file server. If things are quiescent, there should be no output.
723 it prints a stack traceback of that process.
730 to initialize the file server's internal representation of the users
732 Incorrectly formatted entries in
735 If file is explicitly
737 the system builds a minimal functional users table internally;
738 this can help recover from disasters.
749 for the system to function. The
751 table looks like this:
766 reports when the file server was last compiled and last rebooted.
769 reports, one per line, the names of users connected to the file server and the
770 status of their connections.
771 The first number printed on each line is the channel number of the connection.
774 are given the output selects connections owned by those users.
777 moves the WORM disk in slot
779 of the first jukebox to the output shelf.
782 moves the WORM disk from the input shelf of the first jukebox to slot
788 of the first jukebox out of service;
790 puts it back in service.
793 put discs back where the jukebox thinks they belong,
794 and does this for all jukeboxes.
796 When the file server boots, it prints the message
799 for config mode hit a key within 5 seconds
802 If a character is typed within 5 seconds of the message appearing,
803 the server will enter config mode.
806 for the commands available in config mode.
807 The system also enters config mode if, at boot time,
808 the non-volatile RAM does not appear to contain a valid configuration.
811 is a regular command to be run on a CPU server, not on the file server
817 and sorts the cache disk block numbers contained therein.
818 It assumes the numbers are 4-byte integers and guesses the
819 endianness by looking at the data.
820 It then prints statistics about the cache.
823 it writes the sorted data back to
829 ``The Plan 9 File Server''.
833 .B /sys/src/cmd/disk/exsort.c
837 commands should accept an argument identifying a jukebox.