« Previous Next »

Thread: Sharing / writing IIS Log files on SAN?

Last post 05-06-2009 7:20 PM by 2revup. 10 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (11 items)

Sort Posts:

  • 01-13-2009, 6:29 PM

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Sharing / writing IIS Log files on SAN?

    HI all, we have started the testing phase for our web farm, while we have load balance servers and everything is working brillantly, we have the need to place all log files into one location on our SAN.

    So we have created a share and provieded the UNC on the log file location with IIS, this seems to be working in terms of writing to the directory which is great, but I can only see one server log anything. I am thinking because it is using the same file name and the log file is considered open the other server is also unable to open and write to it?

    If this is the case is there a way around this, or could I have each server append a prefix at the start or finish of the log file for example:

    orginal log file name : u_ex090114

    prefix log file : Server1_u_ex090114

    Any help here would be greatly appreciated.

     

    - MCP -
    - MCTS -
  • 01-13-2009, 8:05 PM In reply to

    Re: Sharing / writing IIS Log files on SAN?

    Why not put them in seperate directories?

    Logs/Server1/

    Logs/Server2/

    etc

  • 01-13-2009, 8:09 PM In reply to

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Re: Sharing / writing IIS Log files on SAN?

    becase our stats app only will look in one dir, not 2...

    So they must be in one

    :(

     

    - MCP -
    - MCTS -
  • 01-13-2009, 8:50 PM In reply to

    Re: Sharing / writing IIS Log files on SAN?

    Oh well.

    You can call the log files whatever you want so rename them to server1_xxxx like you suggested before.

    Or better still think about writing to them via logparser to database every night. It will make your life some much easier.

  • 01-13-2009, 9:10 PM In reply to

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Re: Sharing / writing IIS Log files on SAN?

    Rovastar:

    Oh well.

    You can call the log files whatever you want so rename them to server1_xxxx like you suggested before.

    Or better still think about writing to them via logparser to database every night. It will make your life some much easier.

     

    Where is this on IIS I cant see this, as IIS needs to handle this as the HTTP.sys will not log 2 of the same name.

     I would love to put in log paraser, but the stats app once again will not allow this (cant be read from a SQL database)

     

     

     

    - MCP -
    - MCTS -
  • 01-13-2009, 9:38 PM In reply to

    Re: Sharing / writing IIS Log files on SAN?

    Sorry I said that completely wrong you cannot change the names of the files I was thinking about the path directly above it. You will have to rename the files manually /scripts/ etc. Batch them daily is the simplest way.

  • 01-13-2009, 9:40 PM In reply to

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Re: Sharing / writing IIS Log files on SAN?

    yeah thats what I was afriad of, no matter I will just get them to log into thier local systems and then script something to move them all and add a prefix.

    Thanks for your help

     

    - MCP -
    - MCTS -
  • 01-27-2009, 4:12 PM In reply to

    Re: Sharing / writing IIS Log files on SAN?

    Hello,

    The easiest thing to do to get 2 NLB servers to save their log files to the same directory, uniquely named by the server name, would be to schedule a batch script to run on each web server on a nightly basis to copy the log files to the destination folder, appending the source server name or other identifier to the log filename.

    Essentially, the script below copies domain.com's log files to the T:\ drive in it's own folder, and appends _serverA to the extension of the target file. Run the script on each web server, replacing the "_serverA" with the actual server's name to prevent them writing to the same files.


    XCOPY "C:\Inetpub\wwwroot\domain.com\logs\W3SVCXXXX\*.log" "T:\domain.com\*.LOG_serverA" /D /Y


    Hope this helps!

    Brock Hensley
    Technical Support Representative
    http://www.ServerIntellect.com

    Managed Servers, 24x7 U.S. Support, Web Hosting Solutions.
  • 01-27-2009, 4:24 PM In reply to

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Re: Sharing / writing IIS Log files on SAN?

    Hi there thanks for that, I also thought of this and recently scripted it just as you have described and blogged about it.

     

    http://bradmarsh.net/index.php/2009/01/15/iis7-logging-in-central-location-for-web-farms/

    - MCP -
    - MCTS -
  • 05-06-2009, 7:06 PM In reply to

    • mbaocha
    • Top 150 Contributor
    • Joined on 04-21-2009, 8:38 PM
    • Posts 35

    Re: Sharing / writing IIS Log files on SAN?

     |I quite appreciate the solution. It was the easiest way to go about it. I read your blog as well. It was cool.

     

    ____________________________

     

    Cheap Affordable Web Hosting | Windows Linux PHP ASPX MYSQL Website Hosting | Best Web Design  & Development Company

     

  • 05-06-2009, 7:20 PM In reply to

    • 2revup
    • Top 500 Contributor
    • Joined on 10-17-2007, 6:54 PM
    • Posts 16

    Re: Sharing / writing IIS Log files on SAN?

    Good to hear that the soloution has also helped someone else. And even better you have read my Blog

    Thanks

     

    Brad

    - MCP -
    - MCTS -
Page 1 of 1 (11 items)