參考
expect要紀錄執行結果或輸出
可以用log_file這個指令
#!/usr/bin/expect -f
log_file -noappend /tmp/myfile.log
#log_file預設append or create if not exist
#若你要每次重新紀錄,要加上-noappend指令
另外
send_log也可以將送訊息到log_file指定的檔案
send_log "end of it"
log_file [args] [[-a] file]If a filename is provided, log_file will record a transcript of the session (beginning at that point) in the file. log_file will stop recording if no argument is given. Any previous log file is closed.
slinbody 發表在 痞客邦 留言(0) 人氣(291)
ZFS的特性
基本上不允許直接接上硬碟
來擴充原本pool的容量 (
參考wiki )
slinbody 發表在 痞客邦 留言(0) 人氣(2,387)
slinbody 發表在 痞客邦 留言(0) 人氣(260)
參考
#gpart show -l da0 顯示目前分割狀態
#gpart add -t freebsd-ufs -s 256M da0
da0p4 added
切出大小為256M的區塊
#gpart add -t freebsd-ufs da0
da0p4 added
切出一個區塊,大小為剩餘的硬碟空間
#gpart show -l da0
顯示當前硬碟分割區狀態
#newfs -U /dev/da0p4
格式化區塊
#mkdir /data
#mount /dev/da0p4 /data
[
補充]
bsdlabel(8) 是用 32-bit 整數來儲存 sector(磁區) 數, 因此限制一個磁碟最大只能有 2^32-1 個 sector,亦即 2TB 的空間。 而 fdisk(8) 的格式容許起始 sector 編號不超過 2^32-1, 長度也不超過 2^32-1,因此 partition 最大空間是 2TB,而磁碟最大是 4TB。 sunlabel(8) 則限制 partition 最大是 2TB,磁碟最多可有 8 個 partition,因此最大是 16TB。 如果要使用更大的磁碟,請使用 gpt(8)。
slinbody 發表在 痞客邦 留言(0) 人氣(1,036)
cvs、cvsup雖沒被停用
可是裝軟體都會出現很煩人的訊息
subversion看不懂怎麼用比較好
另一個選擇portsnap
參考1 參考2#vi /etc/portsnap.conf
=========================
slinbody 發表在 痞客邦 留言(0) 人氣(25)
FreeBSD中
要記錄只出現在螢幕(console)下的訊息
#vi /etc/syslog.conf
========================
# uncomment this to log all writes to /dev/console to /var/log/console.log
# touch /var/log/console.log and chmod it to mode 600 before it will work
slinbody 發表在 痞客邦 留言(0) 人氣(52)
參考1
參考2
The most important advantage to Subversion (and the reason why FreeBSD switched) is that it handles branches and merging much better than CVS does.
FreeBSD上,原本剛裝好系統後更新port
可以用CVS來更新
不過根據The Ports Management Team(參考1)宣布
改成用SVN(SubVersioN)來取代
CVS仍然是可以用
slinbody 發表在 痞客邦 留言(0) 人氣(82)
#yum install net-snmp
#vi /etc/snmp/snmpd.conf
==================
#com2sec notConfigUser default public
com2sec mrtg 10.1.4.0/24 tmusnmp
com2sec local localhost public
slinbody 發表在 痞客邦 留言(0) 人氣(1,502)
剛架好Web Server
想知道能否正常連線或是否被Firewall擋住
除了開瀏覽器外
還可以用TELNET來檢測
TELNET www.test.com.tw 80
GET /index.html HTTP/1.0
( enter按兩次 )
如果沒被擋或架設成功會出現類似如下:
slinbody 發表在 痞客邦 留言(0) 人氣(321)
slinbody 發表在 痞客邦 留言(0) 人氣(84)