2011年12月10日 星期六

七代 Accord 點菸器迴路

注意! 本篇為個人紀錄,不代表每台車的狀況都一樣適用,如果弄壞了請乖乖地付錢給修車廠修理吧 XD 我不是會理你的。
會放上這個是在麗車舫買了一台行車紀錄器,當時一併購買安裝服務,不過很不幸的,
安裝的師傅按照保險絲蓋子上的圖示去接,行車紀錄器卻永久有電不會因為熄火而關機。
最後是那個師傅往旁邊的保險絲就給他接上去了.........當然就是很圈圈叉叉啦
當下因為累了反正車子啟動行車紀錄器會自動開,熄火會自動關就算了。

過了一兩個月後心裡總覺得有一點怪怪的,趁著車子門鎖的啟動器壞掉回原廠修理的時候請原廠幫我看。

北投honda原廠因為這玩意是外廠部件所以只願意幫我拆開保險絲附近的蓋板,好吧,最少可以看得很清楚。
我就在那邊東摸西摸也摸不出什麼鬼,最後火大回家上網找維修手冊,才發現這兩個迴路是不一樣的。

從保險絲面板(上面那張照片)上可以看到9號保險絲是點菸器,不過查過文件後才發現這是熄火之後永久供電的迴路而如果要跟著點火開關作動的話則應該是32號保險絲




後記:
        其實原廠都有維修手冊,不過修車工(很抱歉客人有需求卻不給幫忙我認定你的level就是這樣) 只回了我他也不知道這個迴路是啥,查一下手冊有這麼困難嗎,虧你們還是原廠哩。

reference:
2003-accord-維修手冊-電系(簡體)

2011年12月1日 星期四

Motorola Xoom 平板刷機流程

流程:
解鎖  > 刷入第三方recovery rom > 備份系統 > Root > 重新刷過recovery >透過recovery rom 備份系統 > 刷入第三方系統韌體

刷機有風險,有成功有失敗,以下僅供參考,刷壞了請自行承擔。
使用adb命令須將USB偵錯模式打開

解鎖(unlock or lock) 注意!unlock會將系統重置務必備份
1. 下載並安裝(download and install)  motorola usb driver 
2. 下載並安裝 Android SDK R15缺fastboot預計於R16補回 可先用R13內的fastboot
3. 將xoom關機(Power off xoom)
4. 持續按住音量降低鈕並開機直到看到左上方出現starting fastboot protocol 後將xoom與電腦連接
5. 再命令提示字元視窗中切換到sdk下的tools目錄
輸入
fastboot oem unlock
6.讀取並確認畫面上的警告訊息後按下音量增加鈕"解鎖完成"
7.如果要上鎖重複3-4 並於命令提示字元視窗中改輸入
fastboot oem lock


刷入第三方recovery rom(使用ClockworkMod)
方法一:透過fastboot刷入
1.下載 recovery rom 
2.再命令提示字元輸入以下命令
adb reboot bootloader
fastboot flash recovery recovery-solarnz-XXXXXX-XXXX.img
fastboot reboot
注意! 下完reboot後需要在Motorola的logo出現3秒後按下降低音量鈕
此時左上角會出現Android Recovery的文字,按下升高音量鈕就可以進入recovery
如果按出 starting fastboot protocol代表按太快
如果按太慢或太快則 recovery會被原廠recovery覆蓋回去請重新刷一次recovery。
進入recovery mode
刷入universal root (root過後再刷recovery就不會被覆蓋回去)
adb reboot recovery 
確認recovery rom是否正常

方法二:透過已經安裝過的CWM進行刷入
1.下載recovery rom (zip)並放入SD card
2.進入recovery mode
3.使用flash zip刷入rom

備份系統韌體
進入recovery mode
執行nandroid backup

刷入第三方韌體(Tiamat)
1.可能的話請備份應用程式
2.下載Tiamat Rom 2.2.2
3.進入recovery mode
4.執行備份(Nandroid Backup)
5.執行資料清除及系統重置(Wipe All & Factory Reset)
6.安裝rom(Flash Zip)
7.安裝輸入法(Flash Zip)

KEY function:
Fast shutdown : VOL-UP + POWER
Fastboot mode: VOL-DOWN+POWER
Reset : VOL-UP +VOL-DOWN + POWER
recovery mode : when motorola log appear 3 seconds press VOL-DOWN

reference link:
tiamat xoom rom 2.2.2
clockworkmod 3.2.0.0rc4
CWM Rogue Recovery
unlocking & locking
universal root 

2011年10月20日 星期四

SQL Server 交易日誌清除

情境1.因為壓力測試的關係,交易紀錄長到接近2TB ,系統效能受到影響,資料備份也受到嚴重影響。

情境2.使用資料庫複寫進行資料備份,導致產生大量交易日誌。

SQL Server 2008 :
方法一
1.將資料庫還原模式切換至簡單模式  (簡單模式不會記錄交易紀錄,所以交易紀錄會被截斷)
2.執行資料庫壓縮
3.將資料庫還原模式切換至完整模式(恢復正常交易紀錄)

