LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2017, 01:57 AM   #1
jitensetia
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Rep: Reputation: Disabled
Reading Linux server.log file on Windows browser


Can someone please help me how I can read the Server.log file from Linux server into Windows browser ?
Actually I everytime go through Putty and then see the server.log file with tail -f server.log command and it is not readable easily.

I need to read this file on Windows chrome/IE browser...

Help will be greatly appreciated...
Thanks in Advance.
 
Old 02-20-2017, 03:14 AM   #2
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 3,197
Blog Entries: 3

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Welcome.

Quote:
Originally Posted by jitensetia View Post
Can someone please help me how I can read the Server.log file from Linux server into Windows browser ?
No. That does not sound like a safe idea.

Quote:
Originally Posted by jitensetia View Post
Actually I everytime go through Putty and then see the server.log file with tail -f server.log command and it is not readable easily.
What is the exact error you are getting via PuTTY? Or is it more a matter of needing a pager or wanting to filter out certain results? Generic advice about using a pager would be like either of these:

Code:
more server.log
less server.log
However, can you tell more about the type of log, the distro (including version) that it is on, and what you are looking for in the logs? There are a lot of top quality tools to make your job easy but in order to give useful hints, we'll have to know a little more.
 
2 members found this post helpful.
Old 02-20-2017, 04:15 AM   #3
jitensetia
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Welcome.



No. That does not sound like a safe idea.



What is the exact error you are getting via PuTTY? Or is it more a matter of needing a pager or wanting to filter out certain results? Generic advice about using a pager would be like either of these:

Code:
more server.log
less server.log
However, can you tell more about the type of log, the distro (including version) that it is on, and what you are looking for in the logs? There are a lot of top quality tools to make your job easy but in order to give useful hints, we'll have to know a little more.

Actually its a ongoing appending log file which continously writes and we need to see ERROR while jobs are running... and its a completely black screen so its not very easy to search for any error via timestamp. I saw on web and there is a tool Splunk which shows the logs in good format to read. So was thinking if there is any free tool which can read the logs from Linux server log file and show it in any good readable format. And yes the file is continously getting written its not static file.

Thanks for your continous help
 
Old 02-20-2017, 04:24 AM   #4
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 3,197
Blog Entries: 3

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Well, the idea is to combine the tools. more and less can be searched using / for searching forwards and ? for searching backwards. You can combine them with grep to select just certain lines. So if you are looking for just lines with the string "ERROR" you could go about this way if there are a lot of them:

Code:
tail -f server.log | grep "ERROR"
tail -f server.log | grep "ERROR" | more
The vertical bar there | is called a pipe and it moves the output from the program on the left into the next program on the right as input.

Edit: that is the generic response for general logs, but if you can say which server or service is part of the question, it will be possible to recommend specialized tools.

Last edited by Turbocapitalist; 02-20-2017 at 04:28 AM.
 
1 members found this post helpful.
Old 02-20-2017, 04:43 AM   #5
jitensetia
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Well, the idea is to combine the tools. more and less can be searched using / for searching forwards and ? for searching backwards. You can combine them with grep to select just certain lines. So if you are looking for just lines with the string "ERROR" you could go about this way if there are a lot of them:

Code:
tail -f server.log | grep "ERROR"
tail -f server.log | grep "ERROR" | more
The vertical bar there | is called a pipe and it moves the output from the program on the left into the next program on the right as input.

Edit: that is the generic response for general logs, but if you can say which server or service is part of the question, it will be possible to recommend specialized tools.
Great this works well... I'm able to see last ERROR line with the grep command.

for the server type, I'm in testing domain and do not know more about the server type. We only have the access to the Unix server through IP and userID/password and just go to Putty and see the logs. I was eager to just see the logs in a browser on Windows instead of Putty and some of my friend told that this is possible, so I asked over the forum.
Your answer worked for me surely and still looking if there is any tool which can just log into Unix server and read that server.log file
 
Old 02-20-2017, 04:53 AM   #6
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 3,197
Blog Entries: 3

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Which program produces the 'server.log' file, if I may ask? The specific program, or sometimes just the type, will determine which tools you can choose from. The idea is that you have small, specialized tools that do one task well.
 
Old 02-20-2017, 04:56 AM   #7
jitensetia
LQ Newbie
 
Registered: Feb 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Which program produces the 'server.log' file, if I may ask? The specific program, or sometimes just the type, will determine which tools you can choose from. The idea is that you have small, specialized tools that do one task well.
We have a website of our office, whatever we click on the pages on that website, it writes the log and sometime if any click do not redirects to the page then the Error is written in that file and the file is place on Unix \ABC\XYZ\ApplicationName\server.log
 
Old 02-20-2017, 05:09 AM   #8
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Ubuntu, Devuan, OpenBSD
Posts: 3,197
Blog Entries: 3

Rep: Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407Reputation: 1407
Quote:
Originally Posted by jitensetia View Post
We have a website of our office, whatever we click on the pages on that website, it writes the log and sometime if any click do not redirects to the page then the Error is written in that file and the file is place on Unix \ABC\XYZ\ApplicationName\server.log
Hmm. Backslashes \ are for MS-DOS, regular GNU/Linux and other systems use slashes / instead. It's an important distinction to remember.

If you are using Apache2, you have an error log and an access log. It has a well-established default format for both, but you can also modify it for easier parsing. In either case there are a lot of programs which can read and process the logs.

For the pre-packaged options, there are AWstats, W3Perl, Piwik, and maybe Webalizer.

However, myself, I always found it faster and easier to just whip up something custom in Perl any time I needed new information from the logs. How are your perl or python skills?
 
Old 02-20-2017, 07:31 AM   #9
Habitual
LQ 5k Club
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: High Sierra
Posts: 9,058
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by jitensetia View Post
Actually its a ongoing appending log file which continously writes and we need to see ERROR while jobs are running... and its a completely black screen so its not very easy to search for any error via timestamp. I saw on web and there is a tool Splunk which shows the logs in good format to read. So was thinking if there is any free tool which can read the logs from Linux server log file and show it in any good readable format. And yes the file is continously getting written its not static file.

Thanks for your continous help
Search for ELK at https://www.digitalocean.com/community/tutorials/ when you are ready to pursue "logs in a browser" like Splunk....

It's not plug-n-play, or even install and run, far from it.

but if you are willing to learn, it is a decent and rewarding project.

Good Luck.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need some help reading part of a log file agangsto Linux - General 5 07-09-2010 02:14 AM
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
Problem with reading windows file from linux 51dunk Linux - Networking 5 06-29-2008 10:25 PM
reading linux text file in windows - problem madhugp Linux - General 2 01-11-2007 12:47 AM
Log file reading Garak Linux - General 5 07-08-2003 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration