<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NICA &#187; 【技術手札】HowTo</title>
	<atom:link href="http://nicaliu.info/category/%e3%80%90%e6%8a%80%e8%a1%93%e6%89%8b%e6%9c%ad%e3%80%91howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicaliu.info</link>
	<description>【Nicholas, Nica &#38; Nix】接著是與 Nix 一起寫稿譯稿的日子 ~ 仍然繼續玩 Linux、OpenSource and Cloud....</description>
	<lastBuildDate>Mon, 21 May 2012 07:53:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>利用簡單的 bash script 備份 MySQL 資料庫</title>
		<link>http://nicaliu.info/2011/01/31/3626/</link>
		<comments>http://nicaliu.info/2011/01/31/3626/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 06:12:42 +0000</pubDate>
		<dc:creator>Nica</dc:creator>
				<category><![CDATA[【技術手札】HowTo]]></category>
		<category><![CDATA[【技術手札】筆記]]></category>

		<guid isPermaLink="false">http://nicaliu.info/?p=3626</guid>
		<description><![CDATA[
譯者：Nica &#60; nicaliu at gmail dot com &#62;
.
無論你是自管部落格或使用任何 Web-based 的應用程式，只要是運作在 Apache/MySQL/PHP 的堆疊架構下，都應該擁有一套備份系統，確保在 MySQL 資料庫裡存放的資料能安全無虞。很多解決方案可以幫你完成這個任務，但沒有一個 bash script 像我無意中在 blog 文章留言  裡所看到的這麼簡單。以下就是這個 script 的全貌：
.
#!/bin/bash

NOW=`date +&#8221;%Y-%m&#8221;`;
BACKUPDIR=&#8221;location/of/your/backup/dir/$NOW&#8221;;

### Server Setup ###
#* MySQL login user name *#
MUSER=&#8221;user&#8221;;

#* MySQL login PASSWORD name *#
MPASS=&#8221;pass&#8221;;

#* MySQL login HOST name *#
MHOST=&#8221;your-mysql-ip&#8221;;
MPORT=&#8221;your-mysql-port&#8221;;

# DO NOT BACKUP these databases
IGNOREDB=&#8221;
information_schema
mysql
test
&#8220;

#* MySQL binaries *#
MYSQL=`which mysql`;
MYSQLDUMP=`which mysqldump`;
GZIP=`which gzip`;

# assuming that [...]]]></description>
		<wfw:commentRss>http://nicaliu.info/2011/01/31/3626/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting Linux Servers(二)</title>
		<link>http://nicaliu.info/2010/12/11/3548/</link>
		<comments>http://nicaliu.info/2010/12/11/3548/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 05:46:41 +0000</pubDate>
		<dc:creator>Nica</dc:creator>
				<category><![CDATA[【技術手札】HowTo]]></category>

		<guid isPermaLink="false">http://nicaliu.info/?p=3548</guid>
		<description><![CDATA[
譯者：Nica &#60; nicaliu at gmail dot com &#62;
.
續前文 Troubleshooting Linux Servers(一)
.
好，當你已經透過 top 或 ps 拿到 process ID，而 strace 又沒告訴你任何有用的訊息，接下來怎麼辦 ?
.
下一步可以透過 gdb 取得 stack trace。stack trace 不只會告訴你程式底層確切正在作的事 (正在等網路 socket)，有時也會透露較高層級【譯註：使用者能夠理解的訊息】的資訊 (正在作哪一類型的網路讀取)。
.
知曉 gdb 取得 stack traces 的方式，會在你需要歸檔程式掛點或當在那的紀錄時派上用場。
.
gdb 的用法就像 strace 一樣使用 -p 加上 process ID。當它啟動後，你會看到 gdb 的提示字元。輸入 where 即取得 stack trace。
.
這裡是當 Firefix 忙於處理一些 Javascript 時所取得的 stack trace：
.
#0  0&#215;01ad9794 in [...]]]></description>
		<wfw:commentRss>http://nicaliu.info/2010/12/11/3548/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting Linux Servers(一)</title>
		<link>http://nicaliu.info/2010/12/11/3546/</link>
		<comments>http://nicaliu.info/2010/12/11/3546/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 17:50:30 +0000</pubDate>
		<dc:creator>Nica</dc:creator>
				<category><![CDATA[【技術手札】HowTo]]></category>

		<guid isPermaLink="false">http://nicaliu.info/?p=3546</guid>
		<description><![CDATA[
譯者：Nica &#60; nicaliu at gmail dot com &#62;
.
覺得你什麼都設定好了，對吧 ? 可是使用者卻跟你說電腦越來越慢，有時侯你還會發現 log 檔是空的，或者工作竟然沒有在執行 &#8211; 你要怎麼找出問題的原因 ?
.
所有東西應該都弄好了不是嗎 ? 但卻發現 process 應該在跑沒在跑，而搜集資料的部份則持續兩個小時什麼也沒有。有時問題也可能出現在桌面環境的地方 &#8211; 瀏覽器停在那好一陣子沒有回應，也或者突然所有東西都變慢而你也搞不清究竟為什麼。這些事每幾天就發生一次，讓你疲於奔命。
.
要怎麼找出執行中的程序出什麼問題了 ?
.
【top與其它基本系統工具】
此處討論的所有技巧都會用到 process ID (PID)。若你知曉陷入膠著或執行中程序的名字，就可以下 ps aux &#124; grep &#60;processname&#62; 指令找到 PID。否則，也可以透過 top 指令找到 CPU用量最大的程序：
.
Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.2%us,  0.6%sy,  0.6%ni, 96.0%id,  1.6%wa,  0.0%hi,  0.0%si, [...]]]></description>
		<wfw:commentRss>http://nicaliu.info/2010/12/11/3546/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>aSpotCat- 瞭解手機裡 app 的權限</title>
		<link>http://nicaliu.info/2010/10/27/3241/</link>
		<comments>http://nicaliu.info/2010/10/27/3241/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 08:56:47 +0000</pubDate>
		<dc:creator>Nica</dc:creator>
				<category><![CDATA[【技術手札】HowTo]]></category>
		<category><![CDATA[【技術手札】筆記]]></category>

		<guid isPermaLink="false">http://nicaliu.info/?p=3241</guid>
		<description><![CDATA[
文：Nica &#60;nicaliu at gmail dot com&#62;
.
一開始使用智慧型手機最擔心的就是：手機會不會在我不知道的情況下連上網路，然後下個月網路費用爆增? 對已經申請手機上網吃到飽方案的用戶來說，或許不必擔心這件事，但除了費用的問題外，手機其實也不應該在未經使用者的許可下連結網路，逕自傳輸並非使用者指定或知曉的資訊到其它地方。

八月份，Lookout Blog 發表：卡巴斯基發現 Android Market 裡有個叫 Moive Player 的應用程式裡，隱藏 SMS 特洛伊木馬。事實上 Moive Player 的安裝過程中，就已經告知“Services that cost you money (send SMS messages)”，只是大部份的人都急著按下確定，接下來就設定以後系統自動更新 ! 這個惡意應用程式的作法就是在你安裝之後，未經你的同意即私下/自動傳送SMS訊息到一個付費語音號碼上，再依訊息數向你索費。現在來看僅對位於俄國的使用者造成影響，亦僅運作於俄國網路上，但這樣的事件其實是可以給大家警惕：好好檢視你每個月的手機帳單，如果你最近有下載類似應用，看看它的權限要求，確認是否擁有它不應該有的權限。
.
當你安裝的是電池容量監控程式時，是否知曉它會用到網路存取功能 ? 下載了炫麗的動態桌面圖檔，會知道這個應用將直接存取手機上的聯絡人資訊與日曆排程嗎?aSpotCat可以作到這這些事。
.
RunPC 九月號曾提到 Lookout 能在安裝時就挑出居心不良的惡意應用程式，本文要介紹的 aSpotCat 則是進一步瞭解手機裡的應用程式做了哪些事。aSpotCat 將手機應用程式以預設的項目進行分類 -絕大多數是中文且簡單易懂的說明，讓使用者確切瞭解應用程式會用到網路通訊還是會更改手機系統設定等等。
.
直接到 Android Market 上就能找到 aSpotCat 下載之(v1.61支援 Froyo &#8211; 本文以此版為例；最新版為 2.01)。管理上粗分為兩種模式：『以權限分類應用程式(List apps by permission)』與『應用程式清單(List apps)』(v 2.01 版則多了以書籤分類之 (List apps [...]]]></description>
		<wfw:commentRss>http://nicaliu.info/2010/10/27/3241/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

