public static String exeCmd(String cmd) {
		log.info("execute cmd : " + cmd);
		InputStream inputStream = null;
		InputStream errorStream = null;
		OutputStream outputStream = null;
		String str = null;
		String error = null;
		try {
			Process process = Runtime.getRuntime().exec(cmd);
//			int ret = process.waitFor();
			inputStream = process.getInputStream();
			errorStream = process.getErrorStream();
			outputStream = process.getOutputStream();
			
//			if (process.exitValue()==0) {// normal exit
	            BufferedInputStream in = new BufferedInputStream(inputStream);  
	            BufferedReader inBr = new BufferedReader(new InputStreamReader(in));  
	            StringBuilder sb = new StringBuilder();
	            String lineStr;
	            while ((lineStr = inBr.readLine()) != null){  
	                sb.append(lineStr);  
	            }
	            str = sb.toString();
//			}else{
				in = new BufferedInputStream(errorStream);  
				inBr = new BufferedReader(new InputStreamReader(in));  
				sb = new StringBuilder();
//				String lineStr;
	            while ((lineStr = inBr.readLine()) != null){  
	            	sb.append(lineStr);  
	            }
	            error = sb.toString();
	            log.error("execute cmd error : " + error);
//			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (inputStream != null) {
				try {
					inputStream.close();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			if (errorStream != null) {
				try {
					errorStream.close();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			if (outputStream != null) {
				try {
					outputStream.close();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
		return str;
	}