2012年2月16日 星期四

Hard disk Check

1. Tools : SMART
{{{
#smartctl -c /dev/裝置名稱 //顯示硬碟支援檢查項目


-h顯示參數說明及範例
-V顯示版本等相關資訊
-i顯示該硬碟的相關資訊(包括是否啟動 SMART)
-a顯示硬碟所有相關資訊
-H顯示硬碟 SMART 健康狀況 (健康 PASSED、生病 FAILED)
-c顯示硬碟支援的檢查、測試項目
-A顯示硬碟檢查後的相關屬性值 (例如 194 Temperature_Celsius 最後值為 HDD 溫度)
-l TYPE顯示硬碟檢查後 Log (TYPE: error, selftest, selective, directory)
-t TEST執行硬碟測試 (TEST: offline, short, long, conveyance, select,M-N pending,N afterselect,on afterselect,off)
-X放棄執行硬碟測試

}}}

Booting grub

#########################################
#########################################
Question: 因為我是利用grub當開機管理,因為每次都會看到 kernel /boot/vmliuz-2.6.10-1.771_FC2 ro root=LABEL=/ rhgb quiet
我有看過一些書,可是很少有在說明的,所以我非常很好奇 ro root=LABEL=/ rhgb quiet 它的功能是什麼??跟/proc/cmdline關係
墾請大大告知~謝謝您!!
ro root=LABEL=/ rhgb quiet

Solution:
"kernel /boot/vmliuz-2.6.10-1.771_FC2" 只是在告訴 grub 關於 kernel image 的正確位址, "ro root=LABEL=/ rhgb quiet" 是傳給 kernel 的參數 (command line), 'ro' 表示一開始以唯讀的方式去 mount root file system (稍後會再 remount 成可讀寫), 'root=LABEL=/' 則告訴 kernel 關於 root file system 所在之位置, 'quiet' 表示 kernel 載入的過程不要螢幕上顯示訊息, 'rhgb' 不是給 kernel 用的, 而是藉著 kernel command line (也就是 /proc/cmdline) 讓開機過程 (此時 kernel 已載入完成而進入 user mode) 知道要使用圖形介面. 你可以去找一下 "/etc/rc.d/rc.sysinit" 這個檔案裡面就會用到 'rhgb' 了.

以上是我知道的, 如果有不正確的地方還請多指正.

##################################
##################################
rhgb = redhat graphical boot - This is a GUI mode booting screen with most of the information hidden while the user sees a rotating activity icon spining and brief information as to what the computer is doing.





2012年2月15日 星期三

Bash Script

1. Calculating

The Double Parentheses Construct
Similar to the let command, the ((...)) construct permits arithmetic expansion and evaluation.
In its simplest form, a=$(( 5 + 3 )) would set "a" to "5 + 3", or 8.
However, this double parentheses construct is also a mechanism for allowing C-type manipulation of variables in Bash.

2. Array

bash下array的幾種使用方法





Memory control Tech




Reference:

SYS system



Reference:
Introduction SYS system

Backup and cloning


Reference

Virtualbox 4 的新功能


VirtualBox 如何備份的虛擬機器 (VM) ?





2012年1月5日星期四

VirtualBox 的「再製 (Clone)」和「快照 (SnapShot)」




2012年2月14日 星期二

Linx Hot keyboard

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names




Reference: http://www.howtogeek.com/howto/ubuntu/keyboard-shortcuts-for-bash-command-shell-for-ubuntu-debian-suse-redhat-linux-etc/

2012年2月13日 星期一

ON Linux

http://miracle88.homeip.net/?p=1248

2012年2月9日 星期四

Kernel

1. For centOS
{{{
Ariticle:
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/

Downlaod:
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/


}}}

2. Reference
{{{
http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/arch/x86/kernel/smp_32.c?v=2.6.25#L135

http://hira-consulting.com/wiki/index.php?__send_IPI_shortcut%28%29%2Flinux2.6


}}}

RPM

1. Extract RPM content
{{{
rpm2cpio kernel-2.6.18-8.1.8.el5.src.rpm | cpio -idmv

Reference:
http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html
}}}

2012年2月5日 星期日

Common Command

http://fecbob.pixnet.net/blog/post/34682395-linux-%E5%B8%B8%E7%94%A8%E7%9A%84%E6%8C%87%E4%BB%A4