func main() {
	defer func() {
		if x := recover(); x != nil {
			log.Println("caught panic in main()", x)
		}
	}()
	config := cfg.Get()
	if config["stats_log"] != "" {
		cfg.StartLogger(config["stats_log"])
	}
	log.Println("Starting Stats Server")
	go SignalProc()
	go SysRoutine()
	service := DEFAULT_SERVICE
	if config["stats_service"] != "" {
		service = config["stats_service"]
	}
	log.Println("Stats Service:", service)
	udpAddr, err := net.ResolveUDPAddr("udp", service)
	checkError(err)
	udpconn, err := net.ListenUDP("udp", udpAddr)
	checkError(err)
	log.Println("Stats Server OK.")
	handleClient(udpconn)
}
----------------------------------------------- Stats Server start
package main
import (
	"log"
	"net"
	"os"
	"strconv"
)
import (
	"cfg"
)
const (
	DEFAULT_SERVICE = ":8891"
)