2009年11月18日 星期三

2009年11月16日 星期一

core dump analysis

In Getting a backtrace from a coredump, it shows the tools for getting backtraces from coredumps.

Recently, my stuff asks me what is the procedure to get the reason that a program generates coredump in an AIX 5.3 machine.

# dbx <program generates="" the="" coredump=""> <coredump file="">

then the reason will be shown and which function/line generates the coredump.


Here is another post that show similar information.
It is interesting for me.
So I get involved to study whether to get such information in various platform.

btw, is there any tool to show such information in various platform ?

2009年10月30日 星期五

network access control

Network Access Control

FreeNAC
netpass
PacketFence
HUPnet
NetReg
RINGS

VPN - by IPSEC

Build an IPSEC VPN without Losing Your Mind show a sample to build VPN by IPSEC.

A tutorial is shown in Openswan's wiki

btw, OpenSwan is a fork of FreeS/WAN which is no longer in active development.

2009年10月23日 星期五

Ext2 disk driver on Windows

Ext2Fsd Project
Tools and utilities for Windows

AMF - Action Message Format

More and more web pages embedded flash to do complicated task.
e.g. the hottest facebook farm game.

I just wonder how messages are exchanged in HTTP protocol level.
After track down the traffics, there is a lot of AMF payload in HTTP body.
I would like to do something to remove weed/pest automatically.
And it is necessary to understand the AMF first.

Action Message Format in Wikipedia

AMF - Gnash Project Wiki show information and library for this.

OSFlash - Open Source Flash also shows the information/code for this.

Google App Engine -- PyAMF - AMF for Python

amfast - Flash remoting framework for Python - it is easy to use its AMF Encoder/Decoder.
The same author also have a few document on this topic.

logical volume, snapshot and db backup

Recently, I get the chance to review the usage of the snapshot of a file-system.

In Linux, only logical volume supports this feature. Btrfs is also documented to support this feature.
In AIX, JFS supports snapshot. (But there is no document mention this in Linux's implementation)
In Solaris, ZFS directly support this. (ZFS provide logical volume management, raid management etc). UFS also supports this.

Logical Volume Snapshots - shows information on this topic.

So, is it possible use the snapshot feature to back up a database ?
Yes, it is possible in limited condition.

Here is the reference
PostgreSQL 8.3.8 Documentation Chapter 24. Backup and Restore 24.2. File System Level Backup - list the pros and cons of this.

MySQL Volume Snapshot for Backup also shows the similar information on this topic.

In short, if you want to use this feature, all files must be in the same filesystem/logical volume.
And this may take a long time to complete the job.

google map

google map for local search - interesting.
It create a really large map.


Google Geo Developers Blog - list many use cases.

[採訪]Google地圖新增5大縣市大眾交通工具路線規劃 - Mobile01 討論群組

geocode service on the Internet

Geocoding & Reverse Geocoding Links - list useful links for this


Yahoo! Maps Web Services - Geocoding API - the limit is 5000 per day per ip.

FAQ - Google Map API - the limit is 15000 per day per ip.

Geocoding Addresses with PHP/MySQL - gives code to run geocoding in batch mode and through Google HTTP Geocoding Service.

Geocoder | Android Developers - list java class that support geocoding in Android.

Android Developers Blog - something about Android.

login a server without password in ssh environment

memo down interesting thing here. More Linux Remote Networking Tips and Tricks (part 2)

Here is the assumption:
SERVER - where the sshd is running
CLIENT - where the ssh is running


1. configure SERVER's sshd to accept encryption keys login, not only password logins.

in SERVER's /etc/ssh/sshd_config, enable following config line

RSAAuthentication yes
PubkeyAuthentication yes

then , ask sshd to read the config file again by sending SIGHUP to the running sshd

2. create encryption keys in CLIENT's.

# cd ~/.ssh
# ssh-keygen -t rsa -f user_SERVER
ssh-keygen -t rsa -f root_ora1
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in user_SERVER.
Your public key has been saved in user_SERVER.pub.
The key fingerprint is:
ea:3b:de:02:b6:38:d6:c5:9e:1a:68:fa:e7:64:50:35 user@CLIENT

3. install the public key to SERVER
# cd ~/.ssh
# ssh-copy-id -i user_SERVER user@SERVER
0
user@SERVER's password:
Now try logging into the machine, with "ssh 'user@SERVER'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.


4. create alias to save the typing.

# alias 2SERVER='ssh -i ~/.ssh/user_SERVER user@SERVER'

And you can run 2SERVER to login SERVER as user now.

2009年9月3日 星期四

PIX emulator

PEMU - PIX Emulator

WinCE information

Windows CE 5.0 in MSDN
Windows CE 6.0 in MSDN

Sting's - Process Explorer for WinCE
Sting's - 嵌入式系統開發經驗談
Sting's - Windows CE 分類
Sting's - 如何製作支持 VMWare 的 Windows CE BSP

Windows CE/Windows Mobile Versions

SQL Server - SQL Injection

SQL Injection

SQL Server - 2005 output Clause

OUTPUT Clase (Transact-SQL)

colinux information

Building a custom kernel

Blackfin Linux Docs - installation, configuration, building the colinux installer etc.

coLinux gets its second wind

Ulteo Virtual Desktop - A full Linux system that integrates nicely into Windows.

Wubi is an officially supported Ubuntu installer for Windows users that can bring you to the Linux world with a single click. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Are you curious about Linux and Ubuntu? Trying them out has never been easier!

liveusb-creator - a cross-platform tool for easily installing live operating systems on to USB flash drives.

virtual machine tools

Virt Manager 0.8 sports new cloning, management wizards

Virutal machine Manager - Initially Xen was the primary platform supported, however, since libvirt 0.2.0 and virt-manager 0.3.1 it is possible to manage QEMU and KVM guests too. It is expected that support for additional hypervisors / virtualization products will expand even further over time as additional libvirt drivers are written.


VMXBuilder provides tools to manage VMWare. e.g. create .vmx files, VMware DiskManager etc.

VM Back - Virtualization Tricks and Tools.

Virtual Disk Driver - With VDK you can mount a VMware virtual disk to your Windows hosts and use them as another disk drive attached to your system.

Virtualizing 64-bit Guest on 32-bit Hosts

SQL Server - VARCHAR(MAX)

Understanding VARCHAR(MAX) in SQL Server 2005

Frequently Asked Questions - SQL Server 2005 - VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX)

