Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d258f645f | ||
|
|
492050c0ea | ||
|
|
aebc5f8718 | ||
|
|
76f6fa284d | ||
|
|
48e8a81442 | ||
|
|
48966d406c | ||
|
|
1dfcb42efe | ||
|
|
1a5f97d11d | ||
|
|
be4890a108 | ||
|
|
aaab21e98c | ||
|
|
607a04b995 | ||
|
|
a2d6943a22 | ||
|
|
3773c6e2e3 | ||
|
|
4e1c230d88 | ||
|
|
2aa74c2eb9 | ||
|
|
f4ae72e55c |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
/bin
|
||||||
|
=======
|
||||||
|
/bin/
|
||||||
|
>>>>>>> refs/heads/master
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
log4j.rootLogger = debug,stdout,logfile
|
|
||||||
|
|
||||||
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.stdout.layout.ConversionPattern = %d %p [%c] [%t] - <%m>%n
|
|
||||||
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
|
|
||||||
|
|
||||||
#----------------------debug---------------------
|
|
||||||
|
|
||||||
log4j.appender.logfile = org.apache.log4j.RollingFileAppender
|
|
||||||
log4j.appender.logfile.MaxFileSize = 50MB
|
|
||||||
log4j.appender.logfile.MaxBackupIndex = 20
|
|
||||||
|
|
||||||
log4j.appender.logfile.File = ./nc_logs/nmsclient.log
|
|
||||||
log4j.appender.logfile.layout.ConversionPattern = %d %p [%c] [%t] - <%m>%n
|
|
||||||
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# --- set default value
|
# --- set default value
|
||||||
DEFAULT_DATA_DIR="/home/nms/nmsdata"
|
DEFAULT_DATA_DIR="/home/ceiec/nms/nmsdata"
|
||||||
DEFAULT_INSTALL_DIR="/home/nms/nmsclient"
|
DEFAULT_INSTALL_DIR="/home/ceiec/nms/nmsclient"
|
||||||
|
|
||||||
# --- set install dir
|
# --- set install dir
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
@@ -46,10 +46,10 @@ fi
|
|||||||
# --- install jdk
|
# --- install jdk
|
||||||
cd "$INSTALL_DIR"/..
|
cd "$INSTALL_DIR"/..
|
||||||
NMS_JDK="$(pwd)/nmsjdk"
|
NMS_JDK="$(pwd)/nmsjdk"
|
||||||
JDK_DIR="$(pwd)/jdk1.7.0_80"
|
JDK_DIR="$(pwd)/jre1.7.0_80"
|
||||||
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jdk-7u80-linux-i586.tar.gz"
|
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jre-7u80-linux-i586.tar.gz"
|
||||||
if [ "`uname -i`" = "x86_64" ];then
|
if [ "`uname -i`" = "x86_64" ];then
|
||||||
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jdk-7u80-linux-x64.tar.gz"
|
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jre-7u80-linux-x64.tar.gz"
|
||||||
fi
|
fi
|
||||||
if [ $install_jdk = 1 ]
|
if [ $install_jdk = 1 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# --- set default value
|
# --- set default value
|
||||||
DEFAULT_DATA_DIR="/home/nms/nmsdata"
|
DEFAULT_DATA_DIR="/home/ceiec/nms/nmsdata"
|
||||||
DEFAULT_INSTALL_DIR="/home/nms/nmsclient"
|
DEFAULT_INSTALL_DIR="/home/ceiec/nms/nmsclient"
|
||||||
|
|
||||||
# --- set install dir
|
# --- set install dir
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
@@ -55,10 +55,10 @@ fi
|
|||||||
# --- install jdk
|
# --- install jdk
|
||||||
cd "$INSTALL_DIR"/..
|
cd "$INSTALL_DIR"/..
|
||||||
NMS_JDK="$(pwd)/nmsjdk"
|
NMS_JDK="$(pwd)/nmsjdk"
|
||||||
JDK_DIR="$(pwd)/jdk1.7.0_80"
|
JDK_DIR="$(pwd)/jre1.7.0_80"
|
||||||
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jdk-7u80-linux-i586.tar.gz"
|
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jre-7u80-linux-i586.tar.gz"
|
||||||
if [ "`uname -i`" = "x86_64" ];then
|
if [ "`uname -i`" = "x86_64" ];then
|
||||||
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jdk-7u80-linux-x64.tar.gz"
|
JDK_BIN_FILE=$CUR_PRGDIR"/jre_install/jre-7u80-linux-x64.tar.gz"
|
||||||
fi
|
fi
|
||||||
if [ $install_jdk = 1 ]
|
if [ $install_jdk = 1 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -21,8 +21,18 @@
|
|||||||
# resolve links - $0 may be a softlink
|
# resolve links - $0 may be a softlink
|
||||||
PRG="$0"
|
PRG="$0"
|
||||||
|
|
||||||
#OS_TYPE=$( lsb_release -d| cut -d: -f2| cut -f2 )
|
if [ -f /etc/redhat-release ]; then
|
||||||
#echo $OS_TYPE
|
OS_TYPE=`cat /etc/redhat-release`
|
||||||
|
else
|
||||||
|
islsb=`which lsb_release | wc -l`
|
||||||
|
if [ "$islsb" != "0" ]; then
|
||||||
|
OS_TYPE=$( lsb_release -d| cut -d: -f2| cut -f2 )
|
||||||
|
else
|
||||||
|
OS_TYPE=`uname -a | awk '{print $1" "$2" "$3}'`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo $OS_TYPE
|
||||||
|
|
||||||
while [ -h "$PRG" ]; do
|
while [ -h "$PRG" ]; do
|
||||||
ls=`ls -ld "$PRG"`
|
ls=`ls -ld "$PRG"`
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
@@ -185,6 +195,17 @@ if [ "$1" = "start" ] ; then
|
|||||||
fi
|
fi
|
||||||
handleTask
|
handleTask
|
||||||
fi
|
fi
|
||||||
|
elif [ "$1" = "boot-up" ]; then
|
||||||
|
#设置开机自启动
|
||||||
|
if [ -z "$(cat /etc/rc.local|grep -E "^\s*$NMSCLEINT_HOME/shell/startup.sh")" ]
|
||||||
|
then
|
||||||
|
echo "">> /etc/rc.local
|
||||||
|
echo "########## nmsclient开机启动 ###########" >> /etc/rc.local
|
||||||
|
echo $NMSCLEINT_HOME"/shell/startup.sh" >> /etc/rc.local
|
||||||
|
echo "Boot-up settings complete!"
|
||||||
|
else
|
||||||
|
echo "Boot-up has been set up without modification."
|
||||||
|
fi
|
||||||
elif [ "$1" = "stop" ]; then
|
elif [ "$1" = "stop" ]; then
|
||||||
getPid
|
getPid
|
||||||
if [ -n "$proc_id" ]
|
if [ -n "$proc_id" ]
|
||||||
|
|||||||
@@ -112,6 +112,14 @@ public class NmsClient{
|
|||||||
AlarmUtil.sendNMSErrorMsg(ErrorCode.DeamonNotExist, Utils.getLocalIp(), "i18n_client.NmsClient.ncDeamonStartException_n81i," + e.getMessage());
|
AlarmUtil.sendNMSErrorMsg(ErrorCode.DeamonNotExist, Utils.getLocalIp(), "i18n_client.NmsClient.ncDeamonStartException_n81i," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
int sleep = (int)(1+Math.random()*Contants.STARTUP_SLEEP_SECOND);
|
||||||
|
logger.debug(String.format("startup sleep %ss", sleep));
|
||||||
|
Thread.sleep(sleep*1000);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("",e);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相关业务操作入口
|
* 相关业务操作入口
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -421,7 +421,8 @@ public class Common {
|
|||||||
if (os.startsWith("Windows")) {
|
if (os.startsWith("Windows")) {
|
||||||
command = scriptFile.getCanonicalPath();
|
command = scriptFile.getCanonicalPath();
|
||||||
} else if (os.startsWith("Linux")) {
|
} else if (os.startsWith("Linux")) {
|
||||||
command = "./ " + scriptFile.getCanonicalFile();
|
// command = "./ " + scriptFile.getCanonicalFile();
|
||||||
|
command = scriptFile.getCanonicalPath();
|
||||||
}
|
}
|
||||||
setInfo.setProcessPath(command); // 设置执行命令
|
setInfo.setProcessPath(command); // 设置执行命令
|
||||||
setInfo.setProcessSearchKeyCode(scriptFile.getName()); // 搜索关键字
|
setInfo.setProcessSearchKeyCode(scriptFile.getName()); // 搜索关键字
|
||||||
|
|||||||
@@ -135,6 +135,16 @@ public class Contants {
|
|||||||
public static final int DATA_SEND_THREAD_PORT;
|
public static final int DATA_SEND_THREAD_PORT;
|
||||||
//主动数据上报间隔 INTERVAL,单位 10 S
|
//主动数据上报间隔 INTERVAL,单位 10 S
|
||||||
public static final int DATA_SEND_THREAD_INTERVAL;
|
public static final int DATA_SEND_THREAD_INTERVAL;
|
||||||
|
/**
|
||||||
|
* 启动时最大 暂停时间,为了缓解一次启动多个nc ,dc无法处理的情况
|
||||||
|
* 默认:10s
|
||||||
|
*/
|
||||||
|
public static final int STARTUP_SLEEP_SECOND;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否CPU監測信息性能描述顯示詳細每一核的信息
|
||||||
|
*/
|
||||||
|
public static final boolean DESC_CPU_DETAIL;
|
||||||
|
|
||||||
static{
|
static{
|
||||||
SYSTEM_PATH = SysConfig.getSystemDir();
|
SYSTEM_PATH = SysConfig.getSystemDir();
|
||||||
@@ -244,8 +254,15 @@ public class Contants {
|
|||||||
DATA_SEND_THREAD_PORT = SysConfig.getIntegerVal("data.send.thread.port", "9527");
|
DATA_SEND_THREAD_PORT = SysConfig.getIntegerVal("data.send.thread.port", "9527");
|
||||||
//主动数据上报间隔 INTERVAL,单位 10 S
|
//主动数据上报间隔 INTERVAL,单位 10 S
|
||||||
DATA_SEND_THREAD_INTERVAL = SysConfig.getIntegerVal("data.send.thread.interval", "10");
|
DATA_SEND_THREAD_INTERVAL = SysConfig.getIntegerVal("data.send.thread.interval", "10");
|
||||||
|
/*
|
||||||
|
* 启动时最大 暂停时间,为了缓解一次启动多个nc ,dc无法处理的情况
|
||||||
|
* 单位:s
|
||||||
|
*/
|
||||||
|
STARTUP_SLEEP_SECOND = SysConfig.getIntegerVal("startup.sleep.second", "60");
|
||||||
|
/**
|
||||||
|
* 1:cpu desc info contain each cpu core,0:no contain
|
||||||
|
*/
|
||||||
|
DESC_CPU_DETAIL = (SysConfig.getIntegerVal("desc.cpu.detail", "0")==1);
|
||||||
// 初始化创建文件夹
|
// 初始化创建文件夹
|
||||||
if(!new File(localDetecConfPath).exists()){
|
if(!new File(localDetecConfPath).exists()){
|
||||||
new File(localDetecConfPath).mkdirs();
|
new File(localDetecConfPath).mkdirs();
|
||||||
@@ -271,6 +288,7 @@ public class Contants {
|
|||||||
if(!new File(localTempDataIncomingPath).exists()){
|
if(!new File(localTempDataIncomingPath).exists()){
|
||||||
new File(localTempDataIncomingPath).mkdirs();
|
new File(localTempDataIncomingPath).mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String formatPath(String path){
|
private static String formatPath(String path){
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import com.nis.nmsclient.thread.task.TaskReqHandle;
|
|||||||
import com.nis.nmsclient.util.DateUtil;
|
import com.nis.nmsclient.util.DateUtil;
|
||||||
import com.nis.nmsclient.util.FileUtil;
|
import com.nis.nmsclient.util.FileUtil;
|
||||||
import com.nis.nmsclient.util.FileWrUtil;
|
import com.nis.nmsclient.util.FileWrUtil;
|
||||||
|
import com.nis.nmsclient.util.ProcessUtil;
|
||||||
import com.nis.nmsclient.util.Utils;
|
import com.nis.nmsclient.util.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -203,7 +204,7 @@ public class SSLServer implements Runnable {
|
|||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
this.bpReceiveFileByBath(pluginDir.getCanonicalPath());
|
this.bpReceiveFileByBath(pluginDir.getCanonicalPath());
|
||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
|
ProcessUtil.permit(777, pluginDir);//赋予执行权限
|
||||||
} else if(SERVER_FILE_PUSH.equalsIgnoreCase(msg)){//任务操作:文件推送
|
} else if(SERVER_FILE_PUSH.equalsIgnoreCase(msg)){//任务操作:文件推送
|
||||||
this.sendMessageByChar(SUCCESS);
|
this.sendMessageByChar(SUCCESS);
|
||||||
String str = this.receiveMessageByChar();
|
String str = this.receiveMessageByChar();
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ public class GzipUtil {
|
|||||||
descFile.mkdirs();
|
descFile.mkdirs();
|
||||||
}
|
}
|
||||||
if(!descFile.isDirectory()){
|
if(!descFile.isDirectory()){
|
||||||
throw new Exception("compress destination path is not a directory");
|
// throw new Exception("compress destination path is not a directory");
|
||||||
|
descFile=descFile.getParentFile();
|
||||||
|
destDir=descFile.getAbsolutePath();
|
||||||
}
|
}
|
||||||
String tarFile = srcFile.getParent() + File.separator + srcFile.getName().substring(0, srcFile.getName().length()-3);
|
String tarFile = srcFile.getParent() + File.separator + srcFile.getName().substring(0, srcFile.getName().length()-3);
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|||||||
@@ -121,8 +121,10 @@ public class SystemInfo
|
|||||||
sb.append(cpuInfos[i].getMhz());// 主频
|
sb.append(cpuInfos[i].getMhz());// 主频
|
||||||
detectInfo.getDetailDatas().add(sb.toString().replace("%", ""));
|
detectInfo.getDetailDatas().add(sb.toString().replace("%", ""));
|
||||||
// sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " 主频" + cpuInfos[i].getMhz() + "MHz,使用率 "
|
// sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " 主频" + cpuInfos[i].getMhz() + "MHz,使用率 "
|
||||||
sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " i18n_client.SystemInfo.mhz_n81i" + cpuInfos[i].getMhz() + "MHz,i18n_client.SystemInfo.shiyonglv_n81i "
|
if(Contants.DESC_CPU_DETAIL) {
|
||||||
+ CpuPerc.format(cpuList[i].getCombined()) + "; ");
|
sb2.append(Contants.DETEC_STATE_INFO_FORMATE_POINT+"cpu" + i + " i18n_client.SystemInfo.mhz_n81i" + cpuInfos[i].getMhz() + "MHz,i18n_client.SystemInfo.shiyonglv_n81i "
|
||||||
|
+ CpuPerc.format(cpuList[i].getCombined()) + "; ");
|
||||||
|
}
|
||||||
|
|
||||||
// CPU总体信息情况
|
// CPU总体信息情况
|
||||||
userCpuPerc += cpuList[i].getUser();// 用户使用率累加
|
userCpuPerc += cpuList[i].getUser();// 用户使用率累加
|
||||||
@@ -188,15 +190,18 @@ public class SystemInfo
|
|||||||
// a)物理内存信息
|
// a)物理内存信息
|
||||||
Mem mem = sigar.getMem();
|
Mem mem = sigar.getMem();
|
||||||
Long memTotal = mem.getTotal();// 内存总量
|
Long memTotal = mem.getTotal();// 内存总量
|
||||||
Long memUsed = mem.getUsed();// 当前内存使用量
|
//Long memUsed = mem.getUsed();// 当前内存使用量
|
||||||
Long memFree = mem.getFree();// 当前内存剩余量
|
//Long memFree = mem.getFree();// 当前内存剩余量
|
||||||
|
Long memFree = mem.getActualFree();//
|
||||||
|
Long memUsed = mem.getActualUsed();
|
||||||
sb.append(doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2));// 内存总量,单位:"G"
|
sb.append(doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2));// 内存总量,单位:"G"
|
||||||
sb.append(SEPARATOR);
|
sb.append(SEPARATOR);
|
||||||
sb.append(doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2));// 当前内存使用量,单位:"G"
|
sb.append(doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2));// 当前内存使用量,单位:"G"
|
||||||
sb.append(SEPARATOR);
|
sb.append(SEPARATOR);
|
||||||
sb.append(doubleFormat(memFree / (1024 * 1024 * 1024.0), 2));// 当前内存剩余量,单位:"G"
|
sb.append(doubleFormat(memFree / (1024 * 1024 * 1024.0), 2));// 当前内存剩余量,单位:"G"
|
||||||
sb.append(SEPARATOR);
|
sb.append(SEPARATOR);
|
||||||
sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率
|
sb.append(doubleFormat(mem.getUsedPercent(), 1));// 内存使用率
|
||||||
|
// sb.append(doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1));// 内存使用率
|
||||||
|
|
||||||
StringBuffer sb2 = new StringBuffer();
|
StringBuffer sb2 = new StringBuffer();
|
||||||
// sb2.append("内存总大小: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, 现使用:"
|
// sb2.append("内存总大小: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, 现使用:"
|
||||||
@@ -206,7 +211,7 @@ public class SystemInfo
|
|||||||
sb2.append("i18n_client.SystemInfo.memerySize_n81i: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.currentUsed_n81i:"
|
sb2.append("i18n_client.SystemInfo.memerySize_n81i: " + doubleFormat(memTotal / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.currentUsed_n81i:"
|
||||||
+ doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.spaceRemain_n81i:"
|
+ doubleFormat(memUsed / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.spaceRemain_n81i:"
|
||||||
+ doubleFormat(memFree / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.shiyonglv_n81i:"
|
+ doubleFormat(memFree / (1024 * 1024 * 1024.0), 2) + "G, i18n_client.SystemInfo.shiyonglv_n81i:"
|
||||||
+ doubleFormat(((memTotal - memFree) * 100.0) / memTotal, 1) + "%");
|
+ doubleFormat(mem.getUsedPercent(), 1) + "%");
|
||||||
|
|
||||||
detectInfo.getDetailDatas().add(sb.toString());
|
detectInfo.getDetailDatas().add(sb.toString());
|
||||||
detectInfo.setDescInfo(sb2.toString());
|
detectInfo.setDescInfo(sb2.toString());
|
||||||
|
|||||||
@@ -207,6 +207,7 @@ public class GetInfoRun implements Runnable{
|
|||||||
totalData[index++] = StringUtils.isBlank(functionSb.toString())?detectInfo.getDescInfo():functionSb.toString();// 性能数据
|
totalData[index++] = StringUtils.isBlank(functionSb.toString())?detectInfo.getDescInfo():functionSb.toString();// 性能数据
|
||||||
|
|
||||||
List<String[]> dataList = new LinkedList<String[]>();
|
List<String[]> dataList = new LinkedList<String[]>();
|
||||||
|
logger.debug("write csv data:"+Arrays.toString(totalData));
|
||||||
// 总数据
|
// 总数据
|
||||||
dataList.add(totalData);
|
dataList.add(totalData);
|
||||||
// 详细信息
|
// 详细信息
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ public class NewPluginResultMerge {
|
|||||||
|
|
||||||
String checkDelayTime = lines.get(0)[0];// 检测时延(秒)
|
String checkDelayTime = lines.get(0)[0];// 检测时延(秒)
|
||||||
String checkTimes = lines.get(0)[1]; // 尝试次数
|
String checkTimes = lines.get(0)[1]; // 尝试次数
|
||||||
|
if(lines.get(0).length>3){
|
||||||
|
checkTimes = lines.get(0)[7]; // 尝试次数
|
||||||
|
}
|
||||||
String detectInfo = lines.get(0)[2]; // 状态信息(描述信息)
|
String detectInfo = lines.get(0)[2]; // 状态信息(描述信息)
|
||||||
StringBuffer functionSb = new StringBuffer(); // 性能数据
|
StringBuffer functionSb = new StringBuffer(); // 性能数据
|
||||||
|
|
||||||
@@ -244,7 +247,7 @@ public class NewPluginResultMerge {
|
|||||||
totalData[index++] = totalStatus + "";// 执行状态是否成功是否正常
|
totalData[index++] = totalStatus + "";// 执行状态是否成功是否正常
|
||||||
totalData[index++] = detectInfo; // 状态信息(描述信息)
|
totalData[index++] = detectInfo; // 状态信息(描述信息)
|
||||||
totalData[index++] = StringUtils.isBlank(functionSb.toString()) ? detectInfo : functionSb.toString();// 性能数据
|
totalData[index++] = StringUtils.isBlank(functionSb.toString()) ? detectInfo : functionSb.toString();// 性能数据
|
||||||
|
logger.debug("write csv data:"+Arrays.toString(totalData));
|
||||||
dataList.add(totalData);
|
dataList.add(totalData);
|
||||||
// 详细信息
|
// 详细信息
|
||||||
dataList.addAll(lines.subList(1, lines.size()));
|
dataList.addAll(lines.subList(1, lines.size()));
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ public class PluginResultMerge {
|
|||||||
totalData[index++] = totalStatus + "";// 执行状态是否成功是否正常
|
totalData[index++] = totalStatus + "";// 执行状态是否成功是否正常
|
||||||
totalData[index++] = detectInfo; // 状态信息(描述信息)
|
totalData[index++] = detectInfo; // 状态信息(描述信息)
|
||||||
totalData[index++] = StringUtils.isBlank(functionSb.toString()) ? detectInfo : functionSb.toString();// 性能数据
|
totalData[index++] = StringUtils.isBlank(functionSb.toString()) ? detectInfo : functionSb.toString();// 性能数据
|
||||||
|
logger.debug("write csv data:"+Arrays.toString(totalData));
|
||||||
dataList.add(totalData);
|
dataList.add(totalData);
|
||||||
// 详细信息
|
// 详细信息
|
||||||
dataList.addAll(lines.subList(1, lines.size()));
|
dataList.addAll(lines.subList(1, lines.size()));
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
log4j.rootLogger = debug,stdout,logfile
|
log4j.rootLogger = debug,stdout,logfile,errorLog
|
||||||
|
|
||||||
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
|
||||||
log4j.appender.stdout.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
log4j.appender.stdout.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
||||||
@@ -15,7 +15,6 @@ log4j.appender.logfile.layout.ConversionPattern = %d %p [%l] [%t] - <%m>%n
|
|||||||
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
log4j.appender.logfile.layout = org.apache.log4j.PatternLayout
|
||||||
|
|
||||||
#----------------------error---------------------
|
#----------------------error---------------------
|
||||||
log4j.logger.errorLog = warn,errorLog
|
|
||||||
log4j.appender.errorLog = org.apache.log4j.RollingFileAppender
|
log4j.appender.errorLog = org.apache.log4j.RollingFileAppender
|
||||||
log4j.appender.errorLog.MaxFileSize = 50MB
|
log4j.appender.errorLog.MaxFileSize = 50MB
|
||||||
log4j.appender.errorLog.Append = true
|
log4j.appender.errorLog.Append = true
|
||||||
|
|||||||
Reference in New Issue
Block a user