xref: /original-bsd/share/doc/psd/05.sysman/1.7.t (revision c3e32dec)
Copyright (c) 1983, 1993
The Regents of the University of California. All rights reserved.

%sccs.include.redist.roff%

@(#)1.7.t 8.1 (Berkeley) 06/08/93

.sh "System operation support

Unless noted otherwise, the calls in this section are permitted only to a privileged user. Bootstrap operations

The call mount(blkdev, dir, ronly); char *blkdev, *dir; int ronly; extends the UNIX name space. The mount call specifies a block device blkdev containing a UNIX file system to be made available starting at dir. If ronly is set then the file system is read-only; writes to the file system will not be permitted and access times will not be updated when files are referenced. Dir is normally a name in the root directory.

The call swapon(blkdev, size); char *blkdev; int size; specifies a device to be made available for paging and swapping.

Shutdown operations

The call unmount(dir); char *dir; unmounts the file system mounted on dir. This call will succeed only if the file system is not currently being used.

The call sync(); schedules input/output to clean all system buffer caches. (This call does not require privileged status.)

The call reboot(how) int how; causes a machine halt or reboot. The call may request a reboot by specifying how as RB_AUTOBOOT, or that the machine be halted with RB_HALT. These constants are defined in <sys/reboot.h>. Accounting

The system optionally keeps an accounting record in a file for each process that exits on the system. The format of this record is beyond the scope of this document. The accounting may be enabled to a file name by doing acct(path); char *path; If path is null, then accounting is disabled. Otherwise, the named file becomes the accounting file.