Find the answer to your Linux question:
Results 1 to 7 of 7
Hello everyone, I just signed up here after getting kind of crazy trying to use commands in terminal.. For my job I am getting into using server log files through ...
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3

    Question Help needed with a few commands

    Hello everyone,

    I just signed up here after getting kind of crazy trying to use commands in terminal..

    For my job I am getting into using server log files through terminal. I am new to linux so going shell only will be pretty tough.

    I have a few things that I could use some help with.

    - In the logfile, what command can I use to check which webserver had the most hits?

    - In the logfile, what command can I use to check which webserver used most calculating time (or processing time) and how much average time was needed per hit on that webserver?

    - How many sites don't have a favicon (favicon.ico) redirects excluded?

    If anyone could point me in the right direction then that would be great!
    Also please note that I am aware of the friendly to use log viewer but for my job I need to use shell.

    Kind regards,
    Mark

  2. #2
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    Hello and Welcome
    Forgive me for being blunt but this sounds like home/school work, which is forbidden by forum rules. We usually lock threads like this but I'm willing to give you the benefit of doubt. Can you tell us what you have tried and why it didn't work?
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3
    Hi Mike,

    Kind of blunt yes.. but I understand this might seem like homework for kids and I appreciate you keep this thread open, I guess for most this seems like simple kid stuff.

    This however for me is for a new job I am getting, they want me to learn shell and ofcourse I am willing to learn. As I have only worked with graphical environments so far it is just difficult for me to get into shell.

    I have already figured out that I can use the following to count whatever you enter:

    grep -c 'mysearchentry' /location/of/mylog

    I also already know most basic stuff, like navigating, and things like "top"
    Last edited by markvis14; 01-05-2012 at 08:41 PM.

  4. #4
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    If you wanna know how much cpu-time a process is useing you can use ps -ef, it will show you what process has used how much cpu time.

    If you need it for different virtual hosts on one http-server you will need to search in the logs.

    grep is a very powerful tool for searching.
    You may also check howto create bash scripts or what scripts are available to search apache log files.

  5. #5
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    Well, it's not so much that it's kid stuff....it's just that your questions appear structured similar to some home/school work.
    Analyzing access_log using the command line
    Be sure and check the links within that article also.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

  6. #6
    Just Joined!
    Join Date
    Jan 2012
    Posts
    3
    Hi guys,

    Thanks for your replies.

    I will look into that article, seems interesting

    Regards,
    Mark

    Edit: your link doesn't seem to add to my questions. All he shows is how to make a graph, or am I overlooking something? Thanks.

  7. #7
    Super Moderator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,145
    Click on the "NCSA combined" link within the above link, should help some.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...