Beispiel #1
0
func Start() {
	// check data dir
	dataDir := g.Config().RRD.Storage
	if err := file.EnsureDirRW(dataDir); err != nil {
		log.Fatalln("rrdtool.Start error, bad data dir", dataDir+",", err)
	}
	log.Println("rrdtool.Start, ok")
}
Beispiel #2
0
func Start() {
	cfg := g.Config()
	var err error
	// check data dir
	if err = file.EnsureDirRW(cfg.RRD.Storage); err != nil {
		log.Fatalln("rrdtool.Start error, bad data dir "+cfg.RRD.Storage+",", err)
	}

	migrate_start(cfg)

	// sync disk
	go syncDisk()
	go ioWorker()
	log.Println("rrdtool.Start ok")
}