@Override
            public void run() {
                try {
                    while (true) {
                        final Process finalProcess = Runtime.getRuntime().exec(command);
                        BufferedReader reader;
                        reader = new BufferedReader(new InputStreamReader(finalProcess.getInputStream()));
                        String line;
                        Long time = (new Date()).getTime();
                        double currentPmemUsage = 0.0;
                        int cpuUsagePercentPerCore = 0;
                        while ((line = reader.readLine()) != null) {
                            String[] topInfo = StringUtils.split(line.trim(), ' ');
                            if (topInfo.length > 0 && topInfo[1].toLowerCase().equals("root")) {
                                if (topInfo[5].trim().contains("g")) {
                                    currentPmemUsage += Double.parseDouble(
                                            topInfo[5].trim().split("g")[0].trim());
                                } else if (topInfo[5].trim().contains("m")) {
                                    currentPmemUsage += Double.parseDouble(topInfo[5]
                                                    .trim()
                                                    .split("g")[0]
                                                    .trim())
                                            / 1024.0;
                                } else {
                                    currentPmemUsage += Double.parseDouble(topInfo[5].trim()) / 1024.0 / 1024.0;
                                }
                                cpuUsagePercentPerCore += (int) Double.parseDouble(topInfo[8].trim());
                            }
                        }
                        if (cpuUsagePercentPerCore < 0) {
                            cpuUsagePercentPerCore = 0;
                        }
                        if (currentPmemUsage < 0.0) {
                            currentPmemUsage = 0.0;
                        }
                        List memPoint = new ArrayList();
                        List utilPoint = new ArrayList();
                        memPoint.add(time);
                        memPoint.add(currentPmemUsage);
                        utilPoint.add(time);
                        utilPoint.add(cpuUsagePercentPerCore);
                        cpuMetrics.put("CPUMEM", memPoint);
                        cpuMetrics.put("CPUUTIL", utilPoint);
                        Utilities.sleep(1000);
                    }
                } catch (Exception e) {
                    LOG.warn("Exception in thread docker stats stdoutRedirectThread");
                    e.printStackTrace();
                }
            }
Return the number of cpu vcores assigned

@return
core/src/main/java/net/qihoo/hbox/container/ContainerReporter.java