

Topic 14 of 109: counters - how many hits am I getting on my web page?
Sun, Sep 22, 1996 (10:07) |
Paul Terry Walhus (terry)
You can have a counter on your web page. This topic delves into the
technology of counters on web pages. How they work and where you get 'em.
2 responses total.
Topic 14 of 109 [web]: counters - how many hits am I getting on my web page?
Response 1 of 2: Paul Terry Walhus (terry) * Sun, Dec 15, 1996 (00:29) * 6 lines
To find out how many html files have been accessed on your server
minus the gif files:
find /c /v *.gif* ACCESS.LOG
Topic 14 of 109 [web]: counters - how many hits am I getting on my web page?
Response 2 of 2: Paul Terry Walhus (terry) * Sun, Dec 15, 1996 (00:32) * 29 lines
How to reset your log files
Sooner or later, you'll want to reset your log files (access_log and error_log) because they are too
big, or full of old information you don't need.
access.log typically grows by 1Mb for each 10,000 requests.
Most people's first attempt at replacing the logfile is to just move the logfile or remove the logfile.
This doesn't work.
Apache will continue writing to the logfile at the same offset as before the logfile moved. This results
in a new logfile being created which is just as big as the old one, but it now contains thousands (or
millions) of null characters.
The correct procedure is to move the logfile, then signal Apache to tell it to reopen the logfiles.
Apache is signaled using the SIGHUP (-1) signal. e.g.
mv access_log access_log.old
kill -1 `cat httpd.pid`
Note: httpd.pid is a file containing the process id of the Apache httpd daemon, Apache saves this in the
same directory as the log files.
Many people use this method to replace (and backup) their logfiles on a nightly or weekly basis.
(from the Apache documentation)



web conference
Main Menu