fs, exsort – file server maintenance|
help [ command ... ] |
clean file [ bno [ addr ] ]
create path uid gid perm [lad]
date [[+–] seconds]
dump [ filesystem ]
flag flag [ channel ]
fstat [ files ]
newuser name [options]
stats [[–] flags...]
wormeject [ tunit ]
wormingest [ tunit ]
disk/exsort [–w] [file]
Except for exsort, these commands are available only on the console
of an fs(4) file server. |
Help prints a `usage string' for the named commands, by default all commands. Also, many commands print menus of their options if given incorrect or incomplete parameters.
Allow disables permission checking and allows wstat for the specified uid or for any user if omitted. This may help in initializing a file system. Use this with caution.
Arp has two subcommands: print prints the contents of the ARP cache and flush flushes it.
Cfs changes the current file system, that is, the file tree to which commands (check, clean, clri, create, cwcmd, dump, newuser, profile, remove, and users) apply. The initial filesystem is main.
Check verifies the consistency of the current file system. With
no options it checks and reports the status. It suspends service
while running. Options are:
trim reduces the file system's fsize to fit the device containing the file system. This is useful after copying a partially–full file system into a slightly smaller device. Running check free afterward will construct a new free list that contains no blocks outside the new, smaller file system. rtmp Removes temporary files after a recovery from worm. After a cache ream and recover, temporary files and directories refer to invalid data blocks producing checktag errors on access. To get rid of these errors, the rtmp flag can be used with the check command which will truncate temporary directories and
Clri clears the internal directory entry and abandons storage associated with files. It ignores the usual rules for sanity, such as checking against removing a non–empty directory. A subsequent check free will place the abandoned storage in the free list.
Cpu prints the CPU utilization and state of the processes in the file server. If the name of a process type argument is given, then CPU utilization for only those processes is printed.
Create creates a file on the current file system. Uid and gid are names or numbers from /adm/users. Perm is the low 9 bits of the permission mode of the file, in octal. An optional final l, a, or d creates a locked file, append–only file, or directory.
Cwcmd controls the cached WORM file systems, specifically the
current file system. The subcommands are:
Disallow restores permission checking back to normal after a file system has been initialized.
Duallow sets permissions such that the named user can read and search any directories. This is the permission necessary to do a du(1) command anywhere in the file system to discover disk usage.
Dump starts a dump to WORM immediately for the named filesystem, or the current filesystem if none is named. File service is suspended while the cache is scanned; service resumes when the copy to WORM starts.
Files prints for every connection the number of allocated fids.
Fstat prints the current status of each named file, including uid, gid, wuid (uid of the last user to modify the file), size, qid, and disk addresses.
Flag toggles flags, initially all off:
If given a second numeric channel argument, as reported by who, the flag is altered only on that connection.
Halt does a sync and halts the machine, returning to the boot ROM.
Hangup clunks all the fids on the named channel, which has the same format as in the output of the who command.
Newuser requires a name argument. With no options it adds user
name, with group leader name, to /adm/users and makes the directory
/usr/name owned by user and group name. The options are
After a successful newuser command the file server overwrites /adm/users to reflect the internal state of the user table.
Noattach disables attach(5) messages, in particular for system maintenance. Previously attached connections are unaffected. Another noattach will enable normal behavior.
Passwd sets the machine's password and writes it in non–volatile RAM.
Printconf prints the system configuration information.
Profile 1 clears the profiling buffer and enables profiling; profile 0 stops profiling and writes the data to /adm/kprofdata for use by kprof (see prof(1)). If a number is not specified, the profiling state toggles.
Remove removes files.
Route maintains an IP routing table. The subcommands are:
Sntp kick queries the SNTP server (see fsconfig(8)) and sets the time with its response.
The stat commands are connected with a service or device identified by the last character of the name: d, SCSI targets; e, Ethernet controllers; i, IDE/ATA targets; m, Marvell SATA targets; w, cached WORM. The stata command prints overall statistics about the file system. The stats command takes an optional argument identifying the characters of stat commands to run. The option is remembered and becomes the default for subsequent stats commands if it begins with a minus sign.
Sync writes dirty blocks in memory to the magnetic disk cache.
Time reports the time required to execute the command.
Trace with no options prints the set of queue–locks held by each process in the file server. If things are quiescent, there should be no output. With an argument number it prints a stack traceback of that process.
Users uses the contents of file (default /adm/users) to initialize
the file server's internal representation of the users structure.
Incorrectly formatted entries in file will be ignored. If file
is explicitly default, the system builds a minimal functional
users table internally; this can help recover from disasters.
If the file
cannot be read, you must run
Who reports, one per line, the names of users connected to the file server and the status of their connections. The first number printed on each line is the channel number of the connection. If users are given the output selects connections owned by those users.
Wormeject moves the WORM disk in slot tunit of the first jukebox to the output shelf.
Wormingest moves the WORM disk from the input shelf of the first jukebox to slot tunit.
Wormoffline takes drive of the first jukebox out of service; wormonline puts it back in service.
Wormreset put discs back where the jukebox thinks they belong, and does this for all jukeboxes.
When the file server boots, it prints the message
Exsort is a regular command to be run on a CPU server, not on
the file server console. It reads the named file (default /adm/cache)
and sorts the cache disk block numbers contained therein. It assumes
the numbers are 4–byte integers and guesses the endianness by looking
at the data. It then prints statistics about
the cache. With option –w it writes the sorted data back to file.
Ken Thompson, ``The Plan 9 File Server''.
The worm* commands should accept an argument identifying a jukebox.|