diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/index.html | 126 | ||||
-rw-r--r-- | doc/s6-chroot.html | 40 | ||||
-rw-r--r-- | doc/s6-devd.html | 80 | ||||
-rw-r--r-- | doc/s6-freeramdisk.html | 32 | ||||
-rw-r--r-- | doc/s6-halt.html | 36 | ||||
-rw-r--r-- | doc/s6-hiercopy.html | 66 | ||||
-rw-r--r-- | doc/s6-hostname.html | 39 | ||||
-rw-r--r-- | doc/s6-logwatch.html | 72 | ||||
-rw-r--r-- | doc/s6-mount.html | 52 | ||||
-rw-r--r-- | doc/s6-pivotchroot.html | 41 | ||||
-rw-r--r-- | doc/s6-poweroff.html | 39 | ||||
-rw-r--r-- | doc/s6-ps.html | 128 | ||||
-rw-r--r-- | doc/s6-reboot.html | 38 | ||||
-rw-r--r-- | doc/s6-swapoff.html | 36 | ||||
-rw-r--r-- | doc/s6-swapon.html | 36 | ||||
-rw-r--r-- | doc/s6-umount.html | 38 | ||||
-rw-r--r-- | doc/upgrade.html | 32 |
17 files changed, 931 insertions, 0 deletions
diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..1d289cc --- /dev/null +++ b/doc/index.html @@ -0,0 +1,126 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils - skarnet's tiny Linux-specific utilities</title> + <meta name="Description" content="s6-linux-utils - skarnet's tiny Linux-specific utilities" /> + <meta name="Keywords" content="s6 unix administration root laurent bercot ska skarnet linux utilities tiny linux-specific" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> s6-linux-utils </h1> + +<h2> What is it ? </h2> + +<p> + s6-linux-utils is a set of minimalistic Linux-specific system utilities. +</p> + +<hr /> + +<h2> Installation </h2> + +<h3> Requirements </h3> + +<ul> + <li> A POSIX-compliant system with a standard C development environment </li> + <li> GNU make, version 3.81 or later </li> + <li> <a href="http://skarnet.org/software/skalibs/">skalibs</a> version +2.0.0.0 or later </li> +</ul> + +<h3> Licensing </h3> + +<p> + s6-linux-utils is free software. It is available under the +<a href="http://opensource.org/licenses/ISC">ISC license</a>. +</p> + +<h3> Download </h3> + +<ul> + <li> The current released version of s6-linux-utils is <a href="s6-linux-utils-2.0.0.0.tar.gz">2.0.0.0</a>. </li> + <li> Alternatively, you can checkout a copy of the s6-linux-utils git repository: +<pre> git clone git://git.skarnet.org/s6-linux-utils </pre> </li> +</ul> + +<h3> Compilation </h3> + +<ul> + <li> See the enclosed INSTALL file for installation details. </li> +</ul> + +<h3> Upgrade notes </h3> + +<ul> + <li> <a href="upgrade.html">This page</a> lists the differences to be aware of between +the previous versions of s6-linux-utils and the current one. </li> +</ul> + +<hr /> + +<h2> Reference </h2> + +<h3> Commands </h3> + +<p> + All these commands exit 111 if they encounter a temporary error, and +100 if they encounter a permanent error - such as a misuse. +</p> + +<ul> +<li><a href="s6-chroot.html">The <tt>s6-chroot</tt> program</a></li> +<li><a href="s6-devd.html">The <tt>s6-devd</tt> program</a></li> +<li><a href="s6-freeramdisk.html">The <tt>s6-freeramdisk</tt> program</a></li> +<li><a href="s6-halt.html">The <tt>s6-halt</tt> program</a></li> +<li><a href="s6-hiercopy.html">The <tt>s6-hiercopy</tt> program</a></li> +<li><a href="s6-hostname.html">The <tt>s6-hostname</tt> program</a></li> +<li><a href="s6-logwatch.html">The <tt>s6-logwatch</tt> program</a></li> +<li><a href="s6-mount.html">The <tt>s6-mount</tt> program</a></li> +<li><a href="s6-pivotchroot.html">The <tt>s6-pivotchroot</tt> program</a></li> +<li><a href="s6-poweroff.html">The <tt>s6-poweroff</tt> program</a></li> +<li><a href="s6-ps.html">The <tt>s6-ps</tt> program</a></li> +<li><a href="s6-reboot.html">The <tt>s6-reboot</tt> program</a></li> +<li><a href="s6-swapoff.html">The <tt>s6-swapoff</tt> program</a></li> +<li><a href="s6-swapon.html">The <tt>s6-swapon</tt> program</a></li> +<li><a href="s6-umount.html">The <tt>s6-umount</tt> program</a></li> +</ul> + +<h2> Related resources </h2> + +<ul> + <li> <tt>s6-linux-utils</tt> is discussed on the +<a href="http://skarnet.org/lists.html#skaware">skaware</a> mailing-list. </li> +</ul> + +<h2> Similar work </h2> + +<p> + There are several good projects aiming to provide a minimal userspace +environment for Linux, suitable for embedded systems. Among them, for +instance: +</p> + +<ul> + <li> <a href="http://busybox.net/">BusyBox</a> </li> + <li> <a href="http://landley.net/code/toybox/">toybox</a> </li> +</ul> + +<p> + Most of the time, these projects aim to implement standard commands in a +lightweight way, and +they do it well enough. So, although some standard reimplentation already +exists in s6-linux-utils and its sibling package +<a href="http://skarnet.org/software/s6-portable-utils/">s6-portable-utils</a>, +it is an explicit non-goal of those packages to duplicate the work of those +projects, and no more rewriting of standard commands will occur. +</p> + +</body> +</html> diff --git a/doc/s6-chroot.html b/doc/s6-chroot.html new file mode 100644 index 0000000..a15d0fa --- /dev/null +++ b/doc/s6-chroot.html @@ -0,0 +1,40 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-chroot program</title> + <meta name="Description" content="s6-linux-utils: the s6-chroot program" /> + <meta name="Keywords" content="s6-linux-utils linux utilities chroot" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-chroot</tt> program </h1> + +<p> +<tt>s6-chroot</tt> executes a program in a chroot jail. +</p> + +<h2> Interface </h2> + +<pre> + s6-chroot <em>newroot</em> <em>prog...</em> +</pre> + +<ul> + <li> <tt>s6-chroot</tt> sets the root filesystem for the current +process to <em>newroot</em>, which must be an existing directory. </li> + <li> <tt>s6-chroot</tt> changes directory to this new root, and +executes <em>prog</em> +with its arguments. <em>prog</em> is searched under the new root. </li> + <li> s6-chroot's parent process is unaffected by the root change. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-devd.html b/doc/s6-devd.html new file mode 100644 index 0000000..5ae6160 --- /dev/null +++ b/doc/s6-devd.html @@ -0,0 +1,80 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-devd program</title> + <meta name="Description" content="s6-linux-utils: the s6-devd program" /> + <meta name="Keywords" content="s6 linux administration root utilities devd mdev udev" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-devd</tt> program </h1> + +<p> +<tt>s6-devd</tt> listens to the netlink interface for udev events, and +launches a helper program for every event, similarly to what the hotplug +interface does. +</p> + +<h2> Interface </h2> + +<pre> + s6-devd [ -q | -v ] [ -b kbufsz ] [ -t l:t:k ] <em>prog...</em> +</pre> + +<ul> + <li> s6-devd binds to the netlink interface and listens for +hotplug events, as the <em>udev</em> program does. </li> + <li> For every event it receives, it spawns <em>prog...</em> with +the event variables added to the environment, just as if <em>prog...</em> +had been registered in <tt>/proc/sys/kernel/hotplug</tt>. </li> + <li> However, unlike the kernel, s6-devd spawns the <em>prog...</em> helpers +sequentially: it waits for an instance to finish before spawning another one. </li> + <li> s6-devd is a long-lived program; it exits 0 when it receives a +SIGTERM. If a helper program is alive at that time, s6-devd waits for it to die +before exiting. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-q</tt> : be more quiet. </li> + <li> <tt>-v</tt> : be more verbose. </li> + <li> <tt>-b</tt> <em>kbufsz</em> : try and reserve a kernel buffer of +<em>kbufsz</em> bytes for the netlink queue. Too large a buffer wastes kernel memory; +too small a buffer risks losing events. The default is 65536. </li> + <li> <tt>-t</tt> <em>l:t:k</em> : If <em>l</em>, <em>t</em> or <em>k</em> is +specified, they specify timeouts; by default, they are infinite. +If <em>prog...</em> is still alive after <em>l</em> milliseconds, s6-devd sends +it a SIGTERM. Then, if <em>prog...</em> is still alive after <em>t</em> more +milliseconds, s6-devd sends it a SIGKILL. Then, if <em>prog...</em> is still +alive after <em>k</em> more milliseconds, s6-devd yells and exits 99. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> s6-devd is a daemon; it should be run under a proper supervision system such +as <a href="http://skarnet.org/software/s6/">s6</a>. (That is why it does not +fork and logs to stderr.) </li> + <li> The <em>prog...</em> helper, on the other hand, should be very short-lived, +even if you are not using the <tt>-t</tt> option to s6-devd. Since helpers are +spawned sequentially, slow helpers can make events queue up and fill the netlink +kernel buffer. </li> + <li> If you are using <a href="http://busybox.net/">busybox</a> and want a +minimal udev-style dynamic <tt>/dev</tt> +handling, <tt>/sbin/mdev</tt> is a suitable <em>prog...</em> helper. </li> + <li> The point of s6-devd is that it runs the helpers sequentially, so it solves +the race condition that appears when helpers are run via the hotplug interface. +When s6-devd is used, <tt>/proc/sys/kernel/hotplug</tt> should be empty. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-freeramdisk.html b/doc/s6-freeramdisk.html new file mode 100644 index 0000000..859571a --- /dev/null +++ b/doc/s6-freeramdisk.html @@ -0,0 +1,32 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-freeramdisk program</title> + <meta name="Description" content="s6-linux-utils: the s6-freeramdisk program" /> + <meta name="Keywords" content="s6 linux administration root utilities freeramdisk" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-freeramdisk</tt> program </h1> + +<p> +<tt>freeramdisk</tt> frees the memory occupied by a RAM disk. Call it +when your RAM disk is not in use anymore. +</p> + +<h2> Interface </h2> + +<pre> + s6-freeramdisk <em>ramdisk-device</em> +</pre> + +</body> +</html> diff --git a/doc/s6-halt.html b/doc/s6-halt.html new file mode 100644 index 0000000..2c11c5a --- /dev/null +++ b/doc/s6-halt.html @@ -0,0 +1,36 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-halt program</title> + <meta name="Description" content="s6-linux-utils: the s6-halt program" /> + <meta name="Keywords" content="s6 linux administration root utilities halt" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-halt</tt> program </h1> + +<p> +<tt>s6-halt</tt> syncs the filesystems and halts the machine +immediately, without switching the power off. +<br /> This is different from the sysvinit <tt>halt</tt> +command, which is an alias for <tt>shutdown -h</tt>. The +s6-linux-utils <tt>s6-halt</tt> command is more or less equivalent to +sysvinit's <tt>halt -f</tt>. +</p> + +<h2> Interface </h2> + +<pre> + s6-halt +</pre> + +</body> +</html> diff --git a/doc/s6-hiercopy.html b/doc/s6-hiercopy.html new file mode 100644 index 0000000..e8dd2ed --- /dev/null +++ b/doc/s6-hiercopy.html @@ -0,0 +1,66 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-hiercopy program</title> + <meta name="Description" content="s6-linux-utils: the s6-hiercopy program" /> + <meta name="Keywords" content="s6 linux administration root utilities hiercopy cp -a" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-hiercopy</tt> program </h1> + +<p> +<tt>s6-hiercopy</tt> copies a directory structure recursively. +</p> + +<h2> Interface </h2> + +<pre> + s6-hiercopy <em>source</em> <em>destination</em> +</pre> + +<ul> + <li> <tt>s6-hiercopy</tt> recursively copies <em>source</em> to +<em>destination</em>, which is created if it doesn't exist. +The permissions are preserved. The owner and group are preserved +if the user is the superuser. </li> + <li> It exits 0 on success and 111 on temporary failure. </li> +</ul> + +<h2> Notes </h2> + +<p> + Copying files and browsing through directories is one of Unix's +weakest points, and <tt>s6-hiercopy</tt> is not meant to work around +the problem; it's only a quick hack that I needed to boot my embedded +platform. I originally planned to write the ultimate <tt>cp</tt> utility, +portable and reliable and featureful and everything - while needing +approximately a hundred times less resources than GNU <tt>cp</tt> does, +of course. But I eventually dropped the idea: it's just impossible to +design, much less write, such a utility. +</p> + +<ul> + <li> You can't make it portable because there's no universal standard. +There is no portable way of creating device special files, for instance. +So <tt>s6-hiercopy</tt> appears here instead of in +<a href="http://skarnet.org/software/s6-portable-utils/">s6-portable-utils</a>: +the platform where I needed that kind of tool is Linux. </li> + <li> You can't make it reliable because Unix's set of filesystem +management primitives is just too weak. It lacks a lot of atomic +operations, and filesystem transactions. As a result, <tt>s6-hiercopy</tt> +is a walking race condition and should <strong>absolutely not</strong> +be considered instant when used in a multitasking environment. +But then, <tt>cp -a</tt> shouldn't either. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-hostname.html b/doc/s6-hostname.html new file mode 100644 index 0000000..8ff0081 --- /dev/null +++ b/doc/s6-hostname.html @@ -0,0 +1,39 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-hostname program</title> + <meta name="Description" content="s6-linux-utils: the s6-hostname program" /> + <meta name="Keywords" content="s6-linux-utils linux utilities hostname" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-hostname</tt> program </h1> + +<p> +<tt>s6-hostname</tt> gets or sets the machine hostname. +</p> + +<h2> Interface </h2> + +<pre> + s6-hostname [ <em>name</em> ] +</pre> + +<ul> + <li> When called without an argument, <tt>s6-hostname</tt> prints the +machine hostname to stdout. </li> + <li> When called with an argument, <tt>s6-hostname</tt> sets the machine +hostname to <em>name</em>. </li> + <li> Then it exits 0. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-logwatch.html b/doc/s6-logwatch.html new file mode 100644 index 0000000..5075d83 --- /dev/null +++ b/doc/s6-logwatch.html @@ -0,0 +1,72 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-logwatch program</title> + <meta name="Description" content="s6-linux-utils: the s6-logwatch program" /> + <meta name="Keywords" content="s6-linux-utils linux utilities log s6-log logwatch" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-logwatch</tt> program </h1> + +<p> +<tt>s6-logwatch</tt> watches the <tt>current</tt> file of a logdir, printing it +in real time. +</p> + +<h2> Interface </h2> + +<pre> + s6-logwatch [ -m <em>buflen</em> ] <em>logdir</em> +</pre> + +<ul> + <li> s6-logwatch prints <em>logdir</em><tt>/current</tt> and watches +the file. </li> + <li> <em>logdir</em> must be managed by a +<a href="http://skarnet.org/software/s6/s6-log.html">s6-log</a> instance. </li> + <li> When new logs are appended to the <tt>current</tt> file, s6-logwatch prints +them in real-time to stdout. </li> + <li> When a rotation happens, s6-logwatch notices, and keeps watching the +new <tt>current</tt> file. </li> + <li> s6-logwatch runs forever until killed. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-m</tt> <em>buflen</em> : accumulate at most <em>buflen</em> +bytes into the stdout buffer before flushing it. By default, <em>buflen</em> is +4000. </li> +</ul> + +<h2> Bugs </h2> + +<ul> + <li> s6-logwatch is not entirely reliable because there is an unavoidable +race condition when a rotation occurs; it's a hack for humans to keep reading +logs across rotations, not a tool to be used in safe programming. When the +race condition is triggered, s6-logwatch will be unable to understand what +state <em>logdir</em> is in and will exit 101 with an error message. </li> + <li> Specific support in the logger program would be needed to avoid this +race condition; it would significantly bloat the logger program, so it has +not been deemed useful. </li> +</ul> + +<h2> Notes </h2> + +<ul> + <li> s6-logwatch is Linux-specific because it uses the +<a href="http://inotify.aiken.cz/">inotify</a> interface. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-mount.html b/doc/s6-mount.html new file mode 100644 index 0000000..b12c505 --- /dev/null +++ b/doc/s6-mount.html @@ -0,0 +1,52 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-mount program</title> + <meta name="Description" content="s6-linux-utils: the s6-mount program" /> + <meta name="Keywords" content="s6 linux administration root utilities mount" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-mount</tt> program </h1> + +<p> +<tt>s6-mount</tt> mounts filesystems. +</p> + +<h2> Interface </h2> + +<pre> + s6-mount -a + s6-mount [ -r | -w ] [ -t fstype ] [ -o option[,option...] ] <em>device</em> <em>mntpoint</em> +</pre> + +<ul> + <li> <tt>s6-mount -a</tt> mounts all partitions according to <tt>/etc/fstab</tt>. </li> + <li> If the <tt>-a</tt> option is not given, +<tt>s6-mount</tt> mounts <em>device</em> on <em>mntpoint</em>. </li> + <li> <tt>s6-mount</tt> does not touch <tt>/etc/mtab</tt>. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-a</tt> : read <tt>/etc/fstab</tt> instead of other arguments </li> + <li> <tt>-t</tt> <em>fstype</em> : filesystem is of type <em>fstype</em>. Default: ext2. </li> + <li> <tt>-r</tt> : mount read-only </li> + <li> <tt>-w</tt> : mount read-write (default) </li> + <li> <tt>-o</tt> <em>option</em> : mount with option <em>option</em>. +Currently recognized options: defaults, ro, rw, remount, sync, async, +nodev, dev, noexec, exec, nosuid, suid, noatime, atime, nodiratime, diratime, +bind, nobind, move, nomove. Unrecognized options are given directly to the kernel. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-pivotchroot.html b/doc/s6-pivotchroot.html new file mode 100644 index 0000000..42ba383 --- /dev/null +++ b/doc/s6-pivotchroot.html @@ -0,0 +1,41 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-pivotchroot program</title> + <meta name="Description" content="s6-linux-utils: the pivotchroot program" /> + <meta name="Keywords" content="s6 linux administration root utilities pivot_root chroot pivotchroot" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-pivotchroot</tt> program </h1> + +<p> +<tt>s6-pivotchroot</tt> performs a <em>pivot_root</em> system call, +then changes root to the new root filesystem and executes a program. +</p> + +<h2> Interface </h2> + +<pre> + s6-pivotchroot <em>newroot</em> <em>putold</em> <em>prog...</em> +</pre> + +<ul> + <li> <tt>s6-pivotchroot</tt> sets the root filesystem to <em>newroot</em>, +which must be a mounted filesystem entry point. The old root filesystem +will be available under <em>putold</em> (relative to the old root). </li> + <li> <tt>s6-pivotchroot</tt> changes directory to the new root, performs +a <em>chroot</em> system call to the new root, and executes <em>prog</em> +with its arguments. <em>prog</em> is searched under the new root. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-poweroff.html b/doc/s6-poweroff.html new file mode 100644 index 0000000..3685fff --- /dev/null +++ b/doc/s6-poweroff.html @@ -0,0 +1,39 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-poweroff program</title> + <meta name="Description" content="s6-linux-utils: the s6-poweroff program" /> + <meta name="Keywords" content="s6 linux administration root poweroff system halt power off" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-poweroff</tt> program </h1> + +<p> +<tt>s6-poweroff</tt> syncs the filesystems and halts the machine +immediately, switching the power off if possible. +</p> + +<p> + This is different from the sysvinit <tt>poweroff</tt> +command, which performs <tt>shutdown</tt>. The +s6-linux-utils <tt>s6-poweroff</tt> command is more or less equivalent to +sysvinit's <tt>poweroff -f</tt>. +</p> + +<h2> Interface </h2> + +<pre> + s6-poweroff +</pre> + +</body> +</html> diff --git a/doc/s6-ps.html b/doc/s6-ps.html new file mode 100644 index 0000000..43ed0d2 --- /dev/null +++ b/doc/s6-ps.html @@ -0,0 +1,128 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-ps program</title> + <meta name="Description" content="s6-linux-utils: the s6-ps program" /> + <meta name="Keywords" content="s6 linux administration root utilities ps proc procps process list" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-ps</tt> program </h1> + +<p> + <tt>s6-ps</tt> shows a list of processes on the system. +</p> + +<h2> Interface </h2> + +<pre> + s6-ps [ -H ] [ -w spacing ] [ -W chanfile ] [ -l | -o <em>field</em>,<em>field</em>,... ] +</pre> + +<ul> + <li> s6-ps assumes the <em>proc</em> filesystem is mounted on <tt>/proc</tt>. +It scans <tt>/proc</tt> for a list of all processes on the system. </li> + <li> It prints a header line, then information about the processes it has found, +one process per line. Then it exits 0. </li> + <li> If s6-ps is not allowed to read a field, it will print <tt>*</tt> (a star) instead +of the field's content. <tt>-</tt> (a dash) means the field is unapplicable here, +for instance the "tty" field for a process that has no controlling terminal. </li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-H</tt> : tree. s6-ps will display he process list as a tree, +as <tt>ps f</tt> does. It will print kernel processes first, then user processes. +By default, the processes are simply ordered by increasing pid number, without +care for the process hierarchy. </li> + <li> <tt>-w <em>spacing</em></tt> : leave at least <em>spacing</em> +space characters between two adjacent fields. Minimum is 1, default is 2, +maximum is 256. </li> + <li> <tt>-W <em>wchanfile</em></tt> : force <em>wchanfile</em> as the +file listing kernel addresses for WCHAN fields. By default, s6-ps tries to use +<tt>/proc/kallsyms</tt>, <tt>/boot/System.map-`uname -r`</tt>, and +<tt>/boot/System.map</tt>, in that order. </li> + <li> <tt>-l</tt> : long. Equivalent to +<tt>-o user,pid,cpcpu,pmem,vsize,rss,tty,s,start,cttime,args</tt>. </li> + <li> <tt>-o <em>fieldlist</em></tt> : list of fields to print. +<em>fieldlist</em> must be a comma-separated list of fields, without spaces. +Fields cannot be duplicated. They will be printed in the given order. +The valid field names are listed below. The default field list is +<tt>user,pid,tty,s,start,args</tt>. </li> +</ul> + +<h2> Fields </h2> + +<p> + The <tt>-o</tt> option makes it possible to customize s6-ps's output. Here are the +recognized <em>field</em> keywords and the corresponding field they display. +</p> + +<ul> + <li> <tt>pid</tt> : the process id number. </li> + <li> <tt>comm</tt> : the command name as known by the kernel. </li> + <li> <tt>s</tt> : the one-character state of the process, then <tt>s</tt> +if the process is a session leader or <tt>+</tt> if it is a foreground +process group leader, then <tt>N</tt> if +the process is niced or <tt><</tt> if it is anti-niced. Unlike ps, s6-ps +cannot tell whether a process has locked memory pages or not. </li> + <li> <tt>ppid</tt> : the parent process' pid. </li> + <li> <tt>pgrp</tt> : the process group number. </li> + <li> <tt>sess</tt> : the session leader's pid. </li> + <li> <tt>tty</tt> : the name of the process's controlling terminal.</li> + <li> <tt>tpgid</tt> : the pid of the foreground process group. </li> + <li> <tt>utime</tt> : the time the process spent in user mode. </li> + <li> <tt>stime</tt> : the time the process spent in kernel mode. </li> + <li> <tt>cutime</tt> : the time spent in user mode by the process and +all its dead children. </li> + <li> <tt>cstime</tt> : the time spent in kernel mode by the process and +all its dead children. </li> + <li> <tt>prio</tt> : the process' priority as computed by the kernel. </li> + <li> <tt>nice</tt> : the process' nice value. </li> + <li> <tt>thcount</tt> : the number of threads in the process. </li> + <li> <tt>start</tt> : the start time of the process. </li> + <li> <tt>vsize</tt> : the virtual memory size of the process. </li> + <li> <tt>rss</tt> : the resident set size of the process. </li> + <li> <tt>rsslimit</tt> : the maximum rss allowed for the process. </li> + <li> <tt>psr</tt> : the number of the CPU the process is running on. </li> + <li> <tt>rtprio</tt> : the real-time priority of the process. </li> + <li> <tt>policy</tt> : the real-time policy of the process - a symbolic name. </li> + <li> <tt>user</tt> : the user the process is running as. </li> + <li> <tt>group</tt> : the group the process is running as. </li> + <li> <tt>pmem</tt> : the percentage of the available virtual memory the process +is using. Be aware that it is a very rough estimate: determining exactly how much memory +a process is using is a complex task. </li> + <li> <tt>wchan</tt> : the name or address of the kernel function where the +proces is sleeping. It is actually very rare that a kernel is configured to properly +export that value, because it incurs a small performance cost. </li> + <li> <tt>args</tt> : the command line of the process. </li> + <li> <tt>env</tt> : the process environment. s6-ps can normally only print +the environment for processes running as the same user, or if it is run as root. +Be aware that the environment is usually quite large, and will create very long +lines, likely to mess up the display on a standard terminal. </li> +</li> + <li> <tt>pcpu</tt> : the percentage of CPU used by the process (total cpu time +divided by total running time). It is a mean value and does not reflect current CPU +usage. </li> + <li> <tt>ttime</tt> : total CPU time used by the process (user + kernel mode). </li> + <li> <tt>cttime</tt> : total CPU time used by the process and all its dead +children (user + kernel mode). </li> + <li> <tt>tstart</tt> : the start time of the process as a +<a href="http://cr.yp.to/libtai/tai64.html">TAI64N</a> value. </li> + <li> <tt>cpcpu</tt> : the percentage of CPU used by the process and its dead +children (total cpu time +divided by total running time). It is a mean value and does not reflect current CPU +usage. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-reboot.html b/doc/s6-reboot.html new file mode 100644 index 0000000..9d2c594 --- /dev/null +++ b/doc/s6-reboot.html @@ -0,0 +1,38 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-reboot program</title> + <meta name="Description" content="s6-linux-utils: the s6-reboot program" /> + <meta name="Keywords" content="s6 linux administration root utilities reboot power shutdown" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-reboot</tt> program </h1> + +<p> +<tt>s6-reboot</tt> syncs the filesystems and reboots the machine +immediately. +</p> + +<p> This is different from the sysvinit <tt>reboot</tt> +command, which is an alias for <tt>shutdown -r</tt>. The +s6-linux-utils <tt>s6-reboot</tt> command is more or less equivalent to +sysvinit's <tt>reboot -f</tt>. +</p> + +<h2> Interface </h2> + +<pre> + s6-reboot +</pre> + +</body> +</html> diff --git a/doc/s6-swapoff.html b/doc/s6-swapoff.html new file mode 100644 index 0000000..00307da --- /dev/null +++ b/doc/s6-swapoff.html @@ -0,0 +1,36 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-swapoff program</title> + <meta name="Description" content="s6-linux-utils: the s6-swapoff program" /> + <meta name="Keywords" content="s6 linux administration root utilities swap off partition" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-swapoff</tt> program </h1> + +<tt>s6-swapoff</tt> deactivates swap partitions. + +<h2> Interface </h2> + +<pre> + s6-swapoff [ -a | <em>device</em> ] +</pre> + +<ul> + <li> <tt>s6-swapoff</tt> deactivates the swap on <em>device</em>. </li> + <li> If the <tt>-a</tt> option is given instead of <em>device</em>, +<tt>s6-swapoff</tt> looks for swap partitions in +<tt>/proc/swaps</tt> and deactivates them all. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-swapon.html b/doc/s6-swapon.html new file mode 100644 index 0000000..3298478 --- /dev/null +++ b/doc/s6-swapon.html @@ -0,0 +1,36 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-swapon program</title> + <meta name="Description" content="s6-linux-utils: the s6-swapon program" /> + <meta name="Keywords" content="s6 linux administration root utilities swap on partition" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-swapon</tt> program </h1> + +<tt>s6-swapon</tt> activates swap partitions. + +<h2> Interface </h2> + +<pre> + s6-swapon [ -a | <em>device</em> ] +</pre> + +<ul> + <li> <tt>s6-swapon</tt> activates the swap on <em>device</em>. </li> + <li> If the <tt>-a</tt> option is given instead of <em>device</em>, +<tt>s6-swapon</tt> looks for partitions marked <em>swap</em> in +<tt>/etc/fstab</tt> and activates them all. </li> +</ul> + +</body> +</html> diff --git a/doc/s6-umount.html b/doc/s6-umount.html new file mode 100644 index 0000000..3efe82c --- /dev/null +++ b/doc/s6-umount.html @@ -0,0 +1,38 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: the s6-umount program</title> + <meta name="Description" content="s6-linux-utils: the s6-umount program" /> + <meta name="Keywords" content="s6 linux administration root linux utilities umount unmount filesystem" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>s6-umount</tt> program </h1> + +<p> + <tt>s6-umount</tt> unmounts filesystems. +</p> + +<h2> Interface </h2> + +<pre> + s6-umount [ -a | <em>mntpoint</em> ] +</pre> + +<ul> + <li> <tt>s6-umount -a</tt> unmounts all partitions according to <tt>/proc/mounts</tt>. </li> + <li> If the <tt>-a</tt> option is not given, +<tt>s6-umount</tt> unmounts the filesystem mounted on <em>mntpoint</em>. </li> + <li> <tt>s6-umount</tt> does not touch <tt>/etc/mtab</tt>. </li> +</ul> + +</body> +</html> diff --git a/doc/upgrade.html b/doc/upgrade.html new file mode 100644 index 0000000..5ab660e --- /dev/null +++ b/doc/upgrade.html @@ -0,0 +1,32 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6-linux-utils: how to upgrade</title> + <meta name="Description" content="s6-linux-utils: how to upgrade" /> + <meta name="Keywords" content="s6-linux-utils installation upgrade" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6-linux-utils</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> How to upgrade s6-linux-utils </h1> + +<h2> to 2.0.0.0 </h2> + +<ul> + <li> The build system has completely changed. It is now a standard +<tt>./configure && make && sudo make install</tt> +build system. See the enclosed INSTALL file for details. </li> + <li> slashpackage is not activated by default. </li> + <li> shared libraries are not used by default. </li> + <li> skalibs dependency bumped to 2.0.0.0 </li> +</ul> + +</body> +</html> |