diff options
author | Stephen Wong <stephen.kf.wong@gmail.com> | 2019-04-05 06:16:53 +0000 |
---|---|---|
committer | Stephen Wong <stephen.kf.wong@gmail.com> | 2019-04-05 06:19:29 +0000 |
commit | a6b206419a48302b2dad181121420d59a3fc7273 (patch) | |
tree | ba1cf38a66f2ca180d85346e8ee45297bea042cc /clover/clovisor/clovisor_main.go | |
parent | 3f86a3d611f4d2a4f21d9be2a2284ccf120db36e (diff) |
Clovisor ONS demo related fixes
Change-Id: I9449ee5f699a3cdf471dc8b405de650325ae09f6
Signed-off-by: Stephen Wong <stephen.kf.wong@gmail.com>
Diffstat (limited to 'clover/clovisor/clovisor_main.go')
-rw-r--r-- | clover/clovisor/clovisor_main.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clover/clovisor/clovisor_main.go b/clover/clovisor/clovisor_main.go index e235c50..b8e6508 100644 --- a/clover/clovisor/clovisor_main.go +++ b/clover/clovisor/clovisor_main.go @@ -9,8 +9,10 @@ package main import ( "fmt" + "io/ioutil" "os" "os/signal" + "path/filepath" "syscall" clovisor "./libclovisor" @@ -21,6 +23,23 @@ var podMonitoringMap map[string]*clovisor.ClovisorBCC func main() { node_name := os.Getenv("MY_NODE_NAME") + ex, err := os.Executable() + if err != nil { + fmt.Println(err.Error()) + } else { + exPath := filepath.Dir(ex) + fmt.Printf("Current Working Directory is %v\n", exPath) + files, _ := ioutil.ReadDir(exPath) + for _, f := range files { + fmt.Printf("%v ",f.Name()) + } + fmt.Printf("\n") + } + + clovisor.Monitor_proto_plugin_cfg() + + clovisor.ClovisorPhyInfSetup() + podMonitoringMap = make(map[string]*clovisor.ClovisorBCC) clovisor_k8s_client, err := clovisor.K8s_client_init(node_name) |