python framework

Pythomnic3k is a Python 3.0 framework for rapid development of network services in SOA, EAI integration middleware and distributed applications.

Twisted is a event-driven networking engine written in Python and licensed under the MIT license.

2009年7月10日 星期五

sms handling

SMS and the PDU format
Short Message Service / SMS Tutorial
Series: Sending out an SMS
Monkeys & Robots » Python code to decode SMS PDU

GSM 03.38 Encoding for Python 2.4 get 160 characters per SMS, but a reduced set of characters. the idea is to choose the GSM 03.38 encoding, convert Greek characters into unicode, then map unicode into GSM 03.38 characters (7-bits only). Encoding these 7-bit GSM 03.38 characters.

Free Tutorials and Articles. Learn SMS, WML, WMLScript, WAP 2.0, XHTML MP, WCSS/WAP CSS

2009年6月11日 星期四

javascript compressor

ShrinkSafe
JSMin
Packer
YUI Compressor

svg converter

UniConverter is a universal vector graphics translator. It is a command line tool which uses sK1 object model to convert one format to another.

pyjamas, Raphaël and GMap

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web.

pyjamas is a stand-alone python to javascript compiler, an AJAX framework / library and a Widget set API.

pyjamas + raphael.js for SVG drawing ?

pyjamas + jquery + google maps example

dojox.sketch A cross-browser drawing editor based on dojox.gfx.

Drawing with GFX

2009年5月22日 星期五

arm related documents/tools

arm.com's Documentation
GNU ARM toolchain
Martin THOMAS's ARM-Projects
Accessing ARM-Controllers with OpenOCD
OpenOCD - Open On-Chip-Debugger
OpenOCD's documentation - including JTAG hardware dongle, JTAG commands, GDB and OpenOCD, etc.

devkitPro - the toolchains of choice for homebrew game development, currently available for GameBoy Advance, GP32, Playstation Portable and GameCube. More platforms will be added as time permits.
devkitPro's files list in sourceforge.net - especially dswifi.

Building Bare-Metal ARM Systems with GNU


