Using acpi_listen to monitor ACPI events
If ACPI is running on your system, you can monitor ACPI events using the acpi_listen command. As root user, type the following from a Terminal window:
# acpi_listen
ac_adapter AC 00000080 00000000
processor CPU 00000080 00000000
processor CPU 00000081 00000000
battery BAT0 00000080 00000001
ac_adapter AC 00000080 00000001
processor CPU 00000080 00000000
processor CPU 00000081 00000000
battery BAT0 00000080 00000001
button/lid LID 00000080 00000001
button/lid LID 00000080 00000002
The message above appeared when the AC power was disconnected, the power was reconnected, the laptop’s lid was closed and the lid was again opened.
Using apm to enter suspend mode
If the apm service is running, the apm command lets you view information about your computer.s power management and put the computer in suspend mode (if it is supported on your laptop). Here are some examples of using the apm command:
Using the -m option, the apm command displays the number of minutes of battery life remaining (if that information is available). It may also give you information about the status of how the battery is charging and whether or not the laptop is currently plugged in.
The -s option of apm causes the laptop to enter suspend mode. You can start up the laptop again, in most cases, by pressing a key on the keyboard.
Converting ext3 files system to ext4
You can convert an ext3 file system to ext4 by using a command like the following:
# tune2fs -O extents -E test_fs /dev/DEV
And, you can adjust the inode setting, for example from 128 to 256, to improve efficiency with a command like the following.
# tune2fs -I 256 /dev/DEV
After you have created the file systems on your partitions, a nice tool for adjusting those file systems is the tune2fs command. Using tune2fs, you can change volume labels, how often the file system is checked, and error behavior.
You can also use tune2fs to change an ext2 file system to an ext3 file system so the file system can use journaling.
For example:
Creating journal inode: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
By adding the -j option to tune2fs, you can change either the journal size or attach the file system to an external journal block device. After you have used tune2fs to change your file system type, you will need to correct your /etc/fstab file to include changing the file
system type from ext2 to ext3.
tune2fs 1.41.12 (17-May-2010)
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group]
[-i interval[d|m|w]] [-j] [-J journal_options] [-l]
[-m reserved_blocks_percent] [-o [^]mount_options[,...]]
[-r reserved_blocks_count] [-u user] [-C mount_count] [-L volume_label]
[-M last_mounted_dir] [-O [^]feature[,...]]
[-E extended-option[,...]] [-T last_check_time] [-U UUID]
[ -I new_inode_size ] device
The rpm command modes of operation
The command used to work with RPM package files is rpm. To manage RPM packages, the rpm command has options that let you list all the packages that are installed, upgrade existing packages to newer versions, and query packages for information (such as the files or documentation included with the package). There is also a verify option to check that all files that make up the package are present and unchanged.
The rpm command has the following modes of operation:
. install (-i)
. upgrade (-U)
. freshen (-F)
. query (-q)
. verify (-V)
. signature check (–checksig)
. uninstall (-e)
. rebuild database (–rebuilddb)
. fix permissions (–setperms)
. set owners/groups (–setugids)
. show RC (–showrc)
ISC BIND & DNS allow-recursion security feature.
allow-recursion { 192.168.1.0/24; localhost; };
The allow-recursion statement specifies which hosts are allowed to make recursive queries through this server. With the configuration as shown above, we allow recursive queries only from internal hosts since allowing every external hosts on the Internet to ask your name server to answer recursive queries can open you up to certain kinds of cache poisoning attacks. This is a security feature.