Source string Read only

(itstool) path: answer/para
105/1050
Context English State
Serial Communications
This section answers common questions about serial communications with FreeBSD.
How do I get the boot: prompt to show on the serial console?
See <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html">this section of the Handbook</link>.
How do I tell if FreeBSD found my serial ports or modem cards?
As the FreeBSD kernel boots, it will probe for the serial ports for which the kernel is configured. Either watch the boot messages closely or run this command after the system is up and running:
<prompt>%</prompt> <userinput>grep -E '^(sio|uart)[0-9]' &lt; /var/run/dmesg.boot</userinput>
sio0: &lt;16550A-compatible COM port&gt; port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: &lt;16550A-compatible COM port&gt; port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
This example shows two serial ports. The first is on IRQ4, port address <literal>0x3f8</literal>, and has a 16550A-type UART chip. The second uses the same kind of chip but is on IRQ3 and is at port address <literal>0x2f8</literal>. Internal modem cards are treated just like serial ports, except that they always have a modem attached to the port.
The <filename>GENERIC</filename> kernel includes support for two serial ports using the same IRQ and port address settings in the above example. If these settings are not right for the system, or if there are more modem cards or serial ports than the kernel is configured for, reconfigure using the instructions in <link linkend="make-kernel">building a kernel</link> for more details.
How do I access the serial ports on FreeBSD? (x86-specific)
The third serial port, <filename>sio2</filename>, or <filename>COM3</filename>, is on <filename>/dev/cuad2</filename> for dial-out devices, and on <filename>/dev/ttyd2</filename> for dial-in devices. What is the difference between these two classes of devices?
When opening <filename>/dev/ttydX</filename> in blocking mode, a process will wait for the corresponding <filename>cuadX</filename> device to become inactive, and then wait for the carrier detect line to go active. When the <filename>cuadX</filename> device is opened, it makes sure the serial port is not already in use by the <filename>ttydX</filename> device. If the port is available, it steals it from the <filename>ttydX</filename> device. Also, the <filename>cuadX</filename> device does not care about carrier detect. With this scheme and an auto-answer modem, remote users can log in and local users can still dial out with the same modem and the system will take care of all the conflicts.
How do I enable support for a multi-port serial card?
The section on kernel configuration provides information about configuring the kernel. For a multi-port serial card, place an <citerefentry><refentrytitle>sio</refentrytitle><manvolnum>4</manvolnum></citerefentry> line for each serial port on the card in the <citerefentry vendor="current"><refentrytitle>device.hints</refentrytitle><manvolnum>5</manvolnum></citerefentry> file. But place the IRQ specifiers on only one of the entries. All of the ports on the card should share one IRQ. For consistency, use the last serial port to specify the IRQ. Also, specify the following option in the kernel configuration file:
options COM_MULTIPORT
The following <filename>/boot/device.hints</filename> example is for an AST 4-port serial card on IRQ 12:
hint.sio.4.at="isa"
hint.sio.4.port="0x2a0"
hint.sio.4.flags="0x701"
hint.sio.5.at="isa"
hint.sio.5.port="0x2a8"
hint.sio.5.flags="0x701"
hint.sio.6.at="isa"
hint.sio.6.port="0x2b0"
hint.sio.6.flags="0x701"
hint.sio.7.at="isa"
hint.sio.7.port="0x2b8"
hint.sio.7.flags="0x701"
hint.sio.7.irq="12"
The flags indicate that the master port has minor number <literal>7</literal> (<literal>0x700</literal>), and all the ports share an IRQ (<literal>0x001</literal>).
Can I set the default serial parameters for a port?
See the <link xlink:href="@@URL_RELPREFIX@@/doc/en_US.ISO8859-1/books/handbook/serial.html#serial-hw-config">Serial Communications</link> section in the FreeBSD Handbook.
Why can I not run <command>tip</command> or <command>cu</command>?
The built-in <citerefentry><refentrytitle>tip</refentrytitle><manvolnum>1</manvolnum></citerefentry> and <citerefentry><refentrytitle>cu</refentrytitle><manvolnum>1</manvolnum></citerefentry> utilities can only access the <filename>/var/spool/lock</filename> directory via user <systemitem class="username">uucp</systemitem> and group <systemitem class="groupname">dialer</systemitem>. Use the <systemitem class="groupname">dialer</systemitem> group to control who has access to the modem or remote systems by adding user accounts to <systemitem class="groupname">dialer</systemitem>.
Alternatively, everyone can be configured to run <citerefentry><refentrytitle>tip</refentrytitle><manvolnum>1</manvolnum></citerefentry> and <citerefentry><refentrytitle>cu</refentrytitle><manvolnum>1</manvolnum></citerefentry> by typing:
<prompt>#</prompt> <userinput>chmod 4511 /usr/bin/cu</userinput>
<prompt>#</prompt> <userinput>chmod 4511 /usr/bin/tip</userinput>
Miscellaneous Questions
FreeBSD uses a lot of swap space even when the computer has free memory left. Why?
FreeBSD will proactively move entirely idle, unused pages of main memory into swap in order to make more main memory available for active use. This heavy use of swap is balanced by using the extra free memory for caching.
Note that while FreeBSD is proactive in this regard, it does not arbitrarily decide to swap pages when the system is truly idle. Thus, the system will not be all paged out after leaving it idle overnight.
Why does <command>top</command> show very little free memory even when I have very few programs running?
The simple answer is that free memory is wasted memory. Any memory that programs do not actively allocate is used within the FreeBSD kernel as disk cache. The values shown by <citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry> labeled as <literal>Inact</literal> and <literal>Laundry</literal> are cached data at different aging levels. This cached data means the system does not have to access a slow disk again for data it has accessed recently, thus increasing overall performance. In general, a low value shown for <literal>Free</literal> memory in <citerefentry><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry> is good, provided it is not <emphasis>very</emphasis> low.
Why will <command>chmod</command> not change the permissions on symlinks?

Loading…

User avatar None

New source string

FreeBSD Doc / books_faqEnglish

New source string 7 months ago
Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: answer/para
Flags
read-only
Source string location
book.translate.xml:5307
String age
7 months ago
Source string age
7 months ago
Translation file
books/faq.pot, string 855