You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by maven apache <ap...@gmail.com> on 2011/02/19 01:38:19 UTC
how to caculate the PV,ip,PU according to the tomcat log
Hi:
how to caculate the PV,ip,PU according to the tomcat log?
I have export the tomcat log to db.
This is the db structure:
+-------+-----------+----------+----------+--------+-----+----------+----------+--------+---------------------+---------+----------+-------+
| Id | hostip | username | datasend | method | uri | queryStr |
protocol | status | time | browser | platform | refer |
+-------+-----------+----------+----------+--------+-----+----------+----------+--------+---------------------+---------+----------+-------+
| 44359 | 127.0.0.1 | - | 0 | GET | / | |
HTTP/1.1 | 404 | 2011-02-17 08:08:25 | Unknown | Unknown | - |
+-------+-----------+----------+----------+--------+-----+----------+----------+--------+---------------------+---------+----------+-------+
For the ip I can use :
select count(distinct ip)...
But how about the pv and pu?
I have no idea,please do me a favor if you know.
Re: how to caculate the PV,ip,PU according to the tomcat log
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
To whom it may concern,
On 2/24/2011 8:34 AM, maven apache wrote:
>> Good question. What are PV, ip, and PU?
>
> Thanks for your attention and Sorry for my negligence.
>
> PV: page view, how many people visit a page.
>
> IP: how many ips visitor the website within one day or one hour...
>
> PU:Unique Visitor,
>
> For example:
>
> visitor A(ip:10.0.0.1) scan the site :http://www.xx.com/index.html
> http://www.xx.com/about.html
>
> Visitor B (ip:10.0.0.2) scan the same two pages
>
> Then VIsitor A change his/her ip to 10.0.0.3 (but its cookie in her/his
> browser is not change) and visitor the two pages again.
>
> Then from all of the above,the
> ips=3 (three distinct ips)
> pv=2 (two pages)
> PU=2 (just two different person,although three ip.
>
> Is this clear?
>
> If not,I can add more. :)
No, it makes sense.
First, you asked about using the log for stats, and then showed an
example SQL query. Are you using a RDBMS-based log?
At any rate, what you need is a good set of SQL queries -- you might
want to talk to a DBA about how to do these things properly.
If you are using a log file, try searching Google for "web server log
file analyzer". We use Awfful for basic stats tracking.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1ryH0ACgkQ9CaO5/Lv0PDgfACfUVKTSFfbCSOYY8FNmiUV9pUL
CqQAoIoYrq5xonD+G8lOu0ytIK7dIis1
=t8wN
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: how to caculate the PV,ip,PU according to the tomcat log
Posted by maven apache <ap...@gmail.com>.
TO *Christopher Schultz*:
2011/2/23 Christopher Schultz <ch...@christopherschultz.net>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> To whom it may concern,
>
> On 2/18/2011 7:38 PM, maven apache wrote:
> > how to caculate the PV,ip,PU according to the tomcat log?
>
> Good question. What are PV, ip, and PU?
>
Thanks for your attention and Sorry for my negligence.
PV: page view, how many people visit a page.
IP: how many ips visitor the website within one day or one hour...
PU:Unique Visitor,
For example:
visitor A(ip:10.0.0.1) scan the site :http://www.xx.com/index.html
http://www.xx.com/about.html
Visitor B (ip:10.0.0.2) scan the same two pages
Then VIsitor A change his/her ip to 10.0.0.3 (but its cookie in her/his
browser is not change) and visitor the two pages again.
Then from all of the above,the
ips=3 (three distinct ips)
pv=2 (two pages)
PU=2 (just two different person,although three ip.
Is this clear?
If not,I can add more. :)
> > For the ip I can use :
> >
> > select count(distinct ip)...
>
> Okay, that explains /one/ question. What about the others?
>
> > But how about the pv and pu?
> >
> > I have no idea, please do me a favor if you know.
>
> If you can tell us what those abbreviations mean, perhaps we can write
> your SQL statements for you.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1kEkUACgkQ9CaO5/Lv0PDPQwCeMGyWknG04hZ1v2xrH9B5WuHT
> JBQAnjoe1/b0f3/hcSZOKfd0BuOI9WvE
> =1KL4
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: how to caculate the PV,ip,PU according to the tomcat log
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
To whom it may concern,
On 2/18/2011 7:38 PM, maven apache wrote:
> how to caculate the PV,ip,PU according to the tomcat log?
Good question. What are PV, ip, and PU?
> For the ip I can use :
>
> select count(distinct ip)...
Okay, that explains /one/ question. What about the others?
> But how about the pv and pu?
>
> I have no idea, please do me a favor if you know.
If you can tell us what those abbreviations mean, perhaps we can write
your SQL statements for you.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1kEkUACgkQ9CaO5/Lv0PDPQwCeMGyWknG04hZ1v2xrH9B5WuHT
JBQAnjoe1/b0f3/hcSZOKfd0BuOI9WvE
=1KL4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org