<?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>Life is different</title>
	<atom:link href="http://dev.bjtu.edu.cn/ideal/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.bjtu.edu.cn/ideal</link>
	<description></description>
	<lastBuildDate>Fri, 19 Apr 2013 17:22:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>再见爷爷</title>
		<link>http://dev.bjtu.edu.cn/ideal/2013/04/20/goodbye-grandpa/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2013/04/20/goodbye-grandpa/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 17:22:16 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=349</guid>
		<description><![CDATA[离爷爷去世已经18天。在他最后的这几年里，他在几个女儿家里都待了许多时间，我本来回家就少，这样与他说过话的次数都屈指可数，甚至都不知道他是否过得快乐。我工作后对他也没有足够的关心，总是觉得以后还有时间，以后还有机会。

我上大学之后，随着他年纪的增大，身体慢慢不如以前，不再去下面打扑克了。不过按照他当时的年纪来说，已算身体很不错的。大一到大三的那几年，他还经常去村子下面玩，就和在初中到高中时我在家的时间里一样，总记得他和我说，我去下面玩啦，然后听到他出去的时候他把院子门关好的声音。有时候风把门推开，我还以为是他回来了。我第一次觉得爷爷的衰老，是在他从於家回来，有次拄着拐杖去村子下面，我坐中午的汽车去千岛湖镇，半路遇到他，他走在路的边上，汽车鸣笛，我看到他缓缓的转过头看着汽车驶过，心里泛过一阵酸楚。自那以后，好像他去下面玩的次数就很少了。后来有次他坐姐姐的车去下面买东西，让我去帮忙送给别人，以示感谢，我们都觉得没有必要，甚至自己觉得有些不乐意，现在想来多少有些愧疚。其实那时候他已经行动明显不如以前那么方便了。

打扑克是他七十多岁之后才发展的一项爱好。另一项则是看新闻联播。他有一串钥匙，有时候赢钱了，袋子里好多硬币，他回到家，整理钱的时候还能听到钥匙和硬币碰撞的声音。唯一一次有印象的和他一起去下面玩他去打扑克应该是在某年快夏天的时候，他在小学外边马路边上一个人家的院子里，星期天的下午，后来马路扩建，那个院子早已不复存在了。好几年暑假的时候晚上他都准时观看新闻联播，清楚得记得他摇着扇子坐在桌子前面的样子。也许第二天他就去下面和其他人探讨国家大事。有时候晚上他怕电视机吵就用那个西湖电视带的一个线很长的耳机，躺在躺椅上看。我后来对电子设备的什么感兴趣，那个耳机不知道哪一年被我剪了接来接去玩，不知道是不是在他不怎么看电视之后。他应该是在八十多岁之后这两个爱好才慢慢停止，到后来就很少看电视了。更多是在夏天晚上去院子乘凉。也把他的那个椅子搬出去，有时候还在椅子上睡着了。

小学四五年级的时候很多人家都养鸭子，鸭子长大之后，早晨会自己成群结队的出发经过一段路到外面的小溪里去，一般快天黑的时候也会自己回家。有一次星期六快天黑我和他一起去小河里赶鸭子回家，在村头有樟树的地方找到了它们。那时候他的身体还很好。中午的时候他用饭盒在炉子上蒸米饭，还分给我，多的留着晚上吃。还有一次星期六，和他坐中午的车去里阳，妈妈觉得我头发长了让我去理发，他送我上车返回，自己再坐车去於家，好像也是拿着那个篮子的。我回到家，太阳已快下山，爸妈正在院子里打豆子，想起来那时候的阳光都那么美好。那时候暑假两个表妹经常来玩，他还会提个篮子坐车去里阳买菜。那个椅子则经常被我们占了。他经常跟我们说两个表哥成绩很好，成绩单上有的课一百零几分，我到初中之后才想起来，也许那时候他是不是以为都是满分一百分，才觉得超过一百分了是非常非常罕见的。

他总是担心我去小河里游泳，大学之后经常跟我说火车上要是别人给你递烟你千万不要抽，虽然我并不抽烟。有一次别人问我qq号是什么，我报了一串数字，他在边上，后来他说你怎么随便把手机号告诉别人，现在很多人骗人的。我却不以为然。

他很是节俭，很多时候坏了的东西都不舍得仍，比如水果或者什么有虫子，我劝他扔掉，他说的最多的一句是虫能吃人就能吃，一开始我还找不到反驳的理由。有次他在房间把牛奶倒在了桌子上，他就去楼上把猫抱下来让猫喝桌子上的牛奶，我们问他抓猫干吗，他说牛奶倒桌子上了，估计是有次他看到那只猫把头钻进一个一次性杯子喝剩下的一些牛奶。他好像很喜欢猫，有一次妈妈说他买了好多鸡蛋每天给猫吃，那样猫能长大的更快。

初中的时候姐姐生病在杭州住院，爸妈都在医院。我周末放学回家，他一个人在家里。后来他们回来，爸爸去学校看我，带了一些东西，其中有一包杭州带来的榨菜。

他脾气不好，有次初中茶籽假的时候他和爸妈吵架，第二天我看到在他椅子上睡着却又觉得很安详，这种巨大的反差让我当时难以理解。后来有次冬天，他和姑父去学校，带了双鞋子给我。妈妈以为那双鞋子很暖和，可是我却在接下来的一个星期里双脚冻的麻木。当然他并不知情，并且也是善意的。

四月四号，在他逝世三天后，我和姐姐还有姑父开车去新安江买菜，准备第二天村子里人吃饭，在路上我总是存在回家还能和他分享的错觉，却又一次次的想到家里已经只有他的遗像和骨灰盒。无论这个世界如何，他都再也看不见。

只能愿您安息。原来时间才是最凶残的杀手。]]></description>
			<content:encoded><![CDATA[<p>离爷爷去世已经18天。在他最后的这几年里，他在几个女儿家里都待了许多时间，我本来回家就少，这样与他说过话的次数都屈指可数，甚至都不知道他是否过得快乐。我工作后对他也没有足够的关心，总是觉得以后还有时间，以后还有机会。</p>
<p>我上大学之后，随着他年纪的增大，身体慢慢不如以前，不再去下面打扑克了。不过按照他当时的年纪来说，已算身体很不错的。大一到大三的那几年，他还经常去村子下面玩，就和在初中到高中时我在家的时间里一样，总记得他和我说，我去下面玩啦，然后听到他出去的时候他把院子门关好的声音。有时候风把门推开，我还以为是他回来了。我第一次觉得爷爷的衰老，是在他从於家回来，有次拄着拐杖去村子下面，我坐中午的汽车去千岛湖镇，半路遇到他，他走在路的边上，汽车鸣笛，我看到他缓缓的转过头看着汽车驶过，心里泛过一阵酸楚。自那以后，好像他去下面玩的次数就很少了。后来有次他坐姐姐的车去下面买东西，让我去帮忙送给别人，以示感谢，我们都觉得没有必要，甚至自己觉得有些不乐意，现在想来多少有些愧疚。其实那时候他已经行动明显不如以前那么方便了。</p>
<p>打扑克是他七十多岁之后才发展的一项爱好。另一项则是看新闻联播。他有一串钥匙，有时候赢钱了，袋子里好多硬币，他回到家，整理钱的时候还能听到钥匙和硬币碰撞的声音。唯一一次有印象的和他一起去下面玩他去打扑克应该是在某年快夏天的时候，他在小学外边马路边上一个人家的院子里，星期天的下午，后来马路扩建，那个院子早已不复存在了。好几年暑假的时候晚上他都准时观看新闻联播，清楚得记得他摇着扇子坐在桌子前面的样子。也许第二天他就去下面和其他人探讨国家大事。有时候晚上他怕电视机吵就用那个西湖电视带的一个线很长的耳机，躺在躺椅上看。我后来对电子设备的什么感兴趣，那个耳机不知道哪一年被我剪了接来接去玩，不知道是不是在他不怎么看电视之后。他应该是在八十多岁之后这两个爱好才慢慢停止，到后来就很少看电视了。更多是在夏天晚上去院子乘凉。也把他的那个椅子搬出去，有时候还在椅子上睡着了。</p>
<p>小学四五年级的时候很多人家都养鸭子，鸭子长大之后，早晨会自己成群结队的出发经过一段路到外面的小溪里去，一般快天黑的时候也会自己回家。有一次星期六快天黑我和他一起去小河里赶鸭子回家，在村头有樟树的地方找到了它们。那时候他的身体还很好。中午的时候他用饭盒在炉子上蒸米饭，还分给我，多的留着晚上吃。还有一次星期六，和他坐中午的车去里阳，妈妈觉得我头发长了让我去理发，他送我上车返回，自己再坐车去於家，好像也是拿着那个篮子的。我回到家，太阳已快下山，爸妈正在院子里打豆子，想起来那时候的阳光都那么美好。那时候暑假两个表妹经常来玩，他还会提个篮子坐车去里阳买菜。那个椅子则经常被我们占了。他经常跟我们说两个表哥成绩很好，成绩单上有的课一百零几分，我到初中之后才想起来，也许那时候他是不是以为都是满分一百分，才觉得超过一百分了是非常非常罕见的。</p>
<p>他总是担心我去小河里游泳，大学之后经常跟我说火车上要是别人给你递烟你千万不要抽，虽然我并不抽烟。有一次别人问我qq号是什么，我报了一串数字，他在边上，后来他说你怎么随便把手机号告诉别人，现在很多人骗人的。我却不以为然。</p>
<p>他很是节俭，很多时候坏了的东西都不舍得仍，比如水果或者什么有虫子，我劝他扔掉，他说的最多的一句是虫能吃人就能吃，一开始我还找不到反驳的理由。有次他在房间把牛奶倒在了桌子上，他就去楼上把猫抱下来让猫喝桌子上的牛奶，我们问他抓猫干吗，他说牛奶倒桌子上了，估计是有次他看到那只猫把头钻进一个一次性杯子喝剩下的一些牛奶。他好像很喜欢猫，有一次妈妈说他买了好多鸡蛋每天给猫吃，那样猫能长大的更快。</p>
<p>初中的时候姐姐生病在杭州住院，爸妈都在医院。我周末放学回家，他一个人在家里。后来他们回来，爸爸去学校看我，带了一些东西，其中有一包杭州带来的榨菜。</p>
<p>他脾气不好，有次初中茶籽假的时候他和爸妈吵架，第二天我看到在他椅子上睡着却又觉得很安详，这种巨大的反差让我当时难以理解。后来有次冬天，他和姑父去学校，带了双鞋子给我。妈妈以为那双鞋子很暖和，可是我却在接下来的一个星期里双脚冻的麻木。当然他并不知情，并且也是善意的。</p>
<p>四月四号，在他逝世三天后，我和姐姐还有姑父开车去新安江买菜，准备第二天村子里人吃饭，在路上我总是存在回家还能和他分享的错觉，却又一次次的想到家里已经只有他的遗像和骨灰盒。无论这个世界如何，他都再也看不见。</p>
<p>只能愿您安息。原来时间才是最凶残的杀手。</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2013/04/20/goodbye-grandpa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>使用tp-link tl-wr703n和openwrt作为bt下载机</title>
		<link>http://dev.bjtu.edu.cn/ideal/2013/04/14/use-openwrt-as-bt-downloader/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2013/04/14/use-openwrt-as-bt-downloader/#comments</comments>
		<pubDate>Sun, 14 Apr 2013 14:15:41 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=352</guid>
		<description><![CDATA[TP-Link TL-WR703N非常廉价并且小巧，具备4M Flash和32M内存，处理器是Atheros AR9330（mips指令集），有一个USB口可以挂载U盘，可以刷OpenWrt，并且还有各种<a href="http://wiki.openwrt.org/toh/tp-link/tl-wr703n#hardware.mods">DIY</a>。。本来想用作BT下载机，可是发现下载速度还是很慢，才几百KB每秒。

1，刷机。
初始刷机根据http://wiki.openwrt.org/toh/tp-link/tl-wr703n#installation页面的提示下载squashfs-factory.bin，通过TP-Link自带的web管理界面，写入OpenWrt。以后升级则是下载squashfs-sysupgrade.bin。升级可以通过luci的web界面，或者直接ssh到路由器上，然后：
<pre lang="bash">
$ cd /tmp &#038;& wget http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/generic/openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin
$ mtd write openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin firmware
</pre>
之后reboot即可。

刷完之后默认wifi并没有开启，只能拿根网线和路由器连上，给主机设置一个192.168.1.2-192.168.1.253的任意一个地址，比如：
<pre lang="bash">
$ ifconfig eth0 192.168.1.2
$ route add default gw 192.168.1.1
</pre>
然后telnet 192.168.1.1，便可以连接到路由器，先passwd，修改root密码，完成之后CTRL-D退出，然后telnet就自动禁用，只能通过ssh登录了。

2. 修改配置/etc/config/wireless，/etc/config/network，/etc/config/firewall， /etc/opkg.conf。
首先注释掉/etc/config/wireless里面的option disabled 1，开启wifi。以及后面的SSID和加密方式。例如：
<pre lang="bash">
config wifi-iface
    option device   radio0
    option network  lan 
    option mode     ap  
    option ssid     python
    option encryption psk2
    option key      'password'
</pre>
这里指定ssid为python，密码是password。

重启之后就可以断开网线，通过wifi连接路由器了。

TL-WR703N上面wan和lan复用一个网口，OpenWrt默认把lan口指定为eth0，网上有通过修改源代码实现把wan指定为eth0，lan指定为eth1。由于这里lan口不一定需要使用，只要注释掉/etc/config/network里面config interface 'lan'部分的option ifname 'eth0'，然后新增一个wan的配置，例如：
<pre lang="bash">
config interface 'loopback'
    option ifname 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'

config interface 'lan'
    #option ifname 'eth0'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'

config interface 'wan'
    option auto   1
    option ifname 'eth0'
    option proto  'dhcp'
    option macaddr  'f0:f0:f0:f0:f0:f0:f0'
</pre>
wan口需要通过macaddr来覆盖路由器本身的mac地址是因为学校的网口和mac绑定，而注册时候使用的是其他的mac，并不是这个路由器的。

/etc/config/firewall主要是将
<pre lang="bash">
config zone
    option name     wan
    option network      'wan'
    option input        REJECT
</pre>
中的option input        REJECT改为option input  ACCEPT，方便通过学校网口dhcp得到的ip来ssh到路由器。

由于学校的网络没有通过网关登录时无法连接外网，那么无法通过opkg来安装或更新软件包，只能先采用代理的方式，在/etc/opkg.conf中增加
<pre lang="bash">
option http_proxy http://host:port/
</pre>
http代理。

3. 安装必要的软件包，主要是挂在u盘需要，由于flash太小，很可能安装这几个后就没空间了。。
<pre lang="bash">
$ opkg update
$ opkg install kmod-usb-storage kmod-usb-core block-mount kmod-fs-ext4 kmod-ipv6
</pre>
前四个是挂在u盘需要，kmod-ipv6用于wan口可以得到IPv6地址（无线仍然不行，不过有其他修改过的OpenWrt可以支持IPv6）。

4. 准备u盘。
随便找个u盘，在PC上使用fdisk进行分区，可以分两个，其中一个作为swap，也可以部分，使用文件作为swap，后面会讲到。然后通过mkfs.ext4进行格式化。

5. 挂载u盘。
不需要将路由器断电，可以直接插上u盘。然后
<pre lang="bash">
$ mount /dev/sda1 /mnt
</pre>
就可以挂在u盘了。

6. 使用ExtRoot来增加root分区的大小。
前面说过这个路由器本身的Flash只有4M，实在太小，幸好可以通过<a href="http://wiki.openwrt.org/doc/howto/extroot">ExtRoot</a>来将rootfs放到u盘上去。
这里主要是根据<a href="http://en.code-bude.net/2013/02/16/how-to-increase-storage-on-tp-link-wr703n-with-extroot/">这个页面</a>使用的方法，主要是下面几个命令：
<pre lang="bash">
# 假设u盘已经挂载到/mnt
$ mkdir -p /tmp/cproot
$ mount --bind / /tmp/cproot
$ tar -C /tmp/cproot -cvf - . &#124; tar -C /mnt -xf -
$ umount /tmp/cproot &#038;& rm -rf /tmp/cproot
$ umount /mnt
</pre>
然后修改/etc/config/fstab，主要是config mount部分：
<pre lang="bash">
config mount
        option target   / # 原先为/home
        option device   /dev/sda1
        option fstype   ext4
        option options  rw,sync
        option enabled  1 # 原先为0
        option enabled_fsck 0
</pre>
然后reboot。
之后可以看到rootf大了很多。。
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen23.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen23-300x73.png" alt="" title="mount" width="300" height="73" class="alignnone size-medium wp-image-359" /></a>

7. 安装软件包。
opkg是OpenWrt的软件包管理工具，和apt-get，pacman类似。
<pre lang="bash">
$ opkg install python ctorrent vim-full vim-runtime curl mtr htop bash bash-completion ldd
</pre>
是的。。这上面还有htop！！甚至还有nginx。。而且还能跑一些python程序。
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen21.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen21.png" alt="" title="htop" width="441" height="238" class="alignnone size-medium wp-image-361" /></a>
其他信息：
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen20.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen20-300x33.png" alt="" title="uname" width="300" height="33" class="alignnone size-medium wp-image-368" /></a>
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen22.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen22.png" alt="" title="cpuinfo" width="462" height="204" class="alignnone size-full wp-image-369" /></a>

8. 增加swap
<pre lang="bash">
$ dd if=/dev/zero of=swapfile bs=1M count=64
$ mkfs.swap swapfile
$ swapon swapfile
</pre>
这样可以建立一个64M大小的swap。缺点是需要手动swapon来启用。

9. ctorrent下载
由于晨光对许多客户端禁用，需要修改一下User Agent，比如：
<pre lang="bash">
$ ctorrent -A "KTorrent/3.4.1" -s download/file -p 6881 example.torrent
</pre>
不过速度很慢而且路由器会很烫。。]]></description>
			<content:encoded><![CDATA[<p>TP-Link TL-WR703N非常廉价并且小巧，具备4M Flash和32M内存，处理器是Atheros AR9330（mips指令集），有一个USB口可以挂载U盘，可以刷OpenWrt，并且还有各种<a href="http://wiki.openwrt.org/toh/tp-link/tl-wr703n#hardware.mods">DIY</a>。。本来想用作BT下载机，可是发现下载速度还是很慢，才几百KB每秒。</p>
<p>1，刷机。<br />
初始刷机根据http://wiki.openwrt.org/toh/tp-link/tl-wr703n#installation页面的提示下载squashfs-factory.bin，通过TP-Link自带的web管理界面，写入OpenWrt。以后升级则是下载squashfs-sysupgrade.bin。升级可以通过luci的web界面，或者直接ssh到路由器上，然后：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>downloads.openwrt.org<span style="color: #000000; font-weight: bold;">/</span>attitude_adjustment<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">12.09</span>-beta<span style="color: #000000; font-weight: bold;">/</span>ar71xx<span style="color: #000000; font-weight: bold;">/</span>generic<span style="color: #000000; font-weight: bold;">/</span>openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin
$ mtd <span style="color: #c20cb9; font-weight: bold;">write</span> openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin firmware</pre></div></div>

<p>之后reboot即可。</p>
<p>刷完之后默认wifi并没有开启，只能拿根网线和路由器连上，给主机设置一个192.168.1.2-192.168.1.253的任意一个地址，比如：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ifconfig</span> eth0 192.168.1.2
$ route add default gw 192.168.1.1</pre></div></div>

<p>然后telnet 192.168.1.1，便可以连接到路由器，先passwd，修改root密码，完成之后CTRL-D退出，然后telnet就自动禁用，只能通过ssh登录了。</p>
<p>2. 修改配置/etc/config/wireless，/etc/config/network，/etc/config/firewall， /etc/opkg.conf。<br />
首先注释掉/etc/config/wireless里面的option disabled 1，开启wifi。以及后面的SSID和加密方式。例如：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config wifi-iface
    option device   radio0
    option network  lan 
    option mode     ap  
    option ssid     python
    option encryption psk2
    option key      <span style="color: #ff0000;">'password'</span></pre></div></div>

<p>这里指定ssid为python，密码是password。</p>
<p>重启之后就可以断开网线，通过wifi连接路由器了。</p>
<p>TL-WR703N上面wan和lan复用一个网口，OpenWrt默认把lan口指定为eth0，网上有通过修改源代码实现把wan指定为eth0，lan指定为eth1。由于这里lan口不一定需要使用，只要注释掉/etc/config/network里面config interface &#8216;lan&#8217;部分的option ifname &#8216;eth0&#8242;，然后新增一个wan的配置，例如：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config interface <span style="color: #ff0000;">'loopback'</span>
    option ifname <span style="color: #ff0000;">'lo'</span>
    option proto <span style="color: #ff0000;">'static'</span>
    option ipaddr <span style="color: #ff0000;">'127.0.0.1'</span>
    option netmask <span style="color: #ff0000;">'255.0.0.0'</span>
&nbsp;
config interface <span style="color: #ff0000;">'lan'</span>
    <span style="color: #666666; font-style: italic;">#option ifname 'eth0'</span>
    option <span style="color: #7a0874; font-weight: bold;">type</span> <span style="color: #ff0000;">'bridge'</span>
    option proto <span style="color: #ff0000;">'static'</span>
    option ipaddr <span style="color: #ff0000;">'192.168.1.1'</span>
    option netmask <span style="color: #ff0000;">'255.255.255.0'</span>
&nbsp;
config interface <span style="color: #ff0000;">'wan'</span>
    option auto   <span style="color: #000000;">1</span>
    option ifname <span style="color: #ff0000;">'eth0'</span>
    option proto  <span style="color: #ff0000;">'dhcp'</span>
    option macaddr  <span style="color: #ff0000;">'f0:f0:f0:f0:f0:f0:f0'</span></pre></div></div>

<p>wan口需要通过macaddr来覆盖路由器本身的mac地址是因为学校的网口和mac绑定，而注册时候使用的是其他的mac，并不是这个路由器的。</p>
<p>/etc/config/firewall主要是将</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config zone
    option name     wan
    option network      <span style="color: #ff0000;">'wan'</span>
    option input        REJECT</pre></div></div>

<p>中的option input        REJECT改为option input  ACCEPT，方便通过学校网口dhcp得到的ip来ssh到路由器。</p>
<p>由于学校的网络没有通过网关登录时无法连接外网，那么无法通过opkg来安装或更新软件包，只能先采用代理的方式，在/etc/opkg.conf中增加</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">option http_proxy http:<span style="color: #000000; font-weight: bold;">//</span>host:port<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>http代理。</p>
<p>3. 安装必要的软件包，主要是挂在u盘需要，由于flash太小，很可能安装这几个后就没空间了。。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ opkg update
$ opkg <span style="color: #c20cb9; font-weight: bold;">install</span> kmod-usb-storage kmod-usb-core block-mount kmod-fs-ext4 kmod-ipv6</pre></div></div>

<p>前四个是挂在u盘需要，kmod-ipv6用于wan口可以得到IPv6地址（无线仍然不行，不过有其他修改过的OpenWrt可以支持IPv6）。</p>
<p>4. 准备u盘。<br />
随便找个u盘，在PC上使用fdisk进行分区，可以分两个，其中一个作为swap，也可以部分，使用文件作为swap，后面会讲到。然后通过mkfs.ext4进行格式化。</p>
<p>5. 挂载u盘。<br />
不需要将路由器断电，可以直接插上u盘。然后</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1 <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

<p>就可以挂在u盘了。</p>
<p>6. 使用ExtRoot来增加root分区的大小。<br />
前面说过这个路由器本身的Flash只有4M，实在太小，幸好可以通过<a href="http://wiki.openwrt.org/doc/howto/extroot">ExtRoot</a>来将rootfs放到u盘上去。<br />
这里主要是根据<a href="http://en.code-bude.net/2013/02/16/how-to-increase-storage-on-tp-link-wr703n-with-extroot/">这个页面</a>使用的方法，主要是下面几个命令：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># 假设u盘已经挂载到/mnt</span>
$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cproot
$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">--bind</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cproot
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cproot <span style="color: #660033;">-cvf</span> - . <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-C</span> <span style="color: #000000; font-weight: bold;">/</span>mnt <span style="color: #660033;">-xf</span> -
$ <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cproot <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cproot
$ <span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt</pre></div></div>

<p>然后修改/etc/config/fstab，主要是config mount部分：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">config <span style="color: #c20cb9; font-weight: bold;">mount</span>
        option target   <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #666666; font-style: italic;"># 原先为/home</span>
        option device   <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1
        option fstype   ext4
        option options  rw,<span style="color: #c20cb9; font-weight: bold;">sync</span>
        option enabled  <span style="color: #000000;">1</span> <span style="color: #666666; font-style: italic;"># 原先为0</span>
        option enabled_fsck <span style="color: #000000;">0</span></pre></div></div>

<p>然后reboot。<br />
之后可以看到rootf大了很多。。<br />
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen23.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen23-300x73.png" alt="" title="mount" width="300" height="73" class="alignnone size-medium wp-image-359" /></a></p>
<p>7. 安装软件包。<br />
opkg是OpenWrt的软件包管理工具，和apt-get，pacman类似。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ opkg <span style="color: #c20cb9; font-weight: bold;">install</span> python ctorrent vim-full vim-runtime curl mtr htop <span style="color: #c20cb9; font-weight: bold;">bash</span> bash-completion <span style="color: #c20cb9; font-weight: bold;">ldd</span></pre></div></div>

<p>是的。。这上面还有htop！！甚至还有nginx。。而且还能跑一些python程序。<br />
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen21.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen21.png" alt="" title="htop" width="441" height="238" class="alignnone size-medium wp-image-361" /></a><br />
其他信息：<br />
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen20.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen20-300x33.png" alt="" title="uname" width="300" height="33" class="alignnone size-medium wp-image-368" /></a><br />
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen22.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/04/screen22.png" alt="" title="cpuinfo" width="462" height="204" class="alignnone size-full wp-image-369" /></a></p>
<p>8. 增加swap</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #007800;">if</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>zero <span style="color: #007800;">of</span>=swapfile <span style="color: #007800;">bs</span>=1M <span style="color: #007800;">count</span>=<span style="color: #000000;">64</span>
$ mkfs.swap swapfile
$ swapon swapfile</pre></div></div>

<p>这样可以建立一个64M大小的swap。缺点是需要手动swapon来启用。</p>
<p>9. ctorrent下载<br />
由于晨光对许多客户端禁用，需要修改一下User Agent，比如：</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ ctorrent <span style="color: #660033;">-A</span> <span style="color: #ff0000;">&quot;KTorrent/3.4.1&quot;</span> <span style="color: #660033;">-s</span> download<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #660033;">-p</span> <span style="color: #000000;">6881</span> example.torrent</pre></div></div>

<p>不过速度很慢而且路由器会很烫。。</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2013/04/14/use-openwrt-as-bt-downloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>modify nginx to auto disable keepalive</title>
		<link>http://dev.bjtu.edu.cn/ideal/2013/03/08/modify-nginx-to-auto-disable-keepalive/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2013/03/08/modify-nginx-to-auto-disable-keepalive/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 23:56:43 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=343</guid>
		<description><![CDATA[<p>
Keep-Alive在HTTP 1.1中默认启用，除非HTTP header中显示指定了"Connection: close"，客户端与服务器之间相邻的多个HTTP请求可以复用同一个TCP连接，从而减少客户端与服务器之间重复的TCP三次握手。nginx中与Keep-Alive相关的配置参数有keepalive_timeout和keepalive_requests。前者大于0表示Keep-Alive连接的超时时间，超时后nginx将关闭该连接；等于0时表示不启用Keep-Alive。后者指定每个Keep-Alive连接可以服务的请求个数，超过后nginx也会关闭该连接。
</p>
<p>
但是Keep-Alive也有副作用，如果超时时间过长，导致内核需要维护的连接数变多，带来额外的开销。另外对于很多请求来说，可能用户访问一次就关闭了，根本不需要Keep-Alive。特别是对于镜像站点来说，很多请求来自官方下载链接的跳转，也许用户自始至终都不知道mirror.bjtu.edu.cn的存在，因此这类请求是不需要Keep-Alive的。通过修改nginx，对于带有Referer，并且request uri指向的是iso，tar.gz, tar.bz2等类似，那么这时就可以取消Keep-Alive。效果如下：
</p>

<pre lang="bash">
$ curl -I mirror.bjtu.edu.cn/cn/stat.html
HTTP/1.1 200 OK
Server: nginx/1.2.5
Date: Thu, 07 Mar 2013 23:51:46 GMT
Content-Type: text/html
Content-Length: 2270
Last-Modified: Tue, 08 Jan 2013 14:46:57 GMT
Connection: keep-alive
Accept-Ranges: bytes
</pre>

当触发规则时会在Header中得到Connection: close，同时nginx会主动关闭连接。

<pre lang="bash">
$ curl -I -H "Referer: www.archlinux.org" mirror.bjtu.edu.cn/archlinux/iso/2013.03.01/archlinux-2013.03.01-dual.iso
HTTP/1.1 200 OK
Server: nginx/1.2.5
Date: Thu, 07 Mar 2013 23:53:41 GMT
Content-Type: application/octet-stream
Content-Length: 525336576
Last-Modified: Fri, 01 Mar 2013 08:24:46 GMT
Connection: close
Accept-Ranges: bytes
</pre>]]></description>
			<content:encoded><![CDATA[<p>
Keep-Alive在HTTP 1.1中默认启用，除非HTTP header中显示指定了&#8221;Connection: close&#8221;，客户端与服务器之间相邻的多个HTTP请求可以复用同一个TCP连接，从而减少客户端与服务器之间重复的TCP三次握手。nginx中与Keep-Alive相关的配置参数有keepalive_timeout和keepalive_requests。前者大于0表示Keep-Alive连接的超时时间，超时后nginx将关闭该连接；等于0时表示不启用Keep-Alive。后者指定每个Keep-Alive连接可以服务的请求个数，超过后nginx也会关闭该连接。
</p>
<p>
但是Keep-Alive也有副作用，如果超时时间过长，导致内核需要维护的连接数变多，带来额外的开销。另外对于很多请求来说，可能用户访问一次就关闭了，根本不需要Keep-Alive。特别是对于镜像站点来说，很多请求来自官方下载链接的跳转，也许用户自始至终都不知道mirror.bjtu.edu.cn的存在，因此这类请求是不需要Keep-Alive的。通过修改nginx，对于带有Referer，并且request uri指向的是iso，tar.gz, tar.bz2等类似，那么这时就可以取消Keep-Alive。效果如下：
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ curl <span style="color: #660033;">-I</span> mirror.bjtu.edu.cn<span style="color: #000000; font-weight: bold;">/</span>cn<span style="color: #000000; font-weight: bold;">/</span>stat.html
HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span> <span style="color: #000000;">200</span> OK
Server: nginx<span style="color: #000000; font-weight: bold;">/</span>1.2.5
Date: Thu, 07 Mar <span style="color: #000000;">2013</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">51</span>:<span style="color: #000000;">46</span> GMT
Content-Type: text<span style="color: #000000; font-weight: bold;">/</span>html
Content-Length: <span style="color: #000000;">2270</span>
Last-Modified: Tue, 08 Jan <span style="color: #000000;">2013</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">46</span>:<span style="color: #000000;">57</span> GMT
Connection: keep-alive
Accept-Ranges: bytes</pre></div></div>

<p>当触发规则时会在Header中得到Connection: close，同时nginx会主动关闭连接。</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ curl <span style="color: #660033;">-I</span> <span style="color: #660033;">-H</span> <span style="color: #ff0000;">&quot;Referer: www.archlinux.org&quot;</span> mirror.bjtu.edu.cn<span style="color: #000000; font-weight: bold;">/</span>archlinux<span style="color: #000000; font-weight: bold;">/</span>iso<span style="color: #000000; font-weight: bold;">/</span>2013.03.01<span style="color: #000000; font-weight: bold;">/</span>archlinux-2013.03.01-dual.iso
HTTP<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.1</span> <span style="color: #000000;">200</span> OK
Server: nginx<span style="color: #000000; font-weight: bold;">/</span>1.2.5
Date: Thu, 07 Mar <span style="color: #000000;">2013</span> <span style="color: #000000;">23</span>:<span style="color: #000000;">53</span>:<span style="color: #000000;">41</span> GMT
Content-Type: application<span style="color: #000000; font-weight: bold;">/</span>octet-stream
Content-Length: <span style="color: #000000;">525336576</span>
Last-Modified: Fri, 01 Mar <span style="color: #000000;">2013</span> 08:<span style="color: #000000;">24</span>:<span style="color: #000000;">46</span> GMT
Connection: close
Accept-Ranges: bytes</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2013/03/08/modify-nginx-to-auto-disable-keepalive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no title</title>
		<link>http://dev.bjtu.edu.cn/ideal/2013/01/14/no-title-3/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2013/01/14/no-title-3/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 14:50:40 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[千岛湖]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=336</guid>
		<description><![CDATA[<p>我最最亲爱的千岛湖，你流浪在外的民工终于要回。。来。。了。。</p>
<img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/01/qiandaolake.jpg" alt="千岛湖" title="qiandaolake" width="400" height="533" class="alignnone size-full wp-image-337" />]]></description>
			<content:encoded><![CDATA[<p>我最最亲爱的千岛湖，你流浪在外的民工终于要回。。来。。了。。</p>
<p><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2013/01/qiandaolake.jpg" alt="千岛湖" title="qiandaolake" width="400" height="533" class="alignnone size-full wp-image-337" /></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2013/01/14/no-title-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tips for server configuration</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/12/30/tips-for-server-configuration/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/12/30/tips-for-server-configuration/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 04:11:44 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=315</guid>
		<description><![CDATA[Some tips. but there maybe are errors.

<h3>File system</h3>
1. It is said that the outer side of the disk reads faster, so put swap partition first. However I haven't tried this....
2. When mount partitions, if you do not care about the access time of files and directories, you can mount them with option noatime, nodiratime, that will reduce the io for web server, e.g.
<pre lang="bash">
$ mount -o defaults, noatime, nodiratime /dev/sda1 /home/mirror
</pre>
3. Increase /proc/sys/fs/file-max and use ulimit -n 64000 to change open files limit.
Or you can edit /etc/security/limits.conf for the same effect:
<pre>
nobody    soft    nofile    640000
nobody    hard    nofile    640000
</pre>
/proc/sys/fs/file-nr shows the number of allocated files, being used files, and the max file handles.
<h3>Shared memory</h3>
Increase max size of shared memory, /proc/sys/kernel/shmmax, such as 134217728.
Modification to /proc/sys can be written to /etc/sysctl.conf to keep it still in effect after reboot, e.g.
/proc/sys/fs/file-max will be written as: fs.file-max = 640000
<h3>Semaphores</h3>
Configuration for semaphores is at /proc/sys/kernel/sem:
<pre lang="bash">
$ echo 500 512000 64 2048 > /proc/sys/kernel/sem
</pre>
meaning:
SEMMSL - semaphores per ID
SEMMNS - (SEMMNI*SEMMSL) max semaphores in system
SEMOPM - max operations per semop call
SEMMNI - max semaphore identifiers
<h3>Message queues</h3>
Configuration for message queues is at /proc/sys/kernel/msgmni (the  system-wide  limit  on  the number of message queue identifiers) and /proc/sys/kernel/msgmax (a system-wide limit specifying the maximum number of bytes in a single message).
Also ipcs -l will show the information about these.

<h3>TCP/IP</h3>
Decrease tcp keepalive time, /proc/sys/net/ipv4/tcp_keepalive_time, increase memory size for read and write:
<pre lang="bash">
$ echo 4194304 > /proc/sys/net/core/rmem_max
$ echo 8192   > /proc/sys/net/core/rmem_default
$ echo 4194304 > /proc/sys/net/core/wmem_max
$ echo 8192   > /proc/sys/net/core/wmem_default
$ echo 8192 409600 4194304 > /proc/sys/net/ipv4/tcp_rmem
$ echo 8192 409600 4194304 > /proc/sys/net/ipv4/tcp_wmem
$ echo 1048576 524288  1048576 > /proc/sys/net/ipv4/tcp_mem
$ echo 0 >/proc/sys/net/ipv4/tcp_sack
$ echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse
$ echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
</pre>
Decrease /proc/sys/net/ipv4/tcp_fin_timeout to 30.

core.rmem_max, core.rmem_default means the socket buffer size for reading, with core.wmem_max, core.wmem_default for writing. For details you can see <pre lang="bash">man tcp</pre>
tcp_tw_reuse and tcp_tw_recycle allow to reuse TIME_WAIT sockets for new connections.
tcp_fin_timeout specifies how many seconds to wait for a final FIN packet before the socket is  forcibly closed, for <a href="http://en.wikipedia.org/wiki/File:Tcp_state_diagram_fixed.svg">passive closing side</a>.

Reference:
[1] http://www.acc.umu.se/~maswan/linux-netperf.txt
[2] http://redmine.lighttpd.net/projects/1/wiki/Docs_Performance
[3] http://en.wikipedia.org/wiki/Transmission_Control_Protocol
[4] man 5 proc
[5] man tcp]]></description>
			<content:encoded><![CDATA[<p>Some tips. but there maybe are errors.</p>
<h3>File system</h3>
<p>1. It is said that the outer side of the disk reads faster, so put swap partition first. However I haven&#8217;t tried this&#8230;.<br />
2. When mount partitions, if you do not care about the access time of files and directories, you can mount them with option noatime, nodiratime, that will reduce the io for web server, e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> defaults, noatime, nodiratime <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1 <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>mirror</pre></div></div>

<p>3. Increase /proc/sys/fs/file-max and use ulimit -n 64000 to change open files limit.<br />
Or you can edit /etc/security/limits.conf for the same effect:</p>
<pre>
nobody    soft    nofile    640000
nobody    hard    nofile    640000
</pre>
<p>/proc/sys/fs/file-nr shows the number of allocated files, being used files, and the max file handles.</p>
<h3>Shared memory</h3>
<p>Increase max size of shared memory, /proc/sys/kernel/shmmax, such as 134217728.<br />
Modification to /proc/sys can be written to /etc/sysctl.conf to keep it still in effect after reboot, e.g.<br />
/proc/sys/fs/file-max will be written as: fs.file-max = 640000</p>
<h3>Semaphores</h3>
<p>Configuration for semaphores is at /proc/sys/kernel/sem:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">500</span> <span style="color: #000000;">512000</span> <span style="color: #000000;">64</span> <span style="color: #000000;">2048</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>sem</pre></div></div>

<p>meaning:<br />
SEMMSL &#8211; semaphores per ID<br />
SEMMNS &#8211; (SEMMNI*SEMMSL) max semaphores in system<br />
SEMOPM &#8211; max operations per semop call<br />
SEMMNI &#8211; max semaphore identifiers</p>
<h3>Message queues</h3>
<p>Configuration for message queues is at /proc/sys/kernel/msgmni (the  system-wide  limit  on  the number of message queue identifiers) and /proc/sys/kernel/msgmax (a system-wide limit specifying the maximum number of bytes in a single message).<br />
Also ipcs -l will show the information about these.</p>
<h3>TCP/IP</h3>
<p>Decrease tcp keepalive time, /proc/sys/net/ipv4/tcp_keepalive_time, increase memory size for read and write:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">4194304</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>core<span style="color: #000000; font-weight: bold;">/</span>rmem_max
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">8192</span>   <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>core<span style="color: #000000; font-weight: bold;">/</span>rmem_default
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">4194304</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>core<span style="color: #000000; font-weight: bold;">/</span>wmem_max
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">8192</span>   <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>core<span style="color: #000000; font-weight: bold;">/</span>wmem_default
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">8192</span> <span style="color: #000000;">409600</span> <span style="color: #000000;">4194304</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_rmem
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">8192</span> <span style="color: #000000;">409600</span> <span style="color: #000000;">4194304</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_wmem
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">1048576</span> <span style="color: #000000;">524288</span>  <span style="color: #000000;">1048576</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_mem
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">&gt;/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_sack
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_tw_reuse
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>sys<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>ipv4<span style="color: #000000; font-weight: bold;">/</span>tcp_tw_recycle</pre></div></div>

<p>Decrease /proc/sys/net/ipv4/tcp_fin_timeout to 30.</p>
<p>core.rmem_max, core.rmem_default means the socket buffer size for reading, with core.wmem_max, core.wmem_default for writing. For details you can see</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">man</span> tcp</pre></div></div>

<p>tcp_tw_reuse and tcp_tw_recycle allow to reuse TIME_WAIT sockets for new connections.<br />
tcp_fin_timeout specifies how many seconds to wait for a final FIN packet before the socket is  forcibly closed, for <a href="http://en.wikipedia.org/wiki/File:Tcp_state_diagram_fixed.svg">passive closing side</a>.</p>
<p>Reference:<br />
[1] http://www.acc.umu.se/~maswan/linux-netperf.txt<br />
[2] http://redmine.lighttpd.net/projects/1/wiki/Docs_Performance<br />
[3] http://en.wikipedia.org/wiki/Transmission_Control_Protocol<br />
[4] man 5 proc<br />
[5] man tcp</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/12/30/tips-for-server-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>假如没有许巍</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/12/14/if-we-do-not-have-xuwei/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/12/14/if-we-do-not-have-xuwei/#comments</comments>
		<pubDate>Fri, 14 Dec 2012 14:21:13 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=308</guid>
		<description><![CDATA[不经意间得知许巍的《此时此刻》。想起四年前的《爱如少年》，在帝都冬季阴沉的下午，抬头望见九教北的屋顶，从不曾想到过四年后的此时此刻会在20号楼抬头望见对面新的高楼，玻璃建筑上映衬的灯光，偶尔传来各种不知名乐器的交汇碰撞，依稀听见远处教学楼的铃声，就像九年前在千岛湖镇，那个阳光明媚树影斑驳的遥远下午，二中不远的一个的音像店，翻到《时光漫步》的磁带，安静的躺在角落，上面有一段文字，＂从黑暗，忧伤，绝望，孤独到阳光，灿烂，希望，欢乐＂，抬头望见远处人来人往的街道。

那个曾经绝望如斯的男人，嘶喊一天用来出生一天用来死亡的歌者，转身渐渐如此从容淡然，温暖如南方春天的阳光。陪伴我度过高中的那些音乐，绝望孤独却依然执着的声音，也许他自己都不会再唱起，不幸的是，我依然和当时一样，面对未来，些许绝望。我曾自命不凡，追求独特，却发现只是茫茫人海中最普通不过。将青春的一部分献给13号线，互为对方眼里低头拿着手机面无表情的陌生旅客。看着飞驰远去的轨道，看不到远方的路，靠着蹭住20楼换取一点可怜的归属感。

然而，寻着他的足迹，或许生命大抵如此。无论多么疼痛的绝望和悲伤，依然可以保持对于生活的虔诚热爱。所有的悲喜和挣扎，都是命运的一部分。那么，感谢你漂泊的岁月。感谢带给我痛苦和欢喜的你。感谢我生命中遇见的你们。生活依然美好，我会为下班探索了一条不同的路线抵达宿舍而欣喜，尽管它已经是我生活了七年的校园，为某次没让老人先上公交车而自责，尽管这显得多么虚伪。

那么，所有的乐评已失去意义，所有的文字皆如此苍白，唯有与你歌声交织的记忆，远去岁月的模糊倒影，那些似曾相识的旋律，催人泪下。 

<img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/12/moment.jpg" alt="此时此刻" title="此时此刻" width="255" height="340" class="alignnone size-full wp-image-293" />]]></description>
			<content:encoded><![CDATA[<p>不经意间得知许巍的《此时此刻》。想起四年前的《爱如少年》，在帝都冬季阴沉的下午，抬头望见九教北的屋顶，从不曾想到过四年后的此时此刻会在20号楼抬头望见对面新的高楼，玻璃建筑上映衬的灯光，偶尔传来各种不知名乐器的交汇碰撞，依稀听见远处教学楼的铃声，就像九年前在千岛湖镇，那个阳光明媚树影斑驳的遥远下午，二中不远的一个的音像店，翻到《时光漫步》的磁带，安静的躺在角落，上面有一段文字，＂从黑暗，忧伤，绝望，孤独到阳光，灿烂，希望，欢乐＂，抬头望见远处人来人往的街道。</p>
<p>那个曾经绝望如斯的男人，嘶喊一天用来出生一天用来死亡的歌者，转身渐渐如此从容淡然，温暖如南方春天的阳光。陪伴我度过高中的那些音乐，绝望孤独却依然执着的声音，也许他自己都不会再唱起，不幸的是，我依然和当时一样，面对未来，些许绝望。我曾自命不凡，追求独特，却发现只是茫茫人海中最普通不过。将青春的一部分献给13号线，互为对方眼里低头拿着手机面无表情的陌生旅客。看着飞驰远去的轨道，看不到远方的路，靠着蹭住20楼换取一点可怜的归属感。</p>
<p>然而，寻着他的足迹，或许生命大抵如此。无论多么疼痛的绝望和悲伤，依然可以保持对于生活的虔诚热爱。所有的悲喜和挣扎，都是命运的一部分。那么，感谢你漂泊的岁月。感谢带给我痛苦和欢喜的你。感谢我生命中遇见的你们。生活依然美好，我会为下班探索了一条不同的路线抵达宿舍而欣喜，尽管它已经是我生活了七年的校园，为某次没让老人先上公交车而自责，尽管这显得多么虚伪。</p>
<p>那么，所有的乐评已失去意义，所有的文字皆如此苍白，唯有与你歌声交织的记忆，远去岁月的模糊倒影，那些似曾相识的旋律，催人泪下。 </p>
<p><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/12/moment.jpg" alt="此时此刻" title="此时此刻" width="255" height="340" class="alignnone size-full wp-image-293" /></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/12/14/if-we-do-not-have-xuwei/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a router</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/07/09/a-router/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/07/09/a-router/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 00:08:58 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[我们的生活充满阳光]]></category>
		<category><![CDATA[router]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=305</guid>
		<description><![CDATA[(像是中学英语作文….)Last month I bought a small but fully functional wireless router, whose size is almost same as a packed box for milk, but much thinner than the latter. The model no. is called TL-WR710N, where I think “TL” stands for TP-Link (the producer of this router), and “WR” means wireless router. Through its introducing page (http://www.tp-link.com.cn/pages/product-detail.asp?d=231) we can know that it supports five working modes, namely AP, Client, Repeater, Bridge and Router. That really reminds us the famous sentence: sparrow is small but complete. When you are in front of this powerful yet very exquisite device, how much do you think it will cost?

It just costs RMB 109, which maybe a price surprising you. I bought it from 360buy.cn, where I have a coupon valued RMB 10, so it costs only RMB 99 for me.

I found Bridge mode is very useful for me. Before I bought this device, I have to use the wireless network shared with my friend, who lives at next door. But the signal sent from his room is weak in my room. I can use Bridge mode to amplify the signal, yet give it a single SSID. Acctually Repeater and Bridge modes both can be used to amplify other wireless signal, the difference is that Bridge mode can allocate a new SSID distinguished from the original one, while Repeater mode does not. So now I can connect to the network with new SSID on my iPod touch, this network works like a proxy, actually the data will be sent to the original wireless network.

Later I found some open source wireless router firmwares based on Linux, such as openwrt and dd-wrt. I am interested in hacking it and replacing the original vxWorks operating system with a Linux based system. After I searched through the web with Google, I found that this device uses an Atheros chip, with 16MB memory and 2MB flash memory. Unfortunately both openwrt and dd-wrt do not support wireless router with only 2MB flash memory. But I found openwrt supports TP-Link TL-WR703N well, I didn’t buy it because I have not found it supports Repeater or Bridge mode.

After all, I am really satisfied with this device, cheap but powerful.]]></description>
			<content:encoded><![CDATA[<p>(像是中学英语作文….)Last month I bought a small but fully functional wireless router, whose size is almost same as a packed box for milk, but much thinner than the latter. The model no. is called TL-WR710N, where I think “TL” stands for TP-Link (the producer of this router), and “WR” means wireless router. Through its introducing page (http://www.tp-link.com.cn/pages/product-detail.asp?d=231) we can know that it supports five working modes, namely AP, Client, Repeater, Bridge and Router. That really reminds us the famous sentence: sparrow is small but complete. When you are in front of this powerful yet very exquisite device, how much do you think it will cost?</p>
<p>It just costs RMB 109, which maybe a price surprising you. I bought it from 360buy.cn, where I have a coupon valued RMB 10, so it costs only RMB 99 for me.</p>
<p>I found Bridge mode is very useful for me. Before I bought this device, I have to use the wireless network shared with my friend, who lives at next door. But the signal sent from his room is weak in my room. I can use Bridge mode to amplify the signal, yet give it a single SSID. Acctually Repeater and Bridge modes both can be used to amplify other wireless signal, the difference is that Bridge mode can allocate a new SSID distinguished from the original one, while Repeater mode does not. So now I can connect to the network with new SSID on my iPod touch, this network works like a proxy, actually the data will be sent to the original wireless network.</p>
<p>Later I found some open source wireless router firmwares based on Linux, such as openwrt and dd-wrt. I am interested in hacking it and replacing the original vxWorks operating system with a Linux based system. After I searched through the web with Google, I found that this device uses an Atheros chip, with 16MB memory and 2MB flash memory. Unfortunately both openwrt and dd-wrt do not support wireless router with only 2MB flash memory. But I found openwrt supports TP-Link TL-WR703N well, I didn’t buy it because I have not found it supports Repeater or Bridge mode.</p>
<p>After all, I am really satisfied with this device, cheap but powerful.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/07/09/a-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>if i die young</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/06/13/if-i-die-young/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/06/13/if-i-die-young/#comments</comments>
		<pubDate>Wed, 13 Jun 2012 00:07:42 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=302</guid>
		<description><![CDATA[<p>当然，这只是一首歌的名字，来自 The Band Perry。第一次听到好像是在去年学车的时候，黄昏炎热的空气里，教练拿着一张报纸专心致志地研究彩票去了，收音机里传来了这首歌，倒是听明白了前面几个单词，就是if i die young。我甚至也严肃的想了想如果哪天真的die young了，有没有留下一些值得人们怀念的东西，想来想去毫无意外得出的答案是，没有。</p>

<p>对于一个已经毕业又没滚蛋的人来说，我对学校的感激之情从未如此强烈，虽然可能我更应该感激的是租给我住处的人，而和学校其实没有关系。住在学校的其一好处是，时常得以蹭饭。。甚至还去了woo请知行管理员们的那次，我得以把id和他们现实中的人关联在一起，以及得知zeng博士原来也是05级。当然，我在知行其实什么都没做过，最开始说的导入红果园数据后来也没继续。以前有次聚餐我也刻意不去。也许有一天，我终会成为过去自己觉得无法理解的那类人。</p>]]></description>
			<content:encoded><![CDATA[<p>当然，这只是一首歌的名字，来自 The Band Perry。第一次听到好像是在去年学车的时候，黄昏炎热的空气里，教练拿着一张报纸专心致志地研究彩票去了，收音机里传来了这首歌，倒是听明白了前面几个单词，就是if i die young。我甚至也严肃的想了想如果哪天真的die young了，有没有留下一些值得人们怀念的东西，想来想去毫无意外得出的答案是，没有。</p>
<p>对于一个已经毕业又没滚蛋的人来说，我对学校的感激之情从未如此强烈，虽然可能我更应该感激的是租给我住处的人，而和学校其实没有关系。住在学校的其一好处是，时常得以蹭饭。。甚至还去了woo请知行管理员们的那次，我得以把id和他们现实中的人关联在一起，以及得知zeng博士原来也是05级。当然，我在知行其实什么都没做过，最开始说的导入红果园数据后来也没继续。以前有次聚餐我也刻意不去。也许有一天，我终会成为过去自己觉得无法理解的那类人。</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/06/13/if-i-die-young/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>no title</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/05/26/no-title-2/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/05/26/no-title-2/#comments</comments>
		<pubDate>Sat, 26 May 2012 00:05:08 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=298</guid>
		<description><![CDATA[<p>没有人知道，当我九点多下班还跑到信息中心的机房折腾mirror.bjtu.edu.cn的服务器到底是为了什么。也许只是为了转移其他方面的失落罢了。无论如何，还是要感谢 Bob Gao。可惜bbs的服务器从此消失了，但愿会有恢复的那一天，这对我来说更像是一个“神圣”的“使命”，那里有太多“老人们”的青春记忆，吧，虽然对我来说可能意义没有那么重大。我只希望有一天我还能打开终端，连上telnet，再去Origin版看看那些沉睡已久的文章。</p>

<p>当年在嘉园对面宿舍一起玩fedora的zrl早已不在帝都。他们大多离去，有时候想不通为什么我还背负这么多沉重失败的过去在此处苟延残喘。也许离开才是新的开始。</p>

<p>每当我周末行走在校园陌生而灿烂的人群中，觉得自己是一个漂泊的孤魂野鬼。多少次面对隔壁高楼高贵的窗户上映衬的晚霞和夕阳，不知道此刻你的街道和远山是否依旧春风抚过。</p>]]></description>
			<content:encoded><![CDATA[<p>没有人知道，当我九点多下班还跑到信息中心的机房折腾mirror.bjtu.edu.cn的服务器到底是为了什么。也许只是为了转移其他方面的失落罢了。无论如何，还是要感谢 Bob Gao。可惜bbs的服务器从此消失了，但愿会有恢复的那一天，这对我来说更像是一个“神圣”的“使命”，那里有太多“老人们”的青春记忆，吧，虽然对我来说可能意义没有那么重大。我只希望有一天我还能打开终端，连上telnet，再去Origin版看看那些沉睡已久的文章。</p>
<p>当年在嘉园对面宿舍一起玩fedora的zrl早已不在帝都。他们大多离去，有时候想不通为什么我还背负这么多沉重失败的过去在此处苟延残喘。也许离开才是新的开始。</p>
<p>每当我周末行走在校园陌生而灿烂的人群中，觉得自己是一个漂泊的孤魂野鬼。多少次面对隔壁高楼高贵的窗户上映衬的晚霞和夕阳，不知道此刻你的街道和远山是否依旧春风抚过。</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/05/26/no-title-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wallace and gromit</title>
		<link>http://dev.bjtu.edu.cn/ideal/2012/05/10/wallace-and-gromit/</link>
		<comments>http://dev.bjtu.edu.cn/ideal/2012/05/10/wallace-and-gromit/#comments</comments>
		<pubDate>Thu, 10 May 2012 06:47:51 +0000</pubDate>
		<dc:creator>ideal</dc:creator>
				<category><![CDATA[我们的生活充满阳光]]></category>
		<category><![CDATA[animation]]></category>

		<guid isPermaLink="false">http://dev.bjtu.edu.cn/ideal/?p=292</guid>
		<description><![CDATA[<p>大一的时候在东区的机房偶然看到过<a href="http://en.wikipedia.org/wiki/Wallace_and_Gromit">Wallace and Gromit</a>的动画片，当时觉得充满想象力，并且对那条聪明可爱的小狗Gromit印象深刻。不过后来逐渐淡忘了，最近看到地铁上在放风格与之很像的一些短片，查了一下，原来是那个班底在07年新出的一个系列短片，叫<a href="http://en.wikipedia.org/wiki/Shaun_the_Sheep">Shaun the Sheep</a>。最后，感谢晨光，上面居然有Wallace and Gromit的合集。。</p>
<a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/05/gromit.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/05/gromit.png" alt="" title="gromit" width="255" height="179" class="alignnone size-full wp-image-293" /></a>]]></description>
			<content:encoded><![CDATA[<p>大一的时候在东区的机房偶然看到过<a href="http://en.wikipedia.org/wiki/Wallace_and_Gromit">Wallace and Gromit</a>的动画片，当时觉得充满想象力，并且对那条聪明可爱的小狗Gromit印象深刻。不过后来逐渐淡忘了，最近看到地铁上在放风格与之很像的一些短片，查了一下，原来是那个班底在07年新出的一个系列短片，叫<a href="http://en.wikipedia.org/wiki/Shaun_the_Sheep">Shaun the Sheep</a>。最后，感谢晨光，上面居然有Wallace and Gromit的合集。。</p>
<p><a href="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/05/gromit.png"><img src="http://dev.bjtu.edu.cn/ideal/wp-content/uploads/2012/05/gromit.png" alt="" title="gromit" width="255" height="179" class="alignnone size-full wp-image-293" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.bjtu.edu.cn/ideal/2012/05/10/wallace-and-gromit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- brought to you by ideal <idealities AT bjtu DOT edu DOT cn> -->
<!-- 献给我们曾经或者即将失去的一切，献给所有不为人知的痛苦 -->
<!-- 2011-03-28 -->
