______________________________________________________________________________ WWW: Counting accesses to your WWW page on halcyon Q. How can I see how many accesses have been made to my WWW page? A. Currently there is only one way: - Searching our logs of all WWW page accesses It is also possible to keep a running counter of hits on a page itself. Counter scripts are discussed in another FAQ, "Putting A Web Counter On Your Halcyon Web Page." Searching Our Logs of All WWW Page Accesses ------------------------------------------ Current day logs of the personal web server are kept in /logs/apache. Access logs are in "access_log" while server errors are kept in "error_log". We keep daily logs of WWW page accesses on the halcyon-family systems in files named: /logs/apache/access_log.NN or /logs/apache/error_log.NN ...where "NN" is the day of the current month. For instance, the log named: /logs/apache/access_log.15 ...was for the 15 of the current month. If the current date is less than 15, then the log is for the 15th of the previous month. You can search them using the "grep" program. Some examples: grep -c "nwnexus/index" /logs/apachec/access_log.* ...will produce a listing of the name of each log file in your scratch directory and how many times the Northwest Nexus page appears in it. grep "nwnexus/index" /logs/apache/access_log.* | wc -l ...produces a single number that sums up all accesses for the last month. And this command line: grep nwnexus/welcome /logs/apache/access_log | \ awk '{print $1}' | \ sort -u | \ more ...shows *who* accessed the page at least once in the current day log. A note about courtesy: These log files are extremely large. A daily log file, decompressed, is about 50 megabytes. Searching them takes a fair amount of time and processor power; searching a whole batch of them at once could easily impact system performance for all users. We request that you refrain from searching the logs during peak hours. (14-Oct-96/wwwcatyw/WRD) ______________________________________________________________________________ Copyright 1996 Northwest Nexus Inc. All Rights Reserved. This document may not be reproduced nor redistributed in any form without express permission; contact us at support@halcyon.com with questions.