/usr/share/arc/perferator is in nordugrid-arc-arex 5.4.2-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/bin/bash
# script to write static system data and upload to perflog.nordugrid.org
# together with performance data taken by data, arex, infosys and backends
# runs once a day, run by a-rex when configured through the helper option
# in the grid-manager block in arc.conf.
# e.g.:
# [grid-manager]
# helper=". /usr/share/arc/perferator"
# Path to arc.conf can be given with --config option, default is /etc/arc.conf
# TODO: Upload performance data to perflog.nordugrid.org
command_exists () {
type "$1" &> /dev/null ;
}
write_static_system_data () {
outfile="$1"
echo "=== Timestamp: ===" >> $outfile
date >> $outfile
echo "" >> $outfile
echo "=== ARC version: ===" >> $outfile
arched --version >> $outfile
echo "" >> $outfile
echo "=== fs types: ===" >> $outfile
controldir_fstype=`df --output=fstype $CONFIG_controldir | grep -v Type`
echo "controldir fstype: $controldir_fstype" >> $outfile
sessiondir_fstype=`df --output=fstype $CONFIG_sessiondir | grep -v Type`
echo "sessiondir fstype: $sessiondir_fstype" >> $outfile
echo "" >> $outfile
echo "=== CPU info: ===" >> $outfile
echo "no. of CPUs: `getconf _NPROCESSORS_ONLN`" >> $outfile
cat /proc/cpuinfo >> $outfile
echo "" >> $outfile
echo "=== Mem info: ===" >> $outfile
cat /proc/meminfo >> $outfile
echo "" >> $outfile
echo "=== OS info: ===" >> $outfile
uname -a >> $outfile
cat /etc/*-release >> $outfile
cat /proc/version >> $outfile
echo "" >> $outfile
}
# ARC1 passes first the config file.
if [ "$1" = "--config" ]; then shift; ARC_CONFIG=$1; shift; fi
basedir=`dirname $0`
basedir=`cd $basedir > /dev/null && pwd` || exit $?
pkgdatadir="$basedir"
. "$pkgdatadir/config_parser_compat.sh" || exit $?
ARC_CONFIG=${ARC_CONFIG:-/etc/arc.conf}
config_parse_file $ARC_CONFIG 1>&2 || exit $?
config_import_section "common"
config_import_section "grid-manager"
HOSTNAME=$CONFIG_hostname
PERFDIR=${CONFIG_perflogdir:-/var/log/arc/perfdata}
# sleep a bit, waiting for performance data to accumulate
sleep 86400
# merge infosys files
MERGEDATE=`date +%Y%m%d`
write_static_system_data $PERFDIR/sysinfo.perflog
# extract infosys data from nytprofd databases
$pkgdatadir/PerfData.pl --config=$ARC_CONFIG || exit $?
|