|
Lines 473-485
Link Here
|
| 473 |
certain times.</para> |
473 |
certain times.</para> |
| 474 |
|
474 |
|
| 475 |
<para>The <command>cron</command> utility uses two different |
475 |
<para>The <command>cron</command> utility uses two different |
| 476 |
types of configuration files, the system crontab and user crontabs. The |
476 |
types of configuration files, the system crontab and user |
| 477 |
only difference between these two formats is the sixth field. In the |
477 |
crontabs. These formats only differ in the sixth field and |
| 478 |
system crontab, the sixth field is the name of a user for the command |
478 |
later. In the system crontab, <command>cron</command> will run |
| 479 |
to run as. This gives the system crontab the ability to run commands |
479 |
the command as the user specified in the sixth field. In a user |
| 480 |
as any user. In a user crontab, the sixth field is the command to run, |
480 |
crontab, all commands run as the user who created the crontab, |
| 481 |
and all commands run as the user who created the crontab; this is an |
481 |
so the sixth field is the last field; this is an important |
| 482 |
important security feature.</para> |
482 |
security feature. The final field is always the command |
|
|
483 |
to run.</para> |
| 483 |
|
484 |
|
| 484 |
<note> |
485 |
<note> |
| 485 |
<para>User crontabs allow individual users to schedule tasks without the |
486 |
<para>User crontabs allow individual users to schedule tasks without the |
|
Lines 487-496
Link Here
|
| 487 |
permissions of the user who owns the crontab.</para> |
488 |
permissions of the user who owns the crontab.</para> |
| 488 |
|
489 |
|
| 489 |
<para>The <username>root</username> user can have a user crontab just like |
490 |
<para>The <username>root</username> user can have a user crontab just like |
| 490 |
any other user. This one is different from |
491 |
any other user. The <username>root</username> user crontab is |
| 491 |
<filename>/etc/crontab</filename> (the system crontab). Because of the |
492 |
separate from <filename>/etc/crontab</filename> (the system |
| 492 |
system crontab, there is usually no need to create a user crontab |
493 |
crontab). Because the system crontab effectively |
| 493 |
for <username>root</username>.</para> |
494 |
invokes the specified commands as root there is usually no need to |
|
|
495 |
create a user crontab for <username>root</username>.</para> |
| 494 |
</note> |
496 |
</note> |
| 495 |
|
497 |
|
| 496 |
<para>Let us take a look at the <filename>/etc/crontab</filename> file |
498 |
<para>Let us take a look at the <filename>/etc/crontab</filename> file |
|
Lines 547-557
Link Here
|
| 547 |
day of the week. All these fields must be numeric values, and follow |
549 |
day of the week. All these fields must be numeric values, and follow |
| 548 |
the twenty-four hour clock. The <literal>who</literal> field is special, |
550 |
the twenty-four hour clock. The <literal>who</literal> field is special, |
| 549 |
and only exists in the <filename>/etc/crontab</filename> file. |
551 |
and only exists in the <filename>/etc/crontab</filename> file. |
| 550 |
This field specifies which user the command should be run as. |
552 |
This field specifies which user the command should be run |
| 551 |
When a user installs his or her <filename>crontab</filename> file, they |
553 |
as. The last field is the command to be executed.</para> |
| 552 |
will not have this option. Finally, the <literal>command</literal> option is listed. |
|
|
| 553 |
This is the last field, so naturally it should designate the command |
| 554 |
to be executed.</para> |
| 555 |
</callout> |
554 |
</callout> |
| 556 |
|
555 |
|
| 557 |
<callout arearefs="co-main"> |
556 |
<callout arearefs="co-main"> |
|
Lines 584-591
Link Here
|
| 584 |
<title>Installing a Crontab</title> |
583 |
<title>Installing a Crontab</title> |
| 585 |
|
584 |
|
| 586 |
<important> |
585 |
<important> |
| 587 |
<para>You must not use the procedure described here to |
586 |
<para>Do not use the procedure described here to |
| 588 |
edit/install the system crontab. Simply use your favorite |
587 |
edit and install the system crontab, |
|
|
588 |
<filename>/etc/crontab</filename>. Just use your favorite |
| 589 |
editor: the <command>cron</command> utility will notice that the file |
589 |
editor: the <command>cron</command> utility will notice that the file |
| 590 |
has changed and immediately begin using the updated version. |
590 |
has changed and immediately begin using the updated version. |
| 591 |
See |
591 |
See |
|
Lines 616-622
Link Here
|
| 616 |
automatically installed by the <command>crontab</command> command. |
616 |
automatically installed by the <command>crontab</command> command. |
| 617 |
</para> |
617 |
</para> |
| 618 |
|
618 |
|
| 619 |
<para>If you later want to remove your user <filename>crontab</filename> |
619 |
<para>In order to remove a user <filename>crontab</filename> |
| 620 |
completely, use <command>crontab</command> with the <option>-r</option> |
620 |
completely, use <command>crontab</command> with the <option>-r</option> |
| 621 |
option. |
621 |
option. |
| 622 |
</para> |
622 |
</para> |
|
Lines 636-642
Link Here
|
| 636 |
</authorgroup> |
636 |
</authorgroup> |
| 637 |
</sect1info> |
637 |
</sect1info> |
| 638 |
|
638 |
|
| 639 |
<title>Using rc under &os;</title> |
639 |
<title>Using &man.rc.8; Under &os;</title> |
| 640 |
|
640 |
|
| 641 |
<para>In 2002 &os; integrated the NetBSD |
641 |
<para>In 2002 &os; integrated the NetBSD |
| 642 |
<filename>rc.d</filename> system for system initialization. |
642 |
<filename>rc.d</filename> system for system initialization. |
|
Lines 1674-1680
Link Here
|
| 1674 |
</sect1> |
1674 |
</sect1> |
| 1675 |
|
1675 |
|
| 1676 |
<sect1 id="configtuning-sysctl"> |
1676 |
<sect1 id="configtuning-sysctl"> |
| 1677 |
<title>Tuning with sysctl</title> |
1677 |
<title>Tuning with &man.sysctl.8;</title> |
| 1678 |
|
1678 |
|
| 1679 |
<indexterm><primary>sysctl</primary></indexterm> |
1679 |
<indexterm><primary>sysctl</primary></indexterm> |
| 1680 |
<indexterm> |
1680 |
<indexterm> |
|
Lines 1944-1950
Link Here
|
| 1944 |
out of space and the update to fail.</para> |
1944 |
out of space and the update to fail.</para> |
| 1945 |
|
1945 |
|
| 1946 |
<sect3> |
1946 |
<sect3> |
| 1947 |
<title>More Details about Soft Updates</title> |
1947 |
<title>More Details About Soft Updates</title> |
| 1948 |
|
1948 |
|
| 1949 |
<indexterm> |
1949 |
<indexterm> |
| 1950 |
<primary>Soft Updates</primary> |
1950 |
<primary>Soft Updates</primary> |
|
Lines 2390-2404
Link Here
|
| 2390 |
<xref linkend="swap-encrypting"> of the Handbook.</para> |
2390 |
<xref linkend="swap-encrypting"> of the Handbook.</para> |
| 2391 |
|
2391 |
|
| 2392 |
<sect2 id="new-drive-swap"> |
2392 |
<sect2 id="new-drive-swap"> |
| 2393 |
<title>Swap on a New Hard Drive</title> |
2393 |
<title>Swap on a New or Existing Hard Drive</title> |
| 2394 |
|
2394 |
|
| 2395 |
<para>The best way to add swap, of course, is to use this as an |
2395 |
<para>Adding a new hard drive for swap gives better performance |
| 2396 |
excuse to add another hard drive. You can always use another |
2396 |
than adding a partition on an existing drive. Setting up |
| 2397 |
hard drive, after all. If you can do this, go reread the |
2397 |
partitions and hard drives is explained in |
| 2398 |
discussion of swap space |
2398 |
<xref linkend="disks-adding">. |
| 2399 |
in <xref linkend="configtuning-initial"> |
2399 |
<xref linkend="configtuning-initial"> |
| 2400 |
of the Handbook for some suggestions on how to best |
2400 |
discusses partition layouts and swap partition size |
| 2401 |
arrange your swap.</para> |
2401 |
considerations.</para> |
|
|
2402 |
|
| 2403 |
<para>Use &man.swapon.8; to add a swap partition to the system. |
| 2404 |
For example:</para> |
| 2405 |
|
| 2406 |
<screen>&prompt.root; <userinput>swapon<replaceable> /dev/ada1s1p2</replaceable></userinput></screen> |
| 2407 |
|
| 2408 |
<warning> |
| 2409 |
<para>It is possible to use any partition not currently |
| 2410 |
mounted, even if it already contains data. Using |
| 2411 |
&man.swapon.8; on a partition that contains data will |
| 2412 |
overwrite and destroy that data. Make sure that the |
| 2413 |
partition to be added as swap is really the intended |
| 2414 |
partition before running |
| 2415 |
&man.swapon.8;.</para> |
| 2416 |
</warning> |
| 2417 |
|
| 2418 |
<para>To automatically add this swap partition on boot, |
| 2419 |
add an entry to <filename>/etc/fstab</filename> for the |
| 2420 |
partition:</para> |
| 2421 |
|
| 2422 |
<programlisting><replaceable>/dev/ada1s1p1</replaceable> none swap sw 0 0</programlisting> |
| 2423 |
|
| 2424 |
<para>See &man.fstab.5; for an explaination of the entries |
| 2425 |
in <filename>/etc/fstab</filename>.</para> |
| 2402 |
</sect2> |
2426 |
</sect2> |
| 2403 |
|
2427 |
|
| 2404 |
<sect2 id="nfs-swap"> |
2428 |
<sect2 id="nfs-swap"> |
|
Lines 2878-2884
Link Here
|
| 2878 |
on Linux, it is likely a &os; driver problem and narrowing down |
2902 |
on Linux, it is likely a &os; driver problem and narrowing down |
| 2879 |
which driver causes the problems will help us fix the problem. |
2903 |
which driver causes the problems will help us fix the problem. |
| 2880 |
Note that the <acronym>ACPI</acronym> maintainers do not |
2904 |
Note that the <acronym>ACPI</acronym> maintainers do not |
| 2881 |
usually maintain other drivers (e.g sound, |
2905 |
usually maintain other drivers (e.g., sound, |
| 2882 |
<acronym>ATA</acronym>, etc.) so any work done on tracking |
2906 |
<acronym>ATA</acronym>, etc.) so any work done on tracking |
| 2883 |
down a driver problem should probably eventually be posted |
2907 |
down a driver problem should probably eventually be posted |
| 2884 |
to the &a.current.name; list and mailed to the driver |
2908 |
to the &a.current.name; list and mailed to the driver |
|
Lines 2898-2904
Link Here
|
| 2898 |
</sect3> |
2922 |
</sect3> |
| 2899 |
|
2923 |
|
| 2900 |
<sect3> |
2924 |
<sect3> |
| 2901 |
<title>System Hangs (temporary or permanent)</title> |
2925 |
<title>System Hangs (Temporary or Permanent)</title> |
| 2902 |
|
2926 |
|
| 2903 |
<para>Most system hangs are a result of lost interrupts or an |
2927 |
<para>Most system hangs are a result of lost interrupts or an |
| 2904 |
interrupt storm. Chipsets have a lot of problems based on how |
2928 |
interrupt storm. Chipsets have a lot of problems based on how |
|
Lines 3058-3064
Link Here
|
| 3058 |
how to fix them:</para> |
3082 |
how to fix them:</para> |
| 3059 |
|
3083 |
|
| 3060 |
<sect3> |
3084 |
<sect3> |
| 3061 |
<title>_OS dependencies</title> |
3085 |
<title>_OS Dependencies</title> |
| 3062 |
|
3086 |
|
| 3063 |
<para>Some <acronym>AML</acronym> assumes the world consists of |
3087 |
<para>Some <acronym>AML</acronym> assumes the world consists of |
| 3064 |
various &windows; versions. You can tell &os; to claim it is |
3088 |
various &windows; versions. You can tell &os; to claim it is |
|
Lines 3070-3076
Link Here
|
| 3070 |
</sect3> |
3094 |
</sect3> |
| 3071 |
|
3095 |
|
| 3072 |
<sect3> |
3096 |
<sect3> |
| 3073 |
<title>Missing Return statements</title> |
3097 |
<title>Missing Return Statements</title> |
| 3074 |
|
3098 |
|
| 3075 |
<para>Some methods do not explicitly return a value as the |
3099 |
<para>Some methods do not explicitly return a value as the |
| 3076 |
standard requires. While <acronym>ACPI-CA</acronym> |
3100 |
standard requires. While <acronym>ACPI-CA</acronym> |
|
Lines 3112-3118
Link Here
|
| 3112 |
</sect2> |
3136 |
</sect2> |
| 3113 |
|
3137 |
|
| 3114 |
<sect2 id="ACPI-debugoutput"> |
3138 |
<sect2 id="ACPI-debugoutput"> |
| 3115 |
<title>Getting Debugging Output From |
3139 |
<title>Getting Debugging Output from |
| 3116 |
<acronym>ACPI</acronym></title> |
3140 |
<acronym>ACPI</acronym></title> |
| 3117 |
|
3141 |
|
| 3118 |
<indexterm> |
3142 |
<indexterm> |