Skip to content

Commit

Permalink
Added a version flag to print the version of cAdvisor per google#329.
Browse files Browse the repository at this point in the history
  • Loading branch information
mindscratch committed Nov 26, 2014
1 parent a2fcb61 commit d5e9528
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cadvisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ var argPort = flag.Int("port", 8080, "port to listen")
var maxProcs = flag.Int("max_procs", 0, "max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores).")

var argDbDriver = flag.String("storage_driver", "", "storage driver to use. Empty means none. Options are: <empty> (default), bigquery, and influxdb")
var versionFlag = flag.Bool("version", false, "print cAdvisor version")

func main() {
defer glog.Flush()
flag.Parse()

if *versionFlag {
fmt.Printf("cAdvisor version %s\n", info.VERSION)
os.Exit(0)
}

setMaxProcs()

storageDriver, err := NewStorageDriver(*argDbDriver)
Expand Down

0 comments on commit d5e9528

Please sign in to comment.