Page MenuHomeFreeBSD

Handbook WG - config
ClosedPublic

Authored by carlavilla on Jul 16 2023, 5:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 17 2024, 4:04 AM
Unknown Object (File)
Feb 10 2024, 11:32 AM
Unknown Object (File)
Dec 20 2023, 8:28 AM
Unknown Object (File)
Dec 16 2023, 7:50 AM
Unknown Object (File)
Dec 13 2023, 4:28 PM
Unknown Object (File)
Nov 22 2023, 11:16 AM
Unknown Object (File)
Nov 8 2023, 1:32 AM
Unknown Object (File)
Oct 7 2023, 12:29 AM
Subscribers

Details

Summary

Upgrade the config chapter

  • Change the title of the chapter to be more acurate
  • Add a config files entry (/etc, /usr/local/etc), and /etc/sysctl.conf
  • Rework the entry "managing services in FreeBSD"
  • Upgrade cron section and add periodic info
  • Upgrade syslog section
  • Remove tuning section, some parts are really outdated
  • Upgrade power management section
  • Little upgrades to swap section

ACPI info obtained from:

https://freebsdfoundation.org/wp-content/uploads/2022/04/ACPI-Support-for-Embedded-Controllers.pdf
https://freebsdfoundation.org/wp-content/uploads/2018/04/Pain-and-Suffering-on-the-Road-to-Resume.pdf
https://wiki.freebsd.org/ACPI
https://papers.freebsd.org/2002/watanabe-acpi.files/watanabe-acpi-paper.pdf
https://vermaden.wordpress.com/2018/11/28/the-power-to-serve-freebsd-power-management/
https://github.com/freebsd/drm-kmod/blob/master/drivers/gpu/drm/i915/i915_params.c

Output: https://www.carlavilla.es/freebsd/config.html

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

carlavilla created this revision.

Looking good so far! Mostly minor comments, some of them on the original text.

documentation/content/en/books/handbook/config/_index.adoc
74

This sentence could use a comma to break it up.

81

Looks like that is UCL, not ACL?

89

The comma should be a semicolon.

101

Should /etc/fstab be in this table? It's one of the files I always have to update.

465

Do we really need details on construction of startup scripts? Most people shouldn't have to modify them or write new ones.

505–506
587

/home/user/... would be more future-proof (14.0 no longer defaults to /usr/home). /home is a symlink in earlier releases so works there too.

605

need a comma

617

/home again; should agree if changed above.

642

I think this is confusing; it could just as well be describing cron and /etc/crontab. The intro here could point back to the "periodic" entries in /etc/crontab. The periodic(8) page isn't much better. I can try to come up with something if necessary.

651

It is probably worth mentioning that the output of the periodic scripts is emailed to root by default, and therefore it is best to read root's mail or alias root to a mailbox that is monitored. The output can be redirected to a file instead; see periodic(8).

658

Maybe "edit" rather than "open" (hinting that any editor could be used)?

904

s/factory/facility/

913–914

man:newsyslog[8]

966–967

The default owner and group are root and wheel respectively.

1304–1305

Maybe it would be more clear to change the last "partition" to "file system". That is, it is added to a partition that already contains a file system.

1318–1319

Note that swap files on ZFS file systems are strongly discouraged, as swapping can lead to system hangs.

1319

This uses MBR syntax; do we want to use GPT, e.g. /dev/ada1p2? (Here and below)

carlavilla added inline comments.
documentation/content/en/books/handbook/config/_index.adoc
465

Do we really need details on construction of startup scripts? Most people shouldn't have to modify them or write new ones.

TBH, I kept it because was in the file, but I think the same.
Which parts do you want me to remove exactly?

(I'm gonna upgrade a new patch after sending this comment)

642

Yes please, if you can write a intro would be good :)

carlavilla marked an inline comment as done.
documentation/content/en/books/handbook/config/_index.adoc
465

This rc-scripting part should probably be removed. If anything, we can add a link to the rc-scripting article: https://docs.freebsd.org/en/articles/rc-scripting/

Here are direct responses to questions/requests; I'll review the new material later.

documentation/content/en/books/handbook/config/_index.adoc
465

I think I would delete lines 436 or 439 through 453. Whether to keep 436 depends on whether the concept of dependencies is needed; I guess it can't hurt.

637–640

FreeBSD provides a set of system management scripts to check status of various subsystems, perform security-related checks, rotate log files, etc.
These scripts are run on a periodic basis: daily. weekly, or monthly.

638

After 614, I would add: "The periodic tasks are initiated by entries in the system crontab, shown above."

documentation/content/en/books/handbook/config/_index.adoc
72

This line and the above should probably be one single line. The "And" is already connecting the two parts.

76

"through ports and packages" or "through the ports collection and packages"

78

"In section..." --> "In the section..."

80

