aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Reading log files from various unix servers through Java program on windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Reading log files from various unix servers through Java program on windows" Watch "Reading log files from various unix servers through Java program on windows" New topic
Author

Reading log files from various unix servers through Java program on windows

Arthur Ford
Greenhorn

Joined: Sep 06, 2006
Posts: 22
Hi,

I have few production unix servers. For debugging purposes, I have to login into 5-6 servers and check for logs in each of the servers. Is it possible to automate this task? Can I write a java program which will connect to each of the servers and read the log files. I cannot run any programs in the unix boxes. Anything that has to happen has to happen in the window box. Any suggestions or ideas?

Thanks!
Sushil Sharma
Greenhorn

Joined: Nov 02, 2006
Posts: 22
Get org.apache.commons package from http://jakarta.apache.org/site/downloads/downloads_commons-net.cgi


[/CODE]
Arthur Ford
Greenhorn

Joined: Sep 06, 2006
Posts: 22
Hi ,
Thanks a lot for the reply. But unfortunately, FTP is disabled in all the servers.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8713
    
    6

So what do you have to work with? That drives the solution and without knowing those parameters, we're kind of in the dark.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Senad Cimic
Greenhorn

Joined: Feb 19, 2009
Posts: 1
Hi,
I'm experiencing similar issue. In my case I have Java application that searches multiple files on few different Unix servers for user specified search terms, but the problem is that FTPing all those files simply takes too much time making application unusable (we have log files that are over 100 MB in size). I'm trying to modify existing application to perform search on Unix servers rather than FTPing every single file. Did anyone did similar thing before? Does anyone have any suggestions? It is possible to write ruby script and manually execute this, but is it possible to incorporate this as part of Java application (perhaps using ssh4j or jruby)?

Thanks in advance.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8713
    
    6

Have you tried file compression? A zipped-up text file is a fraction (10% or less) of the size of an uncompressed file.

I'm trying to modify existing application to perform search on Unix servers rather than FTPing every single file.


That would be another good solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading log files from various unix servers through Java program on windows
 
Similar Threads
Send real time unix system logging to a remote db server ?
Tomcat Dump seen in the log file
What Platform/Java Technology - Please Help
A story of 8 servers - a distributed design & architecture issue
Reading log file using Java