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