642N/A#!/bin/ksh -p
642N/A#
642N/A# CDDL HEADER START
642N/A#
642N/A# The contents of this file are subject to the terms of the
642N/A# Common Development and Distribution License (the "License").
642N/A# You may not use this file except in compliance with the License.
642N/A#
642N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
642N/A# or http://www.opensolaris.org/os/licensing.
642N/A# See the License for the specific language governing permissions
642N/A# and limitations under the License.
642N/A#
642N/A# When distributing Covered Code, include this CDDL HEADER in each
642N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
642N/A# If applicable, add the following below this CDDL HEADER, with the
642N/A# fields enclosed by brackets "[]" replaced with your own identifying
642N/A# information: Portions Copyright [yyyy] [name of copyright owner]
642N/A#
642N/A# CDDL HEADER END
642N/A#
642N/A
642N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
642N/A# Use is subject to license terms.
642N/A
642N/A# To activate an ssh agent for your current shell, do
642N/A#
642N/A# $ eval `ssh-agent`
642N/A# $ ssh-add
642N/A#
642N/A# The ssh-add will iterate through your configured keys, asking for
642N/A# passwords for each. It then caches the decrypted keys so that it can
642N/A# supply credentials to a requesting server automatically.
642N/A
642N/Aexport ACCESS_LOG=${ACCESS_LOG:-access_log}
642N/Aexport LOG_HOME=$HOME/project/pkg/repo/log-scripts
642N/Aexport DATA_HOME=$HOME/project/pkg/data/log
642N/A
642N/A# if ! ssh-add -l > /dev/null 2>&1; then
642N/A# echo "log: Give the SSH agent some keys."
642N/A#
642N/A# exit 1
642N/A# fi
642N/A
642N/Acd $DATA_HOME
642N/A
642N/A# scp -C -i key Tpkgstats@pkg.opensolaris.org:/var/apache2/logs/access_log access_log
642N/A# rsync -zP --rsync-path=/opt/sfw/bin/rsync Asch@pkg.opensolaris.org:/var/apache2/logs/access_log access_log
642N/A
642N/Agrep " /1p.png" access_log > access_log.ping
642N/Agrep " /catalog" access_log > access_log.catalog
642N/Agrep " /manifest" access_log > access_log.manifest
642N/Agrep " /search" access_log > access_log.search
642N/A
642N/Apython $LOG_HOME/an_ping.py access_log.ping > ping.html
642N/Apython $LOG_HOME/an_catalog.py access_log.catalog > catalog.html
642N/Apython $LOG_HOME/an_manifest.py access_log.manifest > manifest.html
642N/Apython $LOG_HOME/an_search.py access_log.search > search.html
642N/A
642N/A