LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2010, 09:27 AM   #1
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Rep: Reputation: 15
Viewing logs when they're scrambled looking..


Instead of viewing logs via SSH / PUTTY.

I like to download them first to my PC..and view em there..so that I dont miss any lines or anything.

Some of the logs show up as normal text.. others looks all scrambled & i'm guessing encrypted ?

How do I find a good log viewer, to decrypt the scrambled looking ones ?

I've just been using WordPad for the most part.

This is a super noobish question i'm sure.
 
Old 01-16-2010, 09:39 AM   #2
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
1. What are the full names of the log files you have downloaded?
2. Don't use wordpad. Apart from using different line endings to *nixes, it will 'helpfully' try to deciper character combinations for formatting, resulting in a mess of an output ;-)
Try the excellent free 'notepad++' but set it to 'unix' under the preferences.

I suspect you may be looking at gzipped log files (eg /var/log/mail.info.1.gz etc) and this in combination with wordpad is giving you the impression of encrypted output.
 
Old 01-16-2010, 11:36 AM   #3
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
tail -n 500 /var/log/yourlogfile | less in PuTTY and you won't miss anything
tail --help for details.
 
Old 01-18-2010, 01:42 PM   #4
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Web31337 View Post
tail -n 500 /var/log/yourlogfile | less in PuTTY and you won't miss anything
tail --help for details.

My version of Putty doesn't scroll up though..whatever is on the screen, thats it.

Is there a secret way to scroll up ? I believe I have version 0.57 Putty.
 
Old 01-18-2010, 02:22 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Use "less" as a pager. And there are certain logs like wtemp,
lastlog, faillog that have binary content - not because they're
encrypted, but because they're meant to be used by a program
like "last" that will show their contents in human readable form.



Cheers,
Tink
 
Old 01-18-2010, 03:14 PM   #6
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
Use "less" as a pager. And there are certain logs like wtemp,
lastlog, faillog that have binary content - not because they're
encrypted, but because they're meant to be used by a program
like "last" that will show their contents in human readable form.



Cheers,
Tink
Thats amazing, I was just about to post how to view 'lastlog' as all I saw where come scrambled characters.

How can I view that ? I running Plesk as well. 9.2.3

I guess I need to use last to view lastlog ? how is it possible.

much appreciated.
 
Old 01-18-2010, 03:42 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I have no idea how plesk interacts with the system - sorry;
never seen or used it.
 
Old 01-18-2010, 05:05 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
http://linux.die.net/man/8/lastlog
http://linux.die.net/man/8/faillog
http://linux.die.net/man/1/who
 
Old 01-19-2010, 08:53 AM   #9
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Original Poster
Rep: Reputation: 15
Can I just have the command to view lastlog ?

ls -s ?
 
Old 01-19-2010, 09:07 AM   #10
Dave_Devnull
Member
 
Registered: May 2009
Posts: 142

Rep: Reputation: 24
Or change the number of 'lines of scrollback' in Putty (hint: Catagory > Window > Control Of Scrollback in Window)
 
Old 01-19-2010, 10:53 AM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Can I just have the command to view lastlog ?
The command to view lastlog is last, kind of unsurprisingly.

But looking at the man-pages should have told you that?
 
1 members found this post helpful.
Old 01-19-2010, 05:17 PM   #12
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
According to that man page the cmd is lastlog ...
Quote:
lastlog formats and prints the contents of the last login log /var/log/lastlog file. The login-name, port, and last login time will be printed. The default (no flags) causes lastlog entries to be printed, sorted by their order in /etc/passwd.
 
  


Reply



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
Question about the logs viewer application (/var/logs) balteo Linux - General 1 11-20-2009 11:13 PM
Finding LDAP Server Logs / Application Logs in Linux arbignay Linux - Newbie 2 03-24-2008 09:54 AM
Viewing System Logs from Root ispguy_01 Linux - General 2 06-23-2007 04:03 PM
web interface for viewing logs clau_bolson Linux - Software 5 02-03-2004 07:19 AM
Computer Crashing - Viewing logs Jose Muņiz Linux - General 4 01-03-2004 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 AM.

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
Open Source Consulting | Domain Registration