≡ Menu

kernel parameters

How To Reduce Linux Computer Power Consumption

The Advanced Configuration and Power Interface (ACPI) specification is an open standard operating system-centic device configuration and power management. You can easily reduce your PC's power consumption through smart activity monitors. You can monitor application usage, system attributes, and user activity to more effectively use the power-management systems of your laptop or desktop computer.

Advanced Configuration and Power Interface (ACPI) and the power configuration systems built into modern computers provide a wide range of options for reducing overall power consumption. Linux and its associated user space programs have many of the tools necessary to master your PC power consumption in a variety of contexts. Much of the current documentation focuses on modifying your kernel parameters and hdparm settings to reduce unnecessary disk activity. In addition, extensive documentation is available for changing your processor settings to maximize the benefits of dynamic frequency scaling based on your current power source.

This article provides tools and code to build on these power-saving measures by monitoring your application-usage patterns. Use the techniques presented here to change your power settings based on the application in focus, user activity, and general system performance.

Linux Local Port Range
If your Linux server is opening lots of outgoing network connections, you need to increase local port range. By default range is small. For example a squid proxy server can come under fire if it runs out of ports.
[click to continue…]

Understanding UNIX / Linux File System

A conceptual understanding of file system, especially data structure and related terms will help you become a successful system administrator. I have seen many new Linux system administrator without any clue about file system. The conceptual knowledge can be applied to restore file system in an emergency situation.
[click to continue…]

FreeBSD comes with different utilities, which can be use to gathered the information as per your needs. uname command is use to print system information. dmesg command is use to print kernel ring buffer information. sysctl command is use to configure kernel parameters at runtime as well as to read hardware information.

Following list summaries, all the command you need to gather FreeBSD hardware information.

1) Determining the Hardware Type/platform:
# uname -m
2) Determining machine processor architecture:
# uname -p
3) Determining FreeBSD release level:
# uname -r
Generally, following command is use to get all info at a time:
# uname -mrs
Output:

FreeBSD 5.0-RELEASE i386

4) Determining CPU information such as speed, make etc
# dmesg | grep CPU
Output:

CPU: Pentium 4 (1716.41-MHz 686-class CPU)
acpi_cpu0:  on acpi0
acpi_cpu: CPU throttling enabled, 8 steps from 100% to 12.5%

5) Determining real and available memory to FreeBSD:
# dmesg | grep memory
Output:

real memory  = 201326592 (192 MB)
avail memory = 188555264 (179 MB) 

Alternatively, try following command to grab memory information:
# sysctl -a | grep hw.*mem
# sysctl -a | grep mem

Output:

hw.physmem: 194985984
hw.usermem: 167641088
hw.cbb.start_memory: 2281701376

Note systcl has more info, just type the sysctl command to see rest of all information:
# sysctl -a | less
6) Determining how long a system has been up:
# uptime
7) Determining when a system was last rebooted or shutdown:
# last -1 reboot
# last -1 shutdown

8) Determining swap file system usage
# swapinfo -k
9) Determining who is logged in and what they are doing. Following all commands can be used. users command displays the list of all logged in users only.
# w
# who
# users

10) Find out when user was last logged in - You can use last command as follows:
# last user-name
(a) To find out user vivek was last logged, enter:
# last vivek

See FreeBSD getsysinfo.bash script. It is use to find general FreeBSD system information such as, hostname, OS version, Kernel version, Processor/CPU, Total RAM, System load, network interface, total logged in users, Hard disks, Runlevel etc. Make sure your read the detailed installation instruction.