linux参数之/proce/sys/dev详解

该目录作为performance tuning应该很少用,除非安装了soft raid或开启SCSI日志

justin_$ pwd

/proc/sys/dev

justin_$ ls

cdrom  hpet  mac_hid  parport  raid  scsi

 

先看scsi目录,只有一个参数logging_level

用于控制是否记录SCSI日志,0不激活1激活

 

justin_$ more logging_level

0

 

Raid目录包含两个参数

speed_limit_max /speed_limit_min

单位为k/s,当采用软件RAID时,可用于控制其I/O速率,当需要重建RAID时,可适当调大其参数

justin_$ more speed_limit_max

200000

justin_$ more speed_limit_min

1000

通过/proc/mdstat可以监控RAID重建进度

justin_$ more mdstat

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]

md5 : active raid1 sde2[2](S) sdd2[3](S) sdc2[4](S) sdb2[1] sda2[0]

      530048 blocks [2/2] [UU]

md0 : active raid6 sde3[4] sdd3[3] sdc3[2] sdb3[1] sda3[0]

      5855836800 blocks level 6, 64k chunk, algorithm 2 [5/5] [UUUUU]

      [============>........]  resync = 61.7% (1205475036/1951945600) finish=242.9min speed=51204K/sec

 

 

 

Parport目录

其结构如下,用于设置并行设备的监测

parport

|-- default

|   |-- spintime

|   `-- timeslice

|-- parport0

|   |-- autoprobe

|   |-- autoprobe0

|   |-- autoprobe1

|   |-- autoprobe2

|   |-- autoprobe3

|   |-- devices

|   |   |-- active

|   |   `-- lp

|   |       `-- timeslice

|   |-- base-addr

|   |-- irq

|   |-- dma

|   |-- modes

|   `-- spintime

`-- parport1

    |-- autoprobe

    |-- autoprobe0

    |-- autoprobe1

    |-- autoprobe2

    |-- autoprobe3

    |-- devices

    |   |-- active

    |   `-- ppa

    |       `-- timeslice

    |-- base-addr

    |-- irq

    |-- dma

    |-- modes

    `-- spintime

 

 

 

/hpet目录

全称为high precision event timer,包含一个参数max-user-freq

 

justin_$ more max-user-freq

64

justin_$ dmesg | grep -i HPET

hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0

hpet0: 4 comparators, 64-bit 14.318180 MHz counter

rtc0: alarms up to one year, y3k, 114 bytes nvram, hpet irqs

justin_$ cat /proc/driver/rtc

rtc_time        : 09:57:06

rtc_date        : 2013-02-02

alrm_time       : **:**:**

alrm_date       : ****-**-**

alarm_IRQ       : no

alrm_pending    : no

24hr            : yes

periodic_IRQ    : no

update_IRQ      : no

HPET_emulated   : yes

DST_enable      : no

periodic_freq   : 1024

batt_status     : okay

 

http://blog.fpmurphy.com/2009/07/linux-hpet-support.html

http://docs.oracle.com/cd/E24290_01/coh.371/e22838/tune_perftune.htm#CACGHIEI

请使用浏览器的分享功能分享到微信等