@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ etc-rc.local @@@ 起動時設定 (ATA_IDLE_CMD 発行、disk-queuing 禁止) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #!/bin/sh # # start up jobs for my server # # # enable stand-by timer after 10minutes # echo "" echo "" echo "@@@@@ start rc.local" echo "@@@@@ try to set idle timers" /sbin/camcontrol idle ada0 -t 600 2> /dev/null /sbin/camcontrol idle ada1 -t 600 2> /dev/null # # disable about command queueing # echo "@@@@@ try to disable command queuings" /sbin/sysctl kern.cam.ada.0.sort_io_queue=0 2> /dev/null /sbin/camcontrol tags ada0 -N 1 2> /dev/null /sbin/sysctl kern.cam.ada.1.sort_io_queue=0 2> /dev/null /sbin/camcontrol tags ada1 -N 1 2> /dev/null echo "@@@@@ endof rc.local" echo "" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ /usr/src/sys/dev/ata/ata-all.h.patch @@@ ATA タイムアウト伸長 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ *** ata-all.h.orig Sat Nov 28 15:05:45 2015 --- ata-all.h Sat Nov 28 15:06:02 2015 *************** *** 341,347 **** #define ATA_MAX_28BIT_LBA 268435455UL #ifndef ATA_REQUEST_TIMEOUT ! #define ATA_REQUEST_TIMEOUT 10 #endif /* structure used for composite atomic operations */ --- 341,347 ---- #define ATA_MAX_28BIT_LBA 268435455UL #ifndef ATA_REQUEST_TIMEOUT ! #define ATA_REQUEST_TIMEOUT 30 #endif /* structure used for composite atomic operations */ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ etc-fstab @@@ noatime 追加 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # Device Mountpoint FStype Options Dump Pass# /dev/ada0p2 none swap sw 0 0 /dev/ada0p3 / ufs rw,noatime 1 1 /dev/ada0p4 /usr ufs rw,noatime 2 2 /dev/ada0p5 /home ufs rw,noatime 3 3 #/dev/ada1p2 none swap sw 0 0 /dev/ada1p3 /mnt ufs rw,noatime,noauto 1 1 /dev/ada1p4 /mnt/usr ufs rw,noatime,noauto 2 2 /dev/ada1p5 /hbackup ufs rw,noatime,noauto 3 3 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ etc-crontab @@@ ジョブを 00分近傍に集中 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # /etc/crontab - root's crontab for FreeBSD # # $FreeBSD: releng/10.2/etc/crontab 194170 2009-06-14 06:37:19Z brian $ # SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin # #minute hour mday month wday who command # #*/5 * * * * root /usr/libexec/atrun 59 * * * * root /usr/libexec/atrun # # Save some entropy so that /dev/random can re-seed on boot. #*/11 * * * * operator /usr/libexec/save-entropy 1 * * * * operator /usr/libexec/save-entropy # # Rotate log files every hour, if necessary. 0 * * * * root newsyslog # # Perform daily/weekly/monthly maintenance. 1 3 * * * root periodic daily 4 4 * * 6 root periodic weekly 8 5 1 * * root periodic monthly # # Adjust the time zone if the CMOS clock keeps local time, as opposed to # UTC time. See adjkerntz(8) for details. #1,31 0-5 * * * root adjkerntz -a 1 0-5 * * * root adjkerntz -a # # my local jobs # #minute hour mday month wday who command 3 3 * * 3 root /root/Rsync @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ ataco_pow @@@ disk 状態取得 @@@ (camcontrol は setuid したものを用意) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #!/bin/sh # DISK=$1 # # CHECK_POWER_MODE # PM=`./camcontrol cmd $DISK -d -a "e5 00 00 00 00 00 00 00 00 00 00 00" \ -r "s9 i1"` case "$PM" in "0 ") PSTAT="in Standby mode" ;; "128 ") PSTAT="in Idle mode" ;; "255 ") PSTAT="in Active (or Idle) mode" ;; *) PSTAT="in unknown mode" ;; esac echo "$PSTAT" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ ataco_temp @@@ SMART より HDD 温度取得 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #!/bin/sh # DISK=$1 # # SMART # T1=`./camcontrol cmd $DISK -d -a "b0 d0 00 4f c2 00 00 00 00 00 00 00" \ -i 512 "s139 i1"` echo "WD40EFRX: Temp: $T1" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ boot-loader.conf @@@ intel-CPU 温度取得用 kernel module @@@ (取得は sysctl dev.cpu.XX.temperature で) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ coretemp_load="YES" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ etc-rc.conf (抜粋) @@@ これが無いと server 側の mount 操作で nfs が切れる @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ . . mountd_flags="-S" # Flags to mountd (if NFS server enabled). . . @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ usr-local-etc-smb.conf (抜粋) @@@ 750sec毎の disk アクセスを抑制 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ . . printcap cache time = 0 . .