- 浏览: 57678 次
- 性别:
- 来自: 北京
文章分类
最新评论
这个是我写的系统采集类实现了CPU个数,CPU频率,内存信息,磁盘信息,CPU利用率,内存利用率,磁盘利用率,系统启动时间的获得
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fenghuo.jsnmp.logic.task;
import java.io.*;
import java.util.StringTokenizer;
/**
* 用于执行linux命令
* @author huangxf
*
*/
public class LinuxExec {
/**
* 获取cpu使用情况
* @return
* @throws Exception
*/
public double getCpuUsage() throws Exception {
double cpuUsed = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("top -b -n 1");// 调用系统的“top"命令
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
if (str.indexOf(" R ") != -1) {// 只分析正在运行的进程,top进程本身除外 &&
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
if (++m == 9) {// 第9列为CPU的使用百分比(RedHat
cpuUsed += Double.parseDouble(tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return cpuUsed;
}
/**
* 内存监控
* @return
* @throws Exception
*/
public double getMemUsage() throws Exception {
double menUsed = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("top -b -n 1");// 调用系统的“top"命令
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
if (str.indexOf(" R ") != -1) {// 只分析正在运行的进程,top进程本身除外 &&
//
// System.out.println("------------------3-----------------");
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
if (++m == 10) {
// 9)--第10列为mem的使用百分比(RedHat 9)
menUsed += Double.parseDouble(tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return menUsed;
}
/**
* 获取磁盘空间大小
*
* @return
* @throws Exception
*/
public double getDeskUsage() throws Exception {
double totalHD = 0;
double usedHD = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("df -hl");//df -hl 查看硬盘空间
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
++m;
// System.out.println("----tmp----" + tmp);
if (tmp.indexOf("G") != -1) {
if (m == 2) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1)) * 1024;
}
}
if (m == 3) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("none") && !tmp.equals("0")) {
usedHD += Double.parseDouble(tmp.substring(
0, tmp.length() - 1)) * 1024;
}
}
}
if (tmp.indexOf("M") != -1) {
if (m == 2) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1));
}
}
if (m == 3) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("none") && !tmp.equals("0")) {
usedHD += Double.parseDouble(tmp.substring(
0, tmp.length() - 1));
// System.out.println("----3----" + usedHD);
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return (usedHD / totalHD) * 100;
}
/**
* 获得CPU的个数
* @return
* @throws java.lang.Exception
*/
public int getIntCpuNum() throws Exception {
int rs = 0;
Runtime rt = Runtime.getRuntime();
// Process p = rt.exec("cat /proc/cpuinfo | grep processor | wc -l");//获得CPU个数
Process p = rt.exec("cat /proc/cpuinfo");//获得CPU个数
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strarr = null;
while ((str = in.readLine()) != null) {
strarr = str.split(":");
if (strarr[0].trim().equals("processor")) {
rs = Integer.valueOf(strarr[1].trim())+1;
}
}
// String str = in.readLine();
// System.out.println("============================================");
// System.out.println(str);
// str = str.trim();
// System.out.println(str);
// System.out.println("============================================");
// rs = Integer.valueOf(str);
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return rs;
}
/**
* 获得内存的大小
* @return
* @throws java.lang.Exception
*/
public int getIntMemMax() throws Exception {
int rs = 0;
Runtime rt = Runtime.getRuntime();
// Process p = rt.exec("cat /proc/meminfo|grep -i \"^memtotal\"|cut -d\":\" -f2|cut -d\"k\" -f1");//获得内存大小
Process p = rt.exec("cat /proc/meminfo");//获得内存大小
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
int[] result = new int[4];
String str = null;
StringTokenizer token = null;
while ((str = in.readLine()) != null) {
token = new StringTokenizer(str);
if (!token.hasMoreTokens()) {
continue;
}
str = token.nextToken();
if (!token.hasMoreTokens()) {
continue;
}
if (str.equalsIgnoreCase("MemTotal:")) {
result[0] = Integer.parseInt(token.nextToken());
rs = result[0];
} else if (str.equalsIgnoreCase("MemFree:")) {
result[1] = Integer.parseInt(token.nextToken());
} else if (str.equalsIgnoreCase("SwapTotal:")) {
result[2] = Integer.parseInt(token.nextToken());
} else if (str.equalsIgnoreCase("SwapFree:")) {
result[3] = Integer.parseInt(token.nextToken());
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return rs / 1000;
}
/**
* 获得的CPUHMZ
* @return
* @throws java.lang.Exception
*/
public int getIntCpuHMZ() throws Exception {
int cpuhmz = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("cat /proc/cpuinfo ");//读CPU信息文件
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strarr = null;
while ((str = in.readLine()) != null) {
strarr = str.split(":");
if (strarr.length > 0) {
if (strarr[0].trim().equals("cpu MHz")) {
cpuhmz = Double.valueOf(strarr[1].trim()).intValue();
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return cpuhmz;
}
/**
* 获取磁盘空间大小(总)
*
* @return
* @throws Exception
*/
public int getDeskAll() throws Exception {
double totalHD = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("df -hl");//df -hl 查看硬盘空间
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
++m;
// System.out.println("----tmp----" + tmp);
if (tmp.indexOf("G") != -1) {
if (m == 2) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1)) * 1024;
}
}
if (m == 3) {
// System.out.println("---G----" + tmp);
}
}
if (tmp.indexOf("M") != -1) {
if (m == 2) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1));
}
}
if (m == 3) {
// System.out.println("---M---" + tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
Double d = new Double(totalHD);
return d.intValue();
}
/**
* 查询系统时间
* @return
* @throws java.io.IOException
*/
public long getSysStartTime() throws IOException, InterruptedException {
long statime = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("uptime");//查看系统启动时间
// System.out.println(p.exitValue());
// p.waitFor();
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = in.readLine();
String[] strs = str.split(",");
String[] rss = strs[1].trim().split(" ");
if (rss.length == 1) {
String[] times = rss[0].split(":");
int hour = Integer.valueOf(times[0]);
int min = Integer.valueOf(times[1]);
statime = (hour * 60 + min) * 60 * 1000;
} else if (rss.length == 2) {
int min = Integer.valueOf(rss[0]);
statime = min * 60 * 1000;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return statime;
}
public void shutdownh() throws IOException {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("shutdown -h");
}
public void shutdownr() throws IOException {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("shutdown -r");
}
public static void main(String[] args) throws Exception {
LinuxExec cpu = new LinuxExec();
System.out.println("---------------cpu used:" + cpu.getCpuUsage() + "%");
System.out.println("---------------mem used:" + cpu.getMemUsage() + "%");
System.out.println("---------------HD used:" + cpu.getDeskUsage() + "%");
System.out.println("---------------CPU NUM:" + cpu.getIntCpuNum());
System.out.println("---------------CPU HMZ:" + cpu.getIntCpuHMZ());
System.out.println("---------------MEN MAX:" + cpu.getIntMemMax());
System.out.println("---------------DISK MAX:" + cpu.getDeskAll());
System.out.println("---------------STARTTIME:" + cpu.getSysStartTime());
System.out.println("------------jvm监控----------------------");
Runtime lRuntime = Runtime.getRuntime();
System.out.println("--------------Free Momery:" + lRuntime.freeMemory() + "K");
System.out.println("--------------Max Momery:" + lRuntime.maxMemory() + "K");
System.out.println("--------------Total Momery:" + lRuntime.totalMemory() + "K");
System.out.println("---------------Available Processors :" + lRuntime.availableProcessors());
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fenghuo.jsnmp.logic.task;
import java.io.*;
import java.util.StringTokenizer;
/**
* 用于执行linux命令
* @author huangxf
*
*/
public class LinuxExec {
/**
* 获取cpu使用情况
* @return
* @throws Exception
*/
public double getCpuUsage() throws Exception {
double cpuUsed = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("top -b -n 1");// 调用系统的“top"命令
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
if (str.indexOf(" R ") != -1) {// 只分析正在运行的进程,top进程本身除外 &&
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
if (++m == 9) {// 第9列为CPU的使用百分比(RedHat
cpuUsed += Double.parseDouble(tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return cpuUsed;
}
/**
* 内存监控
* @return
* @throws Exception
*/
public double getMemUsage() throws Exception {
double menUsed = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("top -b -n 1");// 调用系统的“top"命令
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
if (str.indexOf(" R ") != -1) {// 只分析正在运行的进程,top进程本身除外 &&
//
// System.out.println("------------------3-----------------");
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
if (++m == 10) {
// 9)--第10列为mem的使用百分比(RedHat 9)
menUsed += Double.parseDouble(tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return menUsed;
}
/**
* 获取磁盘空间大小
*
* @return
* @throws Exception
*/
public double getDeskUsage() throws Exception {
double totalHD = 0;
double usedHD = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("df -hl");//df -hl 查看硬盘空间
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
++m;
// System.out.println("----tmp----" + tmp);
if (tmp.indexOf("G") != -1) {
if (m == 2) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1)) * 1024;
}
}
if (m == 3) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("none") && !tmp.equals("0")) {
usedHD += Double.parseDouble(tmp.substring(
0, tmp.length() - 1)) * 1024;
}
}
}
if (tmp.indexOf("M") != -1) {
if (m == 2) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1));
}
}
if (m == 3) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("none") && !tmp.equals("0")) {
usedHD += Double.parseDouble(tmp.substring(
0, tmp.length() - 1));
// System.out.println("----3----" + usedHD);
}
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return (usedHD / totalHD) * 100;
}
/**
* 获得CPU的个数
* @return
* @throws java.lang.Exception
*/
public int getIntCpuNum() throws Exception {
int rs = 0;
Runtime rt = Runtime.getRuntime();
// Process p = rt.exec("cat /proc/cpuinfo | grep processor | wc -l");//获得CPU个数
Process p = rt.exec("cat /proc/cpuinfo");//获得CPU个数
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strarr = null;
while ((str = in.readLine()) != null) {
strarr = str.split(":");
if (strarr[0].trim().equals("processor")) {
rs = Integer.valueOf(strarr[1].trim())+1;
}
}
// String str = in.readLine();
// System.out.println("============================================");
// System.out.println(str);
// str = str.trim();
// System.out.println(str);
// System.out.println("============================================");
// rs = Integer.valueOf(str);
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return rs;
}
/**
* 获得内存的大小
* @return
* @throws java.lang.Exception
*/
public int getIntMemMax() throws Exception {
int rs = 0;
Runtime rt = Runtime.getRuntime();
// Process p = rt.exec("cat /proc/meminfo|grep -i \"^memtotal\"|cut -d\":\" -f2|cut -d\"k\" -f1");//获得内存大小
Process p = rt.exec("cat /proc/meminfo");//获得内存大小
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
int[] result = new int[4];
String str = null;
StringTokenizer token = null;
while ((str = in.readLine()) != null) {
token = new StringTokenizer(str);
if (!token.hasMoreTokens()) {
continue;
}
str = token.nextToken();
if (!token.hasMoreTokens()) {
continue;
}
if (str.equalsIgnoreCase("MemTotal:")) {
result[0] = Integer.parseInt(token.nextToken());
rs = result[0];
} else if (str.equalsIgnoreCase("MemFree:")) {
result[1] = Integer.parseInt(token.nextToken());
} else if (str.equalsIgnoreCase("SwapTotal:")) {
result[2] = Integer.parseInt(token.nextToken());
} else if (str.equalsIgnoreCase("SwapFree:")) {
result[3] = Integer.parseInt(token.nextToken());
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return rs / 1000;
}
/**
* 获得的CPUHMZ
* @return
* @throws java.lang.Exception
*/
public int getIntCpuHMZ() throws Exception {
int cpuhmz = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("cat /proc/cpuinfo ");//读CPU信息文件
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strarr = null;
while ((str = in.readLine()) != null) {
strarr = str.split(":");
if (strarr.length > 0) {
if (strarr[0].trim().equals("cpu MHz")) {
cpuhmz = Double.valueOf(strarr[1].trim()).intValue();
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return cpuhmz;
}
/**
* 获取磁盘空间大小(总)
*
* @return
* @throws Exception
*/
public int getDeskAll() throws Exception {
double totalHD = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("df -hl");//df -hl 查看硬盘空间
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = null;
String[] strArray = null;
while ((str = in.readLine()) != null) {
int m = 0;
strArray = str.split(" ");
for (String tmp : strArray) {
if (tmp.trim().length() == 0) {
continue;
}
++m;
// System.out.println("----tmp----" + tmp);
if (tmp.indexOf("G") != -1) {
if (m == 2) {
// System.out.println("---G----" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1)) * 1024;
}
}
if (m == 3) {
// System.out.println("---G----" + tmp);
}
}
if (tmp.indexOf("M") != -1) {
if (m == 2) {
// System.out.println("---M---" + tmp);
if (!tmp.equals("") && !tmp.equals("0")) {
totalHD += Double.parseDouble(tmp.substring(0, tmp.length() - 1));
}
}
if (m == 3) {
// System.out.println("---M---" + tmp);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
Double d = new Double(totalHD);
return d.intValue();
}
/**
* 查询系统时间
* @return
* @throws java.io.IOException
*/
public long getSysStartTime() throws IOException, InterruptedException {
long statime = 0;
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("uptime");//查看系统启动时间
// System.out.println(p.exitValue());
// p.waitFor();
BufferedReader in = null;
try {
in = new BufferedReader(new InputStreamReader(p.getInputStream()));
String str = in.readLine();
String[] strs = str.split(",");
String[] rss = strs[1].trim().split(" ");
if (rss.length == 1) {
String[] times = rss[0].split(":");
int hour = Integer.valueOf(times[0]);
int min = Integer.valueOf(times[1]);
statime = (hour * 60 + min) * 60 * 1000;
} else if (rss.length == 2) {
int min = Integer.valueOf(rss[0]);
statime = min * 60 * 1000;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
in.close();
}
return statime;
}
public void shutdownh() throws IOException {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("shutdown -h");
}
public void shutdownr() throws IOException {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("shutdown -r");
}
public static void main(String[] args) throws Exception {
LinuxExec cpu = new LinuxExec();
System.out.println("---------------cpu used:" + cpu.getCpuUsage() + "%");
System.out.println("---------------mem used:" + cpu.getMemUsage() + "%");
System.out.println("---------------HD used:" + cpu.getDeskUsage() + "%");
System.out.println("---------------CPU NUM:" + cpu.getIntCpuNum());
System.out.println("---------------CPU HMZ:" + cpu.getIntCpuHMZ());
System.out.println("---------------MEN MAX:" + cpu.getIntMemMax());
System.out.println("---------------DISK MAX:" + cpu.getDeskAll());
System.out.println("---------------STARTTIME:" + cpu.getSysStartTime());
System.out.println("------------jvm监控----------------------");
Runtime lRuntime = Runtime.getRuntime();
System.out.println("--------------Free Momery:" + lRuntime.freeMemory() + "K");
System.out.println("--------------Max Momery:" + lRuntime.maxMemory() + "K");
System.out.println("--------------Total Momery:" + lRuntime.totalMemory() + "K");
System.out.println("---------------Available Processors :" + lRuntime.availableProcessors());
}
}
相关推荐
Java程序调用linux命令、脚本,支持程序在服务器上使用linux命令。工具类为:ProcessUtil,支持单个命令和批量命令执行函数,同时在工具类中添加了getFileLineNumByCmd函数支持通过linux命令获取文件行数的样例。
java调用linux系统命令的封装工具类。
Java调用Linux命令 调用Runtime.exec方法将产生一个本地的进程,并返回一个Process子类的实例, (注意:Runtime.getRuntime().exec(command)返回的是一个Process类的实例), 该实例可用于控制进程或取得进程的...
java调用linux命令.用来测试使用和参考
java 执行linux命令源码,java调用shell脚本源码,java web发布war到tomcat,servlet文件上传,ajax文件上传。 java web 上传war包、停止、启动、发布tomcat。 命令修改成自己的目录即可使用。
java调用Linux命令获取输出流,用于解决获取不到输出流的方法
sshxcute 就是这样一个框架工具集,它基于 JSCH 构建,允许工程师利用Java 代码通过 SSH 连接远程批量执行 Linux/UNIX 系统上的命令或者脚本,同时加入了判断成功与否,取回输出等多种实用功能。sshxcute 不管是针对...
java连接linux,执行shell命令的工具类 sshxcute.jar
前言我所在项目组刚接到一个 Java 重启 keepalived 需求,具体需求是通过 Java 接口去操作安装在Linux 系统上的 keepalived,根
java代码执行linux系统命令
java调用操作系统命令源码工具类,包含远程输入用户名和密码方式及本地调用,同时兼容处理了Windows及Linux命令和执行结果的返回。使用者可以通过工具类方法直接调用,传入操作系统的命令即可执行,方法返回操作结果...
java调用执行系统命令的工作类。包括在Linux和windows系统,已经系统错误输出流的监控。
java ping ip ping命令 ping工具类 支持linux和windows等所有平台 Ping是Windows下的一个命令 在Unix和Linux下也有这个命令。 ping也属于一个通信协议,是TCP/IP协议的一部分 利用“ping”命令可以检查网络是否连通...
5、合并文件使用的Linux命令是:cat /home/leo/sd_000.txt /home/leo/sd_001.txt /home/leo/sd_002
基于sshConnect的linux服务器的shell命令调用,并获取命令返回结果的实例。亲测有效!
在开发的过程中,要善于利用JAVA面向对象编程的优势,与Linux/Unix命令或Shell脚本的优势,并将二者相结合。
java通过ssh调用centos7指令,获取磁盘空间使用率、磁盘空间使用情况、网络使用情况,CPU使用率,内存使用率
NULL 博文链接:https://xieruilin.iteye.com/blog/1150010
在linux上,使用java调用ffmpeg命令,实现在特定时间上对视频截图
因为我在linux环境下执行shell脚本时sqlldr命令和sqlplus命令是正常执行的,没有任何问题,但是在java代码中调用脚本时却报错,所有排除了其他原因,只可能是环境变量的问题, 于是我把oracle的所有环境变量直接复制...