File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Capture/Display logs from Unix box - Access from Java

 
Natraj Aggas
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have to write a java program in which i need to connect to a unix server and need to display the logs from unix server to my local console. Could anyone help me if you have similar kind of code.

Thanks,
-N
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first question is how do you want to connect to the server: through which protocol.

telnet? ssh? ftp? sftp? scp? etc?
 
Natraj Aggas
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am planning to connect thro telnet. The java should kick an unix script located in some location.
Ex: Remote ip - 100.12.122.xxxx, hostname - xyz.

The script named getLogs.sh is located in /home/natraj/scripts/

I am new to this telnet concepts, so can you help me how the java code will be for the above scenario.
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you seem to need a telnet library for Java.

http://commons.apache.org/net/




 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic