Kernel
three kernel
. regular (Kernel): one or more processor but 4GB of Ram and less
. PAE (Kernel-PAE): multiple processor and up to 16GB of Ram
. Xen (Kernel-xen): needed for virtualization
Modules
.located under /lib/modules/$(uname -r)/*.ko
#lsmod
provicdes a list of loaded modules
#losmod | grep usb-storage
#modprobe
can locad and unload modules
#modprobe usb-storage(load)
#modprobe -r usb-storage(remove)
#modinfo
displays information about any available module
#modinfo usb-storage
/etc/modprobe.conf used for module configuration
-----------------------------------------------------------------------------------------------
Kernel Configuration with /proc
/etc/sysctl.conf
reinitialized after a reboot
(更多的設定都在kernel-doc)
/proc/cpuinfo
/proc/1/*
/proc/partitions
/proc/meminfo
....
/proc/sys/kernel/hostname
/proc/sys/net/ipv4/ip_forward
/proc/sys/vm/swappiness
....
#sysctl -a
list all current settings
#sysctl -p
reprocesss settings from sysctl.conf
#sysctl -w net.ipv4.ip_forward=1
set a value dynamically
%Access Drivers throuth /dev
echo "Messages" > /dev/ttyS0(com1)
把Messageso傳送到ttyS0
-------------------------------------------------------
Device
Block devices
/dev/hd{a,c}: ide hdd, cdrom
/dev/sd{a,c}: scsi, sata, usb storage
/dev/md{0,1}: software RAID
Character devices
/dev/tty{0-6}: virtual consoles
/dev/{null, zero}: software devices
/dev/{random, urandom}: random numbers
[root@server118 ~]# who (目前使用者)
root pts/0 2009-07-19 20:16 (192.168.0.254)
使用者 device time (IP address)
可指定建立device相關設定(建議使用自動)
/etc/udev/rules.d/ *
#hal-device
lists all devices in text mode
#hal-deivce-manager
lists all devices on a graphical window
#lspci
#lsusb
[root@server118 ~]# hal-device
0: udi = '/org/freedesktop/Hal/devices/platform_pcspkr_logicaldev_input'
info.udi = '/org/freedesktop/Hal/devices/platform_pcspkr_logicaldev_input' (string)
input.product = 'PC Speaker' (string)
info.product = 'PC Speaker' (string)
linux.device_file = '/dev/input/event1' (string)
linux.subsystem = 'input' (string)
linux.hotplug_type = 2 (0x2) (int)
input.device = '/dev/input/event1' (string)
info.capabilities = { 'input' } (string list)
info.category = 'input' (string)
info.parent = '/org/freedesktop/Hal/devices/platform_pcspkr' (string)
input.physical_device = '/org/freedesktop/Hal/devices/platform_pcspkr' (string)
linux.sysfs_path = '/sys/class/input/input1/event1' (string)
----略----
Memory
#free
[root@server118 ~]# free
total used free shared buffers cached
Mem: 262320 112380 149940 0 8232 51992
-/+ buffers/cache: 52156 210164
Swap: 557048 0 557048
#vmstat
[root@server118 ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 150000 8216 52004 0 0 27 5 16 26 1 0 97 1 1
#swapon -s
[root@server118 ~]# swapon -s
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 557048 0 -1
Processes
#ps
#top
Kernel state
#uname
#uptime
#tload
- Jul 19 Sun 2009 20:18
[雜記]RHCE筆記整理-RH133-Unit3(1)
close
全站熱搜
留言列表