To read Part 1, go to What's need to get started.
To read Part 2, go to Startup code and the low level initialization
To read Part 3, go to The Linker Script.
To read Part 4, go to C and C++ compiler options
To read Part 5, go to Fine-tuning the application
To read Part 6, go to General description of interrupt handling
To read Part 7, go to Interrupt Locking and Unlocking
To read Part 8, go to Low-level Interrupt Wrapper Functions.
To read Part 9 go to C-Level ISRs and Other ARM Exceptions
To read Part 10 go to Test Strategies


To download Zip files with the C and C++ source code associated with this article series, go to Embedded.com's Downloadable Code page, or to Blinky for C and Blinky for C++.

2009年5月20日 星期三

zeroshell

Zeroshell is a small Linux distribution for servers and embedded devices aimed at providing the main network services a LAN requires. It is available in the form of Live CD or Compact Flash image and you can configure and administer it using your web browser.

some tutorial from linuxplanet.com :
Turn an Old PC Into a Multi-Purpose LAN Server with ZeroShell (part 1)

Set up Secure Wireless With Zeroshell Linux (part 2)

Zeroshell Linux: Captive Portal, Internet Gateway and Router (part3)

quagga

Quagga is a routing software package that provides TCP/IP based routing services with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+ (see Supported RFC). Quagga also supports special BGP Route Reflector and Route Server behavior. In addition to traditional IPv4 routing protocols, Quagga also supports IPv6 routing protocols. With SNMP daemon which supports SMUX protocol, Quagga provides routing protocol MIBs (see SNMP Support).

Traditional routing software is made as a one process program which provides all of the routing protocol functionalities. Quagga takes a different approach. It is made from a collection of several daemons that work together to build the routing table. There may be several protocol-specific routing daemons and zebra the kernel routing manager.

2009年5月17日 星期日

PostgreSQL 的測試 - 4

繼續之前的測試, 這一次是 nb27 升級到 2.6.29.1, 及 postgresq-8.3.7.

測試環境及結果:

pc26
nb27
pc34
pc200
OS
2.6.9-34.EL 2.6.9-34 .ELsmp 2.6.9-34 .ELsmp2.6.9-42.0 .10.ELsmp2.6.29.1 #2 SMP
2.6.20-rc6 #1 SMP2.6.20-rc6 #1 SMP2.6.9-42.0 .10.ELsmp
2.6.9-55.ELsmp
python
2.3.4
2.3.4
2.3.4
2.3.4
PostgreSQL
8.1.8
8.1.4
8.2.3
8.2.3
8.3.7
8.1.8
8.2.38.2.3
8.2.3
PyGresSQL
3.8.1
3.8.1
3.8.1
3.8.1
CPU Intel(R) Pentium(R) 4 CPU 2.80GHz
512 KB Cache (5605.85)
Genuine Intel(R) CPU T2400 @ 1.83GHz
2048 KB Cache (1998.36)
(DualCore)
Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
4096 KB Cache (4819.82)
(DualCore)
Intel(R) Xeon(R) CPU 5140 @ 2.33GHz
4096 KB Cache (4657.86)
(DualCore x2)
RAM
1GB
1GB
2GB
4GB
duration
5:32:36
(22:39:05 - 04:11:41)
2:28:11
(16:33:14 - 19:01:25)
2:08:56
(15:11:55 - 17:20:51)
2:30:14
(17:47:33 - 20:17:48)
1:41:49 (15:59:31 - 17:41:12)
4:20:45
(22:40:28 - 03:01:13)
3:51:15

1:40:30
1:24:22 (09:42:26 - 11:06:42)
1:24:50
(noatime)
0:10:05
(noatime/ atime, noprint)
/0:10:17
0:48:35
(noatime, nohexdump)

(noatime,
print=time.ctime,
nohexdump)
average dur./call
19.956ms
8.891ms
7.737ms
9.015ms
6.109ms
15.605ms
13.876ms
6.030ms
5.062ms
5.091ms
0.605ms
0.617ms
2.915ms
1.636ms
min dur. /1000call
11.29sec
7.23sec
7.19sec
7.19sec
6.0842sec
4.54sec
4.54sec
5.26sec
4.963sec
4.971sec
0.566sec
0.565sec
2.854sec
1.566sec
max dur. /1000call
57.45sec
20.25sec
17.72sec
17.72sec
7.577sec
33.39sec
36.68sec
9.96sec
5.714sec
5.700sec
1.281sec
1.425sec

