euglug.org

[작성자:] admin

  • [Eug-lug] is mySQL CPU expensive?



    Ralph ZellerTue Aug 15 17:51:38 PDT 2006

    Are you running PhpMyAdmin?  It has a nice display of the MySQL status
    Select "Show MySQL runtime information".  It shows possible problem
    areas in red.
    
    On 08/15/06 11am, Matthew Jarvis wrote:
    > Yesterday I was doing some followup work on a box and fired up mySQL to 
    > look over some data. I didn't complete my work so left it there overnight...
    > 
    > This morning I noticed CPU loads on average much higher than I am used 
    > to seeing...
    > 
    > After shaking the rubber chicken, restarting Cold Fusion (our usual 
    > first attempt) then apache (our second), I quit our of mySQL and things 
    > mellowed out quickly to much more normal (and usable) levels...
    > 
    > I just went in to do some more mySQL stuff, nothing fancy, just 
    > describing such-and-such tables, noticed the CPU load ramping up... quit 
    > out of mySQL and it levels back off...
    > 
    > I never would have guessed mySQL was so demanding...
    > 
    > Anyone else experience this?
    > 
    > -- 
    > Matthew S. Jarvis
    > IT Manager
    > Bike Friday - "Performance that Packs."
    > www.bikefriday.com
    > 541/687-0487 x140
    > mattj at bikefriday.com
    
  • [Eug-lug] How many people are on my website?



    larry priceTue Aug 15 16:59:33 PDT 2006

    On 8/15/06, Matthew Jarvis <mattj at bikefriday.com> wrote:
    > I've always wanted to know the answer to this...
    >
    > If I'm running Apache on Linux, is there a way to find out how many
    > people are currently considered "online" at the website?
    
    HTTP is  a stateless protocol, there is no concept of session at the
    level the web server deals with, you can build a session on top of
    HTTP using cookies, or some other method where you are maintaining
    state in the expectation that the connection will be refreshed within
    a set time limit.
    
    > Or would I have to make it harder by counting session id's or....
    
    This only works if your session object isn't prone to spoofing,
    doesn't fail when the client turns cookies off etc, etc.
    
    your best options are
    
    a. log file analyzers like the one kbob pointed you at, these vary considerably
    webalizer is OK, awstats should be avoided, there are about ten dozen
    out there each with strengths and weaknesses.
    
    b. third party analytics
    
    These usually take the form of a web bug, or piece of javascript that
    you drop onto your web pages from which a third party derives
    statistics on page views, conversions, affiliate conversions and so on
    and makes them available to you.
    Google supposedly has a very good free offering in this space, which I
    have not used enough to judge. There are a number of commercial
    offerings both free and for a fee.
    
    http://www.google.com/search?q=web+analytics
    
    These are what you want if you are doing anything commercial as they
    can tease out patterns and derive information that just looking at
    static web server logs can't. They are also usually more focused on
    producing statistics on viewership reach and a/b testing in formats
    which are useful to publishers rather than providing a summary of raw
    data.
    
  • [Eug-lug] How many people are on my website?



    Rob HudsonTue Aug 15 16:55:55 PDT 2006

    There's server info (mod_info) and server status (mod_status).  Server 
    status provides more of the current processes view type of thing.  Read 
    the description of what data it provides here:
    http://httpd.apache.org/docs/2.0/mod/mod_status.html
    
    -Rob
    
    Matthew Jarvis wrote:
    > If I'm running Apache on Linux, is there a way to find out how many 
    > people are currently considered "online" at the website?
    
  • [Eug-lug] How many people are on my website?



    Bob MillerTue Aug 15 16:17:08 PDT 2006

    Matthew Jarvis wrote:
    
    > If I'm running Apache on Linux, is there a way to find out how many 
    > people are currently considered "online" at the website?
    
    Try visitors.
    
        $ apt-cache show visitors
        [...]
        Description: A fast web server log analyzer
         Visitors is a very fast web server log analyzer designed to be run
         from
         the command line, with support for text or html output and real-time
         statistics generation.  It can handle most web server logs including
         Apache access logs and is very easy to use: no configuration file and
         no database are required.  It can also generate visual path analysis
         graphs using Graphviz.
         .
         For further information see <URL: http://www.hping.org/visitors/>.
        [...]
    
    Here are some samples of its output.
    
    http://www.google.com/search?q=%22statistics+generated+with+visitors%22
    
    -- 
    Bob Miller                              K<bob>
                                            kbob at jogger-egg.com
    
  • [Eug-lug] How many people are on my website?



    John SechrestTue Aug 15 16:08:46 PDT 2006

     % Or would I have to make it harder by counting session id's or....
    
     Counting sessions id's would not get you down the road you want.
    
    
    
    
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] How many people are on my website?



    John SechrestTue Aug 15 16:08:10 PDT 2006

    You have to define what "online" means in a context where you
    are making http connections at random spacings.
    
    If you count the collection of authenticated requests in the last
    N minutes as "active", then you can use that as a value. 
    
    
    
    Matthew Jarvis <mattj at bikefriday.com> writes:
    
     % I've always wanted to know the answer to this...
     % 
     % If I'm running Apache on Linux, is there a way to find out how many 
     % people are currently considered "online" at the website?
     % 
     % I thought of counting occurances of "http" or something similar would do 
     % the trick...
     % 
     % Or would I have to make it harder by counting session id's or....
     % 
     % -- 
     % Matthew S. Jarvis
     % IT Manager
     % Bike Friday - "Performance that Packs."
     % www.bikefriday.com
     % 541/687-0487 x140
     % mattj at bikefriday.com
     % _______________________________________________
     % EUGLUG mailing list
     % euglug at euglug.org
     % http://www.euglug.org/mailman/listinfo/euglug
    
    -----
    John Sechrest          .         Helping people use
                            .           computers and the Internet
                              .            more effectively
                                 .                      
                                     .       Internet: sechrest at peak.org
                                          .   
                                                  . http://www.peak.org/~sechrest
    
  • [Eug-lug] How many people are on my website?



    Matthew JarvisTue Aug 15 16:05:36 PDT 2006

    I've always wanted to know the answer to this...
    
    If I'm running Apache on Linux, is there a way to find out how many 
    people are currently considered "online" at the website?
    
    I thought of counting occurances of "http" or something similar would do 
    the trick...
    
    Or would I have to make it harder by counting session id's or....
    
    -- 
    Matthew S. Jarvis
    IT Manager
    Bike Friday - "Performance that Packs."
    www.bikefriday.com
    541/687-0487 x140
    mattj at bikefriday.com
    
  • [Eug-lug] is mySQL CPU expensive?



    Rob HudsonTue Aug 15 15:34:27 PDT 2006

    Typically, though, I wouldn't say MySQL is a CPU hog.  Occasionally I've 
    seen it get into a weird state and it needs to be killed and brought 
    back up.  When that happens it's a good idea to analyze your tables 
    before you do so to check for any errors.
    
    -Rob
    
    Matthew Jarvis wrote:
    > larry price wrote:
    >> What is MySQL doing? Can you tell from the logs (you should be able to
    >> turn on query logging if it's not on already)
    >>
    >> Some versions of the mysql client do auto completion of table and
    >> column names, and that can eat a lot of resources, but only for
    >> interactive sessions.
    >>
    >>
    > 
    > I didn't view processes... I had started mySQL and then interactively 
    > similar to:
    > 
    > use MyDatabase;
    > show tables;
    > describe MyTable;
    > describe MyOtherTable;
    > 
    > 
    > 
    > 
    > Matthew S. Jarvis
    > IT Manager
    > Bike Friday - "Performance that Packs."
    > www.bikefriday.com
    > 541/687-0487 x140
    > mattj at bikefriday.com
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] is mySQL CPU expensive?



    Matthew JarvisTue Aug 15 14:42:36 PDT 2006

    larry price wrote:
    > What is MySQL doing? Can you tell from the logs (you should be able to
    > turn on query logging if it's not on already)
    > 
    > Some versions of the mysql client do auto completion of table and
    > column names, and that can eat a lot of resources, but only for
    > interactive sessions.
    > 
    > 
    
    I didn't view processes... I had started mySQL and then interactively 
    similar to:
    
    use MyDatabase;
    show tables;
    describe MyTable;
    describe MyOtherTable;
    
    
    
    
    Matthew S. Jarvis
    IT Manager
    Bike Friday - "Performance that Packs."
    www.bikefriday.com
    541/687-0487 x140
    mattj at bikefriday.com
    
  • [Eug-lug] is mySQL CPU expensive?



    larry priceTue Aug 15 12:01:36 PDT 2006

    What is MySQL doing? Can you tell from the logs (you should be able to
    turn on query logging if it's not on already)
    
    Some versions of the mysql client do auto completion of table and
    column names, and that can eat a lot of resources, but only for
    interactive sessions.
    
    
    On 8/15/06, Matthew Jarvis <mattj at bikefriday.com> wrote:
    > Yesterday I was doing some followup work on a box and fired up mySQL to
    > look over some data. I didn't complete my work so left it there overnight...
    >
    > This morning I noticed CPU loads on average much higher than I am used
    > to seeing...
    >
    > After shaking the rubber chicken, restarting Cold Fusion (our usual
    > first attempt) then apache (our second), I quit our of mySQL and things
    > mellowed out quickly to much more normal (and usable) levels...
    >
    > I just went in to do some more mySQL stuff, nothing fancy, just
    > describing such-and-such tables, noticed the CPU load ramping up... quit
    > out of mySQL and it levels back off...
    >
    > I never would have guessed mySQL was so demanding...
    >
    > Anyone else experience this?
    >
    > --
    > Matthew S. Jarvis
    > IT Manager
    > Bike Friday - "Performance that Packs."
    > www.bikefriday.com
    > 541/687-0487 x140
    > mattj at bikefriday.com
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >