總網頁瀏覽量

2013年3月25日 星期一

Distributed command line - pdsh & ssssh 簡單教學

今天要重灌hadoop碰到舊資料沒刪乾淨導致裝不起來的問題

寫了一個for i in {1..4}; do ssh "root@host-0$i" ...來刪東西

被ricky哥發現我的蠢樣後建議我用pdsh

經高人指點迅速裝完

1. download
http://sourceforge.net/projects/pdsh/

2.tar jxvf pdsh.xxx.tar.bz2

[under pdsh folder]

3. ./configure --with-ssh (我跟default的rsh不認識XD)

4. make

5. make install

done

測試一下

pdsh -R ssh -w host-[01-04] hostname

不錯

再試

pdsh -R ssh -w host-[01-04] ls -al /usr/lib | grep hadoop

咦?馬上吃屎...沒有pipe還叫做shell script嗎!?

馬上谷歌結果發現另一套

ssssh,擺明就是要解決pipe問題XD

https://code.google.com/p/ssssh/wiki/Details

這套安裝更簡單了

make install大功告成

ssssh -N -w host-01,host-02,host-03,host-04 ls -al /usr/lib |grep hadoop

帥啊老皮

不過這套似乎不支援串hostname號碼

只好動點髒手腳
alias dsh="ssssh -N -w host-01,host-02,host-03,host-04"

這樣的好處是可以搭配-x(exclude) and -w(include)使用

dsh -x host-01 hostname



[2013-03-26 updated]

pdsh用"把command刮起來就行了,但總覺得多一動就是麻煩XD

2013年3月21日 星期四

最近試玩了國產雲端硬碟

https://www.syndriver.com/

試用了幾下並上傳幾個檔案

分享一下心得

第一

也是最重要的一點

那S級的防機器人碼!

還是趕快換掉吧

第二

批次下載的UI設計得很玄

點完之後還要在右邊點一次下載

除此之外

上傳下載速度還不錯

不過就是不太想下載他的app來用耶

2013年3月16日 星期六

mkv播放沒有字幕的問題

明明就註明內嵌多國語言字幕

但是用MPC偏偏字幕選項都是灰色的

[解]
http://www.myav.com.tw/bbs/showthread.php?threadid=362996&pagenumber=0

原來影片也有大哉問阿

總之,output改一下就可以看了

2013年2月17日 星期日

[微食記] 中山站長鼻子大象

今天和CD吃飯,長鼻子大象



沙拉和湯都蠻奇怪的,沒有特別想法。


咖哩雞還不錯


軟殼蟹不太優耶,吃了王品的軟殼蟹以為都那麼好吃 囧


椒麻雞很棒,不愧是招牌

總結:嘗鮮可,價位稍高,不會趕人的聊天好去處(中午12點坐到下午4點)。

2013年2月5日 星期二

台北天母--溫德德式烘培餐館 [差est]

本來要帶女朋友去這裡過生日的,
聽說德國豬腳相當不錯,股哥也是這麼跟我說的。
兩三個禮拜前去電定位,
當天中午又再打過去確定一次,
結果到現場興高采烈要點餐
服務生:不好意思,德國豬腳要先預訂喔
我OS:叉叉的咧,定位的時候沒說阿,我先知什麼都知道逆?
我真的不懂要預訂才吃得到的東西,當初定位時為什麼沒告知,這邏輯在哪阿???

當天領班也只會道歉說要介紹別的餐點,
真的只能用掉漆來形容~.~

清心,透涼白開水

今天晚上10點左右去大橋頭的清心買溫的烏龍綠無糖,
結果先做錯送上有糖的給我,
請他重做更離譜了,
換一杯白開水摻少許烏龍綠給我...
真的很火
怒耶

2013年1月20日 星期日

VM copied lead to network unreachable (centos)

When you copied a CentOS VM and boot it up,
after command in ifconfig
You'll found the your ethernet is not working.
and if you try to bring it up,

service network restart

response will be like below...

device eth0 does not seem to be present delaying initialization

The solution:
1. ifconfig -a
2. record your new MAC ADDRESS
(since you copied the vm, macaddr would not be the same with origin one.)
3. vim /etc/udev/rules.d/70-persistent-net.rules
4. modify the ATTR{address} to the recorded one in eth* which you're using
5. vim /etc/sysconfig/network-scripts/ifcfg-eth*
6. modify the HWADDR to the recorded one
7. service network restart