Archive for the tag 'Parameters'

Network Parameters for Hosts Only System

If the system is not going to be used as a firewall or gateway to pass IP traffic between different networks, then edit the file /etc/sysctl.conf and add or correct the following lines:

net.ipv4.ip forward = 0
net.ipv4.conf.all.send redirects = 0
net.ipv4.conf.default.send redirects = 0

These settings disable hosts from performing network functionality which is only appropriate for routers.

tune2fs - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems

tune2fs allows the system administrator to adjust various tunable filesystem parameters on Linux ext2, ext3, or ext4 filesystems.

The current values of these options can be displayed by using the -l option to tune2fs(8) program, or by using the dumpe2fs(8) program.

-c max-mount-counts

Adjust the number of mounts after which the filesystem will be checked by e2fsck(8). If max-mount-counts is 0 or -1, the number of times the filesystem is mounted will be disregarded by e2fsck(8) and the kernel.Staggering the mount-counts at which filesystems are forcibly checked will avoid all filesystems being checked at one time when using journaled filesystems.

-C mount-count

Set the number of times the filesystem has been mounted. If set to a greater value than the max-mount-counts parameter set by the -c option, e2fsck(8) will check the filesystem at the next reboot.

Getting the current Values:

[root@proxy ~]# tune2fs -l /dev/sdb1 |grep count
Inode count: 655360
Block count: 2620595
Reserved block count: 131029
Mount count: 12
Maximum mount count: 26
[root@proxy ~]#

Example:

So for a system that contains 5 partitions and is booted approximately once a month you could do the following to stagger the mount counts:

tune2fs -c 5 -C 0 partition1
tune2fs -c 5 -C 1 partition2
tune2fs -c 5 -C 2 partition3
tune2fs -c 5 -C 3 partition4
tune2fs -c 5 -C 4 partition5

Finding MySQL server operating parameters

If you have a MySQL server listening on a given port number, you can use the following command to find out what operating parameters it is using for several important configurable variables, including the base directory and Unix socket file name:

# mysqladmin –host=host_name –port=port_number variables

With the information displayed by that command, you can tell what option values not to use when configuring an additional server.

SBDavid

The GNU long parameters

The GNU long parameters

You can combine GNU long parameters with either Unix- or BSD-style parameters to really customize your display. One cool feature of GNU long parameters with the –forest parameter. It displays the hierarchical process information, but using ASCII characters to draw cute charts:

$ ps -ef –forest |grep apache2

root 3420 1 2 08:55 ? 00:00:00 /usr/sbin/apache2 -k start
www-data 3428 3420 0 08:55 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 3431 3420 0 08:55 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 3432 3420 0 08:55 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 3433 3420 0 08:55 ? 00:00:00 \_ /usr/sbin/apache2 -k start
www-data 3434 3420 0 08:55 ? 00:00:00 \_ /usr/sbin/apache2 -k start

hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS “libata” subsystem and the older IDE driver subsystem.

hdparm [ flags ] [device]

-T Perform timings of cache reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading directly from the
Linux buffer cache without disk access. This measurement is essentially an indication of the throughput of the processor, cache, and memory of the system under test.

root@desktop:~#hdparm -T /dev/sda
/dev/sda:
Timing cached reads: 2254 MB in 1.99 seconds = 1131.64 MB/sec

-t Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any filesystem overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl.

root@desktop:~# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 118 MB in 3.01 seconds = 39.16 MB/sec

Next »