3.792sec
2.313sec
mean /1000call
19.956sec
8.891sec
7.737sec
9.015sec
6.109sec15.605sec
13.876sec
6.030sec
5.062sec5,091sec
0.605sec
0.617sec
2.915sec
1.636sec
std devi. /1000call
8.35sec
2.58sec
0.76sec
0.31sec
0.079sec
6.22sec
6.42sec
0.91sec
0.079sec
0.084sec
0.059sec
0.071sec
0.090sec
0.087sec


當 nb27 升級到 2.6.29.1/8.3.7 之後, 可以發現, 整個 performance 提升了不少. 且運作起來比較平順 (standard deviation 較小). 使得 nb27 /pc34 原本不是同一等級的機器, 但有了相同的表現.

也許 在 pc34 上的表現也更明顯, 有機會, 可以再試試.

2009年5月4日 星期一

useful site

Pank's blog

TuxArena

TuxArena - The Arena of Tux - Ubuntu and Debian articles, tutorials and news

2009年4月30日 星期四

DJMount

DJ Mount

djmount is a UPnP AV client. It mounts as a Linux filesystem the media content of compatible UPnP AV devices.
Djmount discovers automatically all UPnP AV Media Servers on the network, and make the content available in a directory tree. All shared files (e.g. Audio or Video files) are directly visible and can be played using your favorite media player.

TunaPie

TunaPie

TunaPie is a directory browser for Internet radio and TV streams. In theory it should work on any UNIX-based system. It has been tested on Linux and Max OS X. As of 0.9.6, it is compatible with the Icecast directory as well as the Shoutcast (winamp) stream directory service. Tunapie allows you to search for streams and then launch your audio player (XMMS) or NSV viewer (Mplayer) of choice. It also allows recording of audio and video streams using streamripper.

Savonet/Liquidsoap

Savonet/Liquidsoap

Savonet is a group of open-source developpers working on audio, with a focus on streaming and webradios. Savonet software is mainly written in OCaml. At the core of Savonet is Liquidsoap, the programming language that ties all the pieces together. Savonet also provides OCaml libraries to the open-source community, especially bindings of widespread C libraries such as Vorbis, Mad, Lame, Jack, ALSA, LADSPA, etc.

Liquidsoap
Liquidsoap is the audio stream generator of the Savonet project, notably used for generating the stream of netradios.

Some examples of what you can do using Liquidsoap:

  • static or dynamic playlists
  • time-based selection of the audio source
  • quota- or time-based insertions or mixes of jingles
  • live DJ interventions
  • interactive user requests
  • fully-customizable transitions, e.g. crossfading
  • speech-synthesis of track metadata
  • simple access to remote files
  • and much more!

igmpproxy

igmpproxy

IGMPproxy is a simple dynamic Multicast Routing Daemon using only IGMP signalling (Internet Group Management Protocol). It's intended for simple forwarding of Multicast traffic between networks.

2009年4月20日 星期一

find process name by pid

Solaris - read psinfo struc (refer proc man page)
AIX- Use getprocs() func
HP - Use pstat_getproc func.
Linux - cat /proc//cmdline, or "ps xw"

git

ihover
Git 版本控制系統 (1)
Github 分散式版本控制的殺手級應用

我愛 Git - 有效使用分散式版本控制系統 - jserv

Git Resources - Bieber Labs

2009年4月8日 星期三

2009年4月6日 星期一

2009年3月30日 星期一

How the Linux kernel works

How the Linux kernel works - a good tutorial for beginner.

Howto block DDOS attacks on Ubuntu

Howto block DDOS attacks on Ubuntu - this ariticle shows the usage of PASD .

What is PSAD ? quoted from its home page:
"psad is a collection of three lightweight system daemons (two main daemons and one helper daemon) that run on Linux machines and analyze iptables log messages to detect port scans and other suspicious traffic. A typical deployment is to run psad on the iptables firewall where it has the fastest access to log data. "

Other tools from the same host:
fwknop - Single Packet Authorization and Port Knocking.

fwsnort - Application Layer IDS/IPS with iptables.

2009年3月9日 星期一

shared library in AIX 5L

Shared library memory footprints on AIX 5L is a good start to understand the shared-library in AIX 5.

trace system calls in aix

follow this, for aix, there are other methods.

1. truss (aix 5L)
2. sctrace (other vendor)
3. ltrace
4. trace (or syscalls(5))