方法二
1.將資料庫還原模式切換至簡單模式
2.在要清除交易日誌的資料庫上新增查詢

select * from sys.database_files
查出NAME後
3.改下DBCC命令

DBCC SHRINKFILE ( 帶入剛剛查到的NAME , 2)


以往我們都只有做完整備份,而完整備份會將資料庫以及交易日誌進行完整備份,
但是不會進行交易日誌截斷,所以會有越備份越大的問題。

而做了完整備份卻沒有做交易紀錄備份跟資料庫壓縮,自然交易紀錄不會被截斷,當然會越長越大。

所以標準做法應該是在維護計畫中,做完完整備份後,再做一次交易紀錄備份,
把交易紀錄截斷,然後再接著執行資料庫壓縮,就不會發生爆資料庫的問題了。



未完待續..

資料庫複寫設定筆記

這是土法煉鋼出來的筆記,或許有誤。

1.資料庫基礎結構 必須有完善的主鑰 P-Key (快照式除外)
2.複寫端資料庫還原模式最好選簡單模式或是限制交易日誌大小,不然很快就爆了。
3.代理程式帳密必須一致。
4.快照式複寫的複寫端無法寫入但是可以讀取,交易式可以在複寫端讀寫。



SQL 2008 資料庫鏡像(無仲裁)


1. 來源資料庫 完整備份及交易日誌備份 並複製到 鏡射端

2. 鏡射資料庫 還原完整備份 還原狀態選 RESTORE WITH NORECOVERY  記得覆蓋資料

3. 鏡射資料庫 還原交易日誌備份 還原狀態選 RESTORE WITH NORECOVERY

4. 啟動鏡射設定精靈




可能需求:
A.資料庫的DNS對應,可由修改Hosts檔達成
B.出現1418錯誤,確認不是防火牆問題可以將 DB server, Agent權限提升後解決

2011年10月19日 星期三

Mac OSX Kernel info

http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelProgramming/BSD/BSD.html


The BSD portion of the Mac OS X kernel is derived primarily from FreeBSD, a version of 4.4BSD that offers advanced networking, performance, security, and compatibility features. BSD variants in general are derived (sometimes indirectly) from 4.4BSD-Lite Release 2 from the Computer Systems Research Group (CSRG) at the University of California at Berkeley. BSD provides many advanced features, including the following: Preemptive multitasking with dynamic priority adjustment. Smooth and fair sharing of the computer between applications and users is ensured, even under the heaviest of loads. Multiuser access. Many people can use a Mac OS X system simultaneously for a variety of things. This means, for example, that system peripherals such as printers and disk drives are properly shared between all users on the system or the network and that individual resource limits can be placed on users or groups of users, protecting critical system resources from overuse. Strong TCP/IP networking with support for industry standards such as SLIP, PPP, and NFS. Mac OS X can interoperate easily with other systems as well as act as an enterprise server, providing vital functions such as NFS (remote file access) and email services, or Internet services such as HTTP, FTP, routing, and firewall (security) services. Memory protection. Applications cannot interfere with each other. One application crashing does not affect others in any way. Virtual memory and dynamic memory allocation. Applications with large appetites for memory are satisfied while still maintaining interactive response to users. With the virtual memory system in Mac OS X, each application has access to its own 4 GB memory address space; this should satisfy even the most memory-hungry applications. Support for kernel threads based on Mach threads. User-level threading packages are implemented on top of kernel threads. Each kernel thread is an independently scheduled entity. When a thread from a user process blocks in a system call, other threads from the same process can continue to execute on that or other processors. By default, a process in the conventional sense has one thread, the main thread. A user process can use the POSIX thread API to create other user threads. SMP support. Support is included for computers with multiple CPUs. Source code. Developers gain the greatest degree of control over the BSD programming environment because source is included. Many of the POSIX APIs.

2011年7月22日 星期五

FreeBSD VLAN Setup

/etc/rc.conf


cloned_interfaces="vlan01 vlan02 vlan03 vlan04 vlan05 vlan06"
ifconfig_em0="up"
ifconfig_vlan01="inet 10.10.10.1 netmask 255.255.255.0 vlan 11 vlandev em0"
ifconfig_vlan02="inet 10.10.20.1 netmask 255.255.255.0 vlan 22 vlandev em0"
ifconfig_vlan03="inet 10.10.30.1 netmask 255.255.255.0 vlan 33 vlandev em0"
ifconfig_vlan04="inet 10.10.40.1 netmask 255.255.255.0 vlan 44 vlandev em0"
ifconfig_vlan05="inet 10.10.50.1 netmask 255.255.255.0 vlan 55 vlandev em0"
ifconfig_vlan06="inet 10.10.60.1 netmask 255.255.255.0 vlan 66 vlandev em0"

2011年4月11日 星期一

Install oracle vm 's guest addtions on centos using yum

1. yum install gcc -y
2. yum install kernel-devel -y
3. export KERN_DIR=/usr/src/kernels/xxxxxxx
4. execute guest addtions on temp dir