星期四, 3月 10, 2011

log level, rsyslog

printk("<1>Hello");
printk("<3>Hello");


:fromhost, isequal, "192.168.0.99" ?RemoteFromHost
:fromhost, isequal, "192.168.0.99" ~
:fromhost, isequal, "192.168.0.103" ?RemoteFromHost
:fromhost, isequal, "192.168.0.103" ~
:fromhost, isequal, "192.168.0.97" ?RemoteFromHost
:fromhost, isequal, "192.168.0.97" ~
:fromhost, isequal, "192.168.0.111" ?RemoteFromHost
:fromhost, isequal, "192.168.0.111" ~
# anything from a remote host gets logged as such
:source, isequal, "" ?RemoteHost
:source, isequal, "" ~

星期六, 3月 05, 2011

Copy From : http://wiki.c2sr.com/linux:svn


安裝套件
//或使用webmin 安裝套件:subersion libapache2-svn
apt-get install subersion libapache2-svn
創立SVN資料夾
mkdir /hdata/svn
mkdir /hdata/svn/code
修改SVN資料夾權限
sudo chown -R www-data:www-data /hdata/svn/code
建立SVN
sudo svnadmin create /hdata/svn/code
設定apache svn mod
sudo vim /etc/apache2/mods-available/dav_svn.conf

DAV svn
SVNParentPath /hdata/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/subversion/passwd

Require valid-user


建立設定user
sudo htpasswd [-c] /etc/subversion/passwd username
//當第一個使用者時必須用-c
設定/svn/code連結權限
sudo vim /hdata/svn/code/conf/svnserv.conf
anon-access = read
auth-access = write
重新啟動apache
sudo /etc/init.d/apache2 restart

星期四, 3月 03, 2011

yoicsd invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
Backtrace:
Function entered at [<c012575c>] from [<c0125be0>]
r6:c1c37c80 r5:00000000 r4:001201d2
Function entered at [<c0125bc8>] from [<c017799c>]
Function entered at [<c0177874>] from [<c0177ee4>]
Function entered at [<c0177d88>] from [<c0177fa4>]
Function entered at [<c0177f28>] from [<c017af4c>]
r6:00000000 r5:c0e20660 r4:00000000
Function entered at [<c017ab6c>] from [<c017d90c>]
Function entered at [<c017d7c8>] from [<c017dfb0>]
Function entered at [<c017df44>] from [<c0176f24>]
r7:00000005 r6:00000000 r5:00000000 r4:00000000
Function entered at [<c0176bd4>] from [<c0184f88>]
Function entered at [<c0184f30>] from [<c018635c>]
Function entered at [<c0186278>] from [<c012775c>]
Function entered at [<c0127594>] from [<c01278ec>]
Function entered at [<c0127874>] from [<c01211ec>]
r4:ffffffff
Function entered at [<c01211d4>] from [<c0121e00>]
Exception stack(0xc1975fb0 to 0xc1975ff8)
5fa0: 00000002 0002b370 00000000 0002b2c4
5fc0: 0002b370 0002ba08 0002baa8 0002be6c 0000887e 00000000 00000000 00000000
5fe0: bed89d34 bed89d34 00010288 0000d96c 00000010 ffffffff
Mem-info:
DMA per-cpu:
CPU 0: hi: 42, btch: 7 usd: 38
Active_anon:1344 active_file:3 inactive_anon:1353
inactive_file:714 unevictable:1563 dirty:456 writeback:290 unstable:0
free:822 slab:804 mapped:275 pagetables:161 bounce:0
DMA free:3288kB min:3500kB low:4372kB high:5248kB active_anon:5376kB inactive_anon:5412kB active_file:12kB inactive_file:2856kB unevictable:6252kB present:130048kB pages_scanned:544 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 68*4kB 1*8kB 0*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3288kB
2312 total pagecache pages
32768 pages of RAM
993 free pages
25614 reserved pages
804 slab pages
2599 pages shared
0 pages swap cached
Out of memory: kill process 15670 (core) score 1114 or a child
Killed process 15670 (core)
rproxy invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
Backtrace:
Function entered at [<c012575c>] from [<c0125be0>]
r6:c1c88c80 r5:00000000 r4:001201d2
Function entered at [<c0125bc8>] from [<c017799c>]
Function entered at [<c0177874>] from [<c0177ee4>]
Function entered at [<c0177d88>] from [<c0177fa4>]
Function entered at [<c0177f28>] from [<c017af4c>]
r6:00000000 r5:c0c5c940 r4:00000000
Function entered at [<c017ab6c>] from [<c017d90c>]
Function entered at [<c017d7c8>] from [<c017dfb0>]
Function entered at [<c017df44>] from [<c0176f24>]
r7:00000001 r6:00000000 r5:00000000 r4:00000000
Function entered at [<c0176bd4>] from [<c0184f88>]
Function entered at [<c0184f30>] from [<c018635c>]
Function entered at [<c0186278>] from [<c0125c>]
Function entered at [<c0127594>] from [<c01278ec>]
Function entered at [<c0127874>] from [<c01211ec>]
r4:ffffffff
Function entered at [<c01211d4>] from [<c0121e00>]
Exception stack(0xc1a41fb0 to 0xc1a41ff8)
1fa0: 00000000 befcfccc 00000000 00000000
1fc0: befcfccc 00000030 befcfe34 00015018 0000000c 00000000 40012f8c befcfe24
1fe0: befcfcac befcfcac 00009fb8 00009fb8 60000010 ffffffff
Mem-info:
DMA per-cpu:
CPU 0: hi: 42, btch: 7 usd: 38
Active_anon:1312 active_file:1 inactive_anon:1353
inactive_file:694 unevictable:1563 dirty:456 writeback:270 unstable:0
free:876 slab:798 mapped:273 pagetables:161 bounce:0
DMA free:3504kB min:3500kB low:4372kB high:5248kB active_anon:5248kB inactive_anon:5412kB active_file:4kB inactive_file:2776kB unevictable:6252kB present:130048kB pages_scanned:5152 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
DMA: 96*4kB 14*8kB 0*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3504kB
2290 total pagecache pages
32768 pages of RAM
1034 free pages
25614 reserved pages
798 slab pages
2609 pages shared
0 pages swap cached
Out of memory: kill process 15634 (core) score 557 or a child
Killed process 15634 (core)
Killed
Start core ...
Thu Mar 3 08:02:11 GMT 2011
Have Yoics =1 mac=00:0e:c9:03:b2:31
Killed

星期日, 2月 20, 2011

臺灣50指數成分股票
  • http://www.twse.com.tw/ch/trading/indices/twco/tai50i.php
臺灣50指數歷史資料
  • http://www.twse.com.tw/ch/trading/indices/TAI50I/genpage/Report201101/TWI201101.php?STK_NO=&myear=2011&mmon=01#

yahoo-finance-managed
  • http://code.google.com/p/yahoo-finance-managed/

星期二, 1月 25, 2011

自己攪自己

#!/bin/sh

SKIP=`awk '/^#__ARCHIVE_FOLLOWS__/ { print NR }' $0`
OFFSET=`head -n $SKIP $0 | wc -c`

echo SKIP=$SKIP
dd if=$0 ibs=${OFFSET} skip=1 of=x
md5sum x
exit 0;
#__ARCHIVE_FOLLOWS__