Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在html网页上打印linux服务器变量_Java_Shell_Unix_Server_Putty - Fatal编程技术网

Java 如何在html网页上打印linux服务器变量

Java 如何在html网页上打印linux服务器变量,java,shell,unix,server,putty,Java,Shell,Unix,Server,Putty,基本上,我想创建一个网页来监视企业服务器的运行状况。 我需要的基本想法,我如何可以连接到服务器,并打印出一个企业服务器上使用putty IP的网页上的文件系统统计 试试这个 Process p = Runtime.getRuntime().exec("my terminal command"); p.waitFor(); BufferedReader buf = new BufferedReader(new InputStreamReader( p.getInput

基本上,我想创建一个网页来监视企业服务器的运行状况。 我需要的基本想法,我如何可以连接到服务器,并打印出一个企业服务器上使用putty IP的网页上的文件系统统计

试试这个

Process p = Runtime.getRuntime().exec("my terminal command");

  p.waitFor();
  BufferedReader buf = new BufferedReader(new InputStreamReader(
          p.getInputStream()));
  String line = "";
  String output = "";

  while ((line = buf.readLine()) != null) {
    output += line + "\n";
  }

  System.out.println(output);

你的问题毫无意义。究竟什么是使用putty IP的企业服务器