Dynamically finding the logfile folder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Scott McNair

    Dynamically finding the logfile folder

    Hi,

    I'm writing an ASP page that will analyze the logfiles and return
    statistical information. I'd like to make this app so that I could drop it
    into any of my webservers and get the logs for that server. Is there a way
    to determine dynamically the location of the logfiles?

    Regards,
    Scott
  • Manohar Kamath [MVP]

    #2
    Re: Dynamically finding the logfile folder

    Scott,

    The log files location is in the Registry:


    --
    Manohar Kamath
    Editor, .netWire



    "Scott McNair" <scott.mcnair@s fmco.takethispa rtout.com> wrote in message
    news:Xns956C5AA 81E854sfmco@207 .46.248.16...[color=blue]
    > Hi,
    >
    > I'm writing an ASP page that will analyze the logfiles and return
    > statistical information. I'd like to make this app so that I could drop[/color]
    it[color=blue]
    > into any of my webservers and get the logs for that server. Is there a[/color]
    way[color=blue]
    > to determine dynamically the location of the logfiles?
    >
    > Regards,
    > Scott[/color]


    Comment

    • Manohar Kamath [MVP]

      #3
      Re: Dynamically finding the logfile folder

      Must have clicked send button little too soon..

      The log file location is in the registry:

      HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters\LogFi l
      eDirectory

      Since you can not access the registry with simple ASP page, you might have
      to write a component that will do that for you. Or even have a Windows
      Script that can do that, but then your ASP page has to run with enough
      permissions to access the registry (such as the admin permissions).

      --
      Manohar Kamath
      Editor, .netWire



      "Scott McNair" <scott.mcnair@s fmco.takethispa rtout.com> wrote in message
      news:Xns956C5AA 81E854sfmco@207 .46.248.16...[color=blue]
      > Hi,
      >
      > I'm writing an ASP page that will analyze the logfiles and return
      > statistical information. I'd like to make this app so that I could drop[/color]
      it[color=blue]
      > into any of my webservers and get the logs for that server. Is there a[/color]
      way[color=blue]
      > to determine dynamically the location of the logfiles?
      >
      > Regards,
      > Scott[/color]


      Comment

      • Scott McNair

        #4
        Re: Dynamically finding the logfile folder

        "Manohar Kamath [MVP]" <mkamath@TAKETH ISOUTkamath.com > wrote in
        news:#viBj4KoEH A.1248@TK2MSFTN GP09.phx.gbl:
        [color=blue]
        > The log file location is in the registry:
        >
        > HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters
        > \LogFil eDirectory[/color]

        Thank you, Manohar, for your quick response.

        How would I find out the particular instance name? For example if I'm
        running on W2K Server, and I've got W3SVC1, W3SVC2, and W3SVC3, and the
        app is being run by W3SVC2, how would I find that out? I've found a
        couple of server variables (APPL_MD_PATH and INSTANCE_META_P ATH) that
        contain it after a fashion (e.g. "/LM/W3SVC/1/ROOT") so I suppose if I
        needed to, I could strip the instance name out of one of those, but is
        that info stored in an easier to access location?

        Thanks again for your help.

        Regards,
        Scott

        Comment

        • Mark Schupp

          #5
          Re: Dynamically finding the logfile folder

          Request.ServerV ariables("INSTA NCE_ID")

          --
          Mark Schupp
          Head of Development
          Integrity eLearning
          Advancing limitless knowledge and continual growth to create confident problem solvers, one course at a time.



          "Scott McNair" <scott.mcnair@s fmco.takethispa rtout.com> wrote in message
          news:Xns956C609 6C3065sfmco@207 .46.248.16...[color=blue]
          > "Manohar Kamath [MVP]" <mkamath@TAKETH ISOUTkamath.com > wrote in
          > news:#viBj4KoEH A.1248@TK2MSFTN GP09.phx.gbl:
          >[color=green]
          > > The log file location is in the registry:
          > >
          > > HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters
          > > \LogFil eDirectory[/color]
          >
          > Thank you, Manohar, for your quick response.
          >
          > How would I find out the particular instance name? For example if I'm
          > running on W2K Server, and I've got W3SVC1, W3SVC2, and W3SVC3, and the
          > app is being run by W3SVC2, how would I find that out? I've found a
          > couple of server variables (APPL_MD_PATH and INSTANCE_META_P ATH) that
          > contain it after a fashion (e.g. "/LM/W3SVC/1/ROOT") so I suppose if I
          > needed to, I could strip the instance name out of one of those, but is
          > that info stored in an easier to access location?
          >
          > Thanks again for your help.
          >
          > Regards,
          > Scott[/color]


          Comment

          • Scott McNair

            #6
            Re: Dynamically finding the logfile folder

            "Mark Schupp" <mschupp@ielear ning.com> wrote in news:ORly0PLoEH A.2024
            @TK2MSFTNGP09.p hx.gbl:
            [color=blue]
            > Request.ServerV ariables("INSTA NCE_ID")[/color]

            Thanks, Mark.

            Would all instances be name "W3SVC" & R.SV("INSTANCE_ ID")? Or would there
            be a situation where the instance would be named something other than
            "W3SVC"?

            Comment

            Working...