Skip to content

Commit

Permalink
Fix for HP-UX tail (not support -F, only -f )
Browse files Browse the repository at this point in the history
  • Loading branch information
Таран Владимир Сергеевич authored and Таран Владимир Сергеевич committed Feb 19, 2020
1 parent 5ff4362 commit 350831f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LogMonitor/src/main/java/ru/lanit/dibr/utils/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Main {

private static org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Main.class);

public final static String VERSION = "3.23";
public final static String VERSION = "3.24";

public static void main(String[] args) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void startRead() throws Exception {
session = host.connect(debugOutput);
isClosed = false;
channel = (ChannelExec) session.openChannel("exec");
channel.setCommand("tail -n 2000 -F " + logFile.getPath());
channel.setCommand("tail -n 3000 -f " + logFile.getPath());
//channel.setCommand("tail -c +0 -f " + logFile.getPath()); //Так можно загрузить весь файл
reader = new BufferedReader(new InputStreamReader(channel.getInputStream(), host.getDefaultEncoding()));
Utils.writeToDebugQueue(debugOutput, "Starting tailing '" + logFile.getName() + "' for host '" + host.getDescription() + "'..");
Expand Down

0 comments on commit 350831f

Please sign in to comment.