From 2448d097109cc9a4835c93d72dc671e5c8a2eb0c Mon Sep 17 00:00:00 2001 From: Mariana Marasoiu Date: Sat, 18 Jun 2011 00:32:57 +0300 Subject: [PATCH] added archive parser script - parses an archive from a session --- ppf/log-parser-mysql/archive-parser | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 ppf/log-parser-mysql/archive-parser diff --git a/ppf/log-parser-mysql/archive-parser b/ppf/log-parser-mysql/archive-parser new file mode 100755 index 0000000..2e8ab26 --- /dev/null +++ b/ppf/log-parser-mysql/archive-parser @@ -0,0 +1,18 @@ +#!/bin/bash + +ARCHIVE=$1 + +REMOTE_USER=root +REMOTE_HOST=p2p-next-04.grid.pub.ro +EXTRACTION_FOLDER=/home/ve/parsing_temp +LOCAL_FOLDER=. +RSYNC_OPTS=-avz + +# copy archive from remote host to a local folder +rsync $RSYNC_OPTS -e ssh --partial $REMOTE_USER@$REMOTE_HOST:$ARCHIVE $EXTRACTION_FOLDER + +# parse archive +ARCHIVE_FILE=$(basename $ARCHIVE) +libtorrent/log_parser $EXTRACTION_FOLDER/$ARCHIVE_FILE p2p_logs 1 + +rm -rf $EXTRACTION_FOLDER/$ARCHIVE_FILE -- 2.20.1