2015年10月1日 星期四

2015年9月21日 星期一

Syslog under Ubuntu

vi /etc/rsyslog.conf

#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf

2015年7月29日 星期三

How to check the EEPROM in Intel X520.

1. Go to IBL to download the latest Intel® Network Connections Tools

2. Boot to DOS, then execute lanconf.exe in the dos/svtools/

3. Select Flash/EEPROM, and choice Raw EEPROM.

2015年7月1日 星期三

Enable UART4 in AST2500

mw 1e6e2000 1688a8a8

mw 1e6e200c e1c47e80

mw 1e78f00c 93

mw 1e78f00c 27 //Baudrate 38400 (divisor =13x3=39=27h)

mw 1e78f00c 13

mw 1e78f000 45 //output 'D'

2015年6月2日 星期二

[Linux]HZ, jiffies and tick

HZ: total timer interrupts per second.
tick: 1/HZ, the time for each timer interrupt.
jiffies: total ticks from Linux boot.

Do something after 1 second, e.g. kernel timer
jiffies + (1 second)/ticks = jiffies + HZ


2015年5月25日 星期一

2015年5月13日 星期三

Simple Linux Socket example

I would like to send the UDP packet carries the syslog payload.

#include the below head file
sys/socket.h
linux/sockios.h
fcntl.h
netdb.h
netinet/ether.h
netpacket/packet.h
net/if.h