"...file system structure can refer to..." --> "...file system structure refer to..."

82

"As a general rule, these files..." --> "As a general rule, configuration files..."

Because last thing we talked about weren't the config files, but sysctl and before that it was hier(7).

87

"But some applications like..." --> "Some applications like..."

154–198

It might be worth it to mention that the MIB is hierarchical and hence, specifying a prefix prints all the nodes hanging from it:

sysctl compat.ia32
compat.ia32.maxvmem: 0
compat.ia32.maxssiz: 67108864
compat.ia32.maxdsiz: 536870912
264

At some point in this section I would mention that sysctl -d gives you a description of the tunable node (if available):

sysctl -d kern.dfldsiz
kern.dfldsiz: Initial data size limit
269

"Values are set in ..." --> "Values are set using a variable=value syntax".

412

"...will be add it to..." --> "...is to add it to..."
"...executing..." --> "...by executing..."

458

"To determine whether or not a service is running, use status." --> "To determine if a service is running, use the status subcommand."

464

This sentence could be read as if we, FreeBSD developers, did not have time or motivation to support this for all services :-)
I would rewrite this ias

*Not all services support this feature".

638

..."and the configuration by..." --> "...and its configuration resides in..."

651

"...the first step will be ..." --> "...he first step is..."

664–665

"...all that need to..." --> "...all that needs to..."

670

"...manage where the results of script execution are sent." --> "...specifies where to send the results of the script execution."

672

"...to root by default..." --> "...to root..."

We are already saying "By default" at the beginning of the sentence.

674

"...or to other emails separated by spaces..." --> "...or to other emails, add the email addresses separated by spaces to [.filename]#/etc/periodic.conf#:"

683

"...lines to [.filename]#/etc/periodic.conf#, man:newsyslog[8] will rotate these..." --> "...lines to [.filename]#/etc/periodic.conf#. man:newsyslog[8] will rotate these..."

771

"The facility..." --> "A facility..."

772

"The facilities..." --> "Facilities..."

1180

It is more than that in the sense that more things can be done. Maybe something more generic like:

"Power and resource management allows the operating system to monitor system limits and to possibly run some actions triggered by events related to those limits."

1275

I would make the above points appear in order as they are shown (1 to 5) and then below swap 1 and 2.

1285–1286

"If the temperature information is not displayed load the module man:coretemp[4]." --> "If the temperature information is not displayed, load the man:coretemp[4] module .

1286

"In case of using an AMD CPU load the module man:amdtemp[4]" --> "In case of using an AMD CPU, load the man:amdtemp[4] module."

1298

I think this is not necessary. It can be done, but it is not a requirement. I don't have any special flags in the powerd running in my laptop

1311

Probably in this section we should talk about cpufreq(4).

sysctl -d dev.cpufreq.0.freq_driver
dev.cpufreq.0.freq_driver: cpufreq driver used by this cpu

sysctl -d dev.hwpstate.0
dev.hwpstate.0: 
dev.hwpstate.0.freq_settings: CPU frequency driver settings
dev.hwpstate.0.%parent: parent device
dev.hwpstate.0.%pnpinfo: device identification
dev.hwpstate.0.%location: device location relative to parent
dev.hwpstate.0.%driver: device driver name
dev.hwpstate.0.%desc: device description
1327

"...this options..." --> "...these options..."

1342

s/great/a big/

1349

"...must be used in order to do not break..." --> "...must be used not to break..."

1349–1350

"...about which driver and..." --> "...about which driver to use and..."

1406–1408

"...to enter the S3 state..." --> "...to enter the S3 state when closing the lid..."

1426

"In others with loading..." --> "In others it is enough loading..."

1429–1430

"Sometimes a system..." --> "Sometimes a FreeBSD system..."

1467

"These examples create a 512M swap file called [.filename]#/usr/swap0# instead of using a partition." --> "These examples create a 512M swap file called [.filename]#/usr/swap0#."

Because it is instead of using a partition AND instead of using a separate hard drive.

1474

"The first step will be..." --> "The first step is..."

1481

Same as above.

1488

Same as above.

carlavilla added inline comments.
documentation/content/en/books/handbook/config/_index.adoc
464

hehehe

465

There's a link to this article in the document. Please let me know if you like the place of the link in the document.

638

Thanks :)

1180

Much better!

1298

Perhaps we can change the meaning of the sentence, leave it this way:

Optionally pass certain parameters to man:powerd[8] to tell it how to manage CPU state by running the following command:

1311

Exactly what can we add?
How to get the frequencies and how to change them?

1342

Like that? sound weird
(I'll upgrade the next patch after sending the comments)

carlavilla marked 6 inline comments as done.

As I have spoken with Fernando privately, I am going to make the commit and in a future commit we will add information about cpufreq.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 1 2023, 9:32 AM
This revision was automatically updated to reflect the committed changes.