Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

How To Get Raw Access Log File activity?

just the last hours instead of the entire month

     
5:20 pm on Nov 3, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:July 27, 2007
posts: 76
votes: 0


Hello

Sometimes i need to check immediately the last activity in my server.

From Cpanel i access "Raw Access Log" and i select the raw log file to download but it gives me all the current month activity while i need the raw log activity only for the last 10 hours for example.

It is important for me because i am analyzing raw log files when server performance is flawed and i do not want to wait too much time downloading the raw log file.

Is there any solution?

Thanks

5:55 pm on Nov 3, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Some hosts offer uncompressed logs covering a shorter period of time, like days or hours, and then periodically move this data into a compressed monthly, weekly, or daily file.

Whether the logs are processed in this way, the time periods covered, and whether you have access to the logs depends on how your host has set things up.

Jim

6:01 pm on Nov 3, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 7, 2003
posts:540
votes: 0


If you have SSH access, you can take a look at the command line using tail. You could also use grep to pull out just the stuff you were interested in.

LisaB

1:11 am on Nov 15, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:July 27, 2007
posts: 76
votes: 0


Thanks for your help.

Bunltd,

Yes, I have SSH access.

Can you tell me what's the command please?

3:59 am on Nov 15, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


tail -n /path/to/file.name

where "n" is an integer number of lines to be displayed.

2:13 pm on Nov 15, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Sept 28, 2002
posts:505
votes: 0


... or tail -f /path/to/file.name
for a continuous realtime stream of new lines appending.
Ctrl-C to escape.

Kind regards,
R.

3:04 pm on Nov 15, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:July 27, 2007
posts: 76
votes: 0


Hello again.

What do you mean by the path to file?

I need to see the latest logs of a specific user.

How can i define it?

It is a dedicated server and i am using putty.exe to access SSH.

Thanks.

3:20 pm on Nov 15, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10542
votes: 8


you need to find out (from your host) where your log files reside.
"/path/to/file.name" should be replaced by the directory path and file name given.