[Orca-users] (no subject)
Sean O'Neill
sean at seanoneill.info
Mon Dec 9 15:07:01 PST 2002
At 02:04 PM 12/9/2002 -0800, Mark Goldenberg wrote:
>Has anyone used 'scp' to copy the orcallator.se generated files to the
>orca server? I don't use NFS in my environment and I'm looking for
>another was to move the files?
>
>If I could use 'scp' could I add the code to the orcallator.se file?
As Blair said, you probably could modify the COMPRESS variable to do
this. But you lose the "almost realtime" aspect of Orca doing it this way.
I use the following script on my Orca server to PULL the data from my
remote servers. You notice I said PULL and not PUSH. I let the remote
server simply collect the data - it shouldn't be their responsibility to
PUSH data to the Orca server. What's happens if the Orca server is down
? Using a PULL configuration, this greatly simplifies the data transfer
requirements for error detection - IMHO.
#!/bin/ksh
#
PATH=/usr/bin:/usr/sbin:/sbin:/usr/local/bin; export PATH
LOGIN=perfboy
#
# sources.txt is in the format of "IP:hostname" - a space would have been
better then a :
# I know - I too lazy to change it right now.
#
SRC_LIST=/local/home/${LOGIN}/scripts/sources.txt
for LINE in $(cat ${SRC_LIST})
do
# Just for reference, assuming a MINIMAL data transfer of only deltas
on the
# current day's data file, the ssh command below takes about 2-3
seconds per
# server. This means, conservatively, 20 servers / minute, 200 servers /
# 10 minutes. Important to note this because the crontab running this
# script runs every ten minutes.
#
# Uses ${parameter%%pattern} Remove large right pattern ksh parameter
# expansion
SRC=${LINE%%:*}
# Uses ${parameter##pattern} Remove large left pattern ksh parameter
# expansion
HOSTNAME=${LINE##*:}
#
# Note the "/" trailing slash in SRC_DIR IS VERY IMPORTANT !!!! RTFM
#
SRC_DIR=${LOGIN}@${SRC}:/local/home/perfboy/orca/var/orca/orcallator/${HOSTNAME}/
DST_DIR=/local/home/perfboy/orca/var/orca/orcallator/${HOSTNAME}
# ssh setup for pubkey authentication for the perfboy login to all
# remote machines.
rsync -a -q --exclude 'orcallator.pid' --delete -essh ${SRC_DIR} ${DST_DIR}
done
--
........................................................
......... ..- -. .. -..- .-. ..- .-.. . ... ............
.-- .. -. -... .-.. --- .-- ... -.. .-. --- --- .-.. ...
Sean O'Neill
More information about the Orca-users
mailing list