52
Chapter 2. The
proc
File System
pty_master
/dev/ptm
128
0 255 pty:master
pty_slave
/dev/ttyp
3
0 255 pty:slave
pty_master
/dev/pty
2
0 255 pty:master
/dev/vc/0
/dev/vc/0
4
0 system:vtmaster
/dev/ptmx
/dev/ptmx
5
2 system
/dev/console
/dev/console
5
1 system:console
/dev/tty
/dev/tty
5
0 system:/dev/tty
unknown
/dev/vc/%d
4
1 63 console
The
/proc/tty/driver/serial
file lists the usage statistics and status of each of the serial tty
lines.
In order that tty devices can be used in a similar way as network devices, the Linux kernel will enforce
line discipline on the device. This allows the driver to place a specific type of header with every block
of data transmitted over the device, making it possible for the remote end of the connection to be
able to see that block of data as just one in a stream of data blocks. SLIP and PPP are common line
disciplines, and each are commonly used to connect systems to one other over a serial link.
Registered line disciplines are stored in the
ldiscs
file, with detailed information available in the
ldisc
directory.
2.4. Using
sysctl
The
sysctl
command is used to view, set, and automate kernel settings in the
/proc/sys/
directory.
To get a quick overview of all settings configurable in the
/proc/sys/
directory, type the
sysctl
 a
command as root. This will create a large, comprehensive list, a small portion of which looks
something like this:
net.ipv4.route.min_delay = 2
kernel.sysrq = 0
kernel.sem = 250
32000
32
128
This is the same basic information you would see if you viewed each of the files individually. The
only difference is the file location. The
/proc/sys/net/ipv4/route/min_delay
file is signified
by
net.ipv4.route.min_delay
, with the directory slashes replaced by dots and the
proc.sys
portion assumed.
The
sysctl
command can be use in place of
echo
to assign values to writable files in the
/proc/sys/
directory. For instance instead of using this command:
echo 1 > /proc/sys/kernel/sysrq
You can use this
sysctl
command:
sysctl  w kernel.sysrq="1"
kernel.sysrq = 1
While quickly setting single values like this in
/proc/sys/
is helpful during testing, it does not work
as well on a production system, as all
/proc/sys/
special settings are lost when the machine is
rebooted. To preserve the settings that you like to make permanently to your kernel, add them to the
/etc/sysctl.conf
file.
Every time the system boots, the
init
program runs the
/etc/rc.d/rc.sysinit
script. This script
contains a command to execute
sysctl
using
/etc/sysctl.conf
to dictate the values passed to
the kernel. Any values added to
/etc/sysctl.conf
will take effect each time the system boots.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved