[6370fa6] | 1 | <sect2>
|
---|
| 2 | <title>Contents</title>
|
---|
| 3 |
|
---|
| 4 | <para>
|
---|
| 5 | The Sysvinit package contains the pidof, last, lastb, mesg, utmpdump,
|
---|
| 6 | wall, halt, init, killall5, poweroff, reboot, runlevel, shutdown,
|
---|
| 7 | sulogin and telinit programs.
|
---|
| 8 | </para>
|
---|
| 9 |
|
---|
| 10 | </sect2>
|
---|
| 11 |
|
---|
| 12 | <sect2><title>Description</title>
|
---|
| 13 |
|
---|
| 14 | <sect3><title>pidof</title>
|
---|
| 15 |
|
---|
| 16 | <para>
|
---|
| 17 | Pidof finds the process id's (pids) of the named programs and prints
|
---|
| 18 | those id's on standard output.
|
---|
| 19 | </para>
|
---|
| 20 |
|
---|
| 21 | </sect3>
|
---|
| 22 |
|
---|
| 23 | <sect3><title>last</title>
|
---|
| 24 |
|
---|
| 25 | <para>
|
---|
| 26 | last searches back through the file /var/log/wtmp (or the file designated
|
---|
| 27 | by the -f flag) and displays a list of all users logged in (and out)
|
---|
| 28 | since that file was created.
|
---|
| 29 | </para>
|
---|
| 30 |
|
---|
| 31 | </sect3>
|
---|
| 32 |
|
---|
| 33 | <sect3><title>lastb</title>
|
---|
| 34 |
|
---|
| 35 | <para>
|
---|
| 36 | lastb is the same as last, except that by default it shows a log of the
|
---|
| 37 | file /var/log/btmp, which contains all the bad login attempts.
|
---|
| 38 |
|
---|
| 39 | </para>
|
---|
| 40 |
|
---|
| 41 | </sect3>
|
---|
| 42 |
|
---|
| 43 | <sect3><title>mesg</title>
|
---|
| 44 |
|
---|
| 45 | <para>
|
---|
| 46 | Mesg controls the access to your terminal by others. It's typically
|
---|
| 47 | used to allow or disallow other users to write to your terminal.
|
---|
| 48 | </para>
|
---|
| 49 |
|
---|
| 50 | </sect3>
|
---|
| 51 |
|
---|
| 52 | <sect3><title>utmpdump</title>
|
---|
| 53 |
|
---|
| 54 | <para>
|
---|
| 55 | utmpdumps prints the content of a file (usually /var/run/utmp) on
|
---|
| 56 | standard output in a user friendly format.
|
---|
| 57 | </para>
|
---|
| 58 |
|
---|
| 59 | </sect3>
|
---|
| 60 |
|
---|
| 61 | <sect3><title>wall</title>
|
---|
| 62 |
|
---|
| 63 | <para>
|
---|
| 64 | Wall sends a message to everybody logged in with their mesg permission
|
---|
| 65 | set to yes.
|
---|
| 66 | </para>
|
---|
| 67 |
|
---|
| 68 | </sect3>
|
---|
| 69 |
|
---|
| 70 | <sect3><title>halt</title>
|
---|
| 71 |
|
---|
| 72 | <para>
|
---|
| 73 | Halt notes that the system is being brought down in the file
|
---|
| 74 | /var/log/wtmp, and then either tells the kernel to halt, reboot or
|
---|
| 75 | poweroff the system. If halt or reboot is called when the system is not
|
---|
| 76 | in runlevel 0 or 6, shutdown will be invoked instead (with the flag -h or -r).
|
---|
| 77 | </para>
|
---|
| 78 |
|
---|
| 79 | </sect3>
|
---|
| 80 |
|
---|
| 81 | <sect3><title>init</title>
|
---|
| 82 |
|
---|
| 83 | <para>
|
---|
| 84 | Init is the parent of all processes. Its primary role is to create
|
---|
| 85 | processes from a script stored in the file /etc/inittab. This
|
---|
| 86 | file usually has entries which cause init to spawn gettys on each line that
|
---|
| 87 | users can log in. It also controls autonomous processes required by any
|
---|
| 88 | particular system.
|
---|
| 89 | </para>
|
---|
| 90 |
|
---|
| 91 | </sect3>
|
---|
| 92 |
|
---|
| 93 | <sect3><title>killall5</title>
|
---|
| 94 |
|
---|
| 95 | <para>
|
---|
| 96 | killall5 is the SystemV killall command. It sends a signal to all
|
---|
| 97 | processes except the processes in its own session, so it won't kill the
|
---|
| 98 | shell that is running the script it was called from.
|
---|
| 99 | </para>
|
---|
| 100 |
|
---|
| 101 | </sect3>
|
---|
| 102 |
|
---|
| 103 | <sect3><title>poweroff</title>
|
---|
| 104 |
|
---|
| 105 | <para>
|
---|
| 106 | poweroff is equivalent to shutdown -h -p now. It halts the computer and
|
---|
| 107 | switches off the computer (when using an APM compliant BIOS and APM is
|
---|
| 108 | enabled in the kernel).
|
---|
| 109 | </para>
|
---|
| 110 |
|
---|
| 111 | </sect3>
|
---|
| 112 |
|
---|
| 113 | <sect3><title>reboot</title>
|
---|
| 114 |
|
---|
| 115 | <para>
|
---|
| 116 | reboot is equivalent to shutdown -r now. It reboots the computer.
|
---|
| 117 | </para>
|
---|
| 118 |
|
---|
| 119 | </sect3>
|
---|
| 120 |
|
---|
| 121 | <sect3><title>runlevel</title>
|
---|
| 122 |
|
---|
| 123 | <para>
|
---|
| 124 | Runlevel reads the system utmp file (typically /var/run/utmp) to locate
|
---|
| 125 | the runlevel record, and then prints the previous and current system
|
---|
| 126 | runlevel on its standard output, separated by a single space.
|
---|
| 127 | </para>
|
---|
| 128 |
|
---|
| 129 | </sect3>
|
---|
| 130 |
|
---|
| 131 | <sect3><title>shutdown</title>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
| 134 | shutdown brings the system down in a secure way. All logged-in users are
|
---|
| 135 | notified that the system is going down, and login is blocked.
|
---|
| 136 | </para>
|
---|
| 137 |
|
---|
| 138 | </sect3>
|
---|
| 139 |
|
---|
| 140 | <sect3><title>sulogin</title>
|
---|
| 141 |
|
---|
| 142 | <para>
|
---|
| 143 | sulogin is invoked by init when the system goes into single user mode
|
---|
| 144 | (this is done through an entry in /etc/inittab). Init also tries to
|
---|
| 145 | execute sulogin when it is passed the -b flag from the bootmonitor (eg, LILO).
|
---|
| 146 | </para>
|
---|
| 147 |
|
---|
| 148 | </sect3>
|
---|
| 149 |
|
---|
| 150 | <sect3><title>telinit</title>
|
---|
| 151 |
|
---|
| 152 | <para>
|
---|
| 153 | telinit sends appropriate signals to init, telling it which runlevel to
|
---|
| 154 | change to.
|
---|
| 155 | </para>
|
---|
| 156 |
|
---|
| 157 | </sect3>
|
---|
| 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|