2 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
5 # Shell routines for logging results to a yaml file.
11 echo "$line" | sed "s/^${host}: //" | sed "s/^${host}://" \
12 >> $logdir/node.$host.yml;
19 if [ -f $logdir/shared ]; then
20 do_rpc_nodes $(comma_list $(nodes_list)) \
21 "yml_node >> $logdir/node.\\\$(hostname).yml"
23 do_rpc_nodes $(comma_list $(nodes_list)) yml_node | split_output
38 # Called on the node for which we the info is needed.
40 local node=$(hostname)
51 printf "LustreEntities:\n"
55 TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname)"}
56 TEST_HOST=${TEST_HOST:-$(hostname)}
57 TEST_USER=${TEST_USER:-$USER}
59 # TestGroup information
62 test_group: $TEST_GROUP
71 if [ -r /etc/lsb-release ]; then
72 dist=$(grep 'DISTRIB_ID' /etc/lsb-release | sed 's/DISTRIB_ID=//' | head -1)
73 elif [ -r /etc/redhat-release ]; then
74 dist=$(awk '/release/ { printf("%s %s %s", $1, $2, $3)}' /etc/redhat-release)
75 elif [ -r /etc/*-release ]; then
76 dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null | \
77 sed -e 's/\/etc\///' -e 's/-release//' | head -1)
86 TEST_DISTRO=$(release)
87 LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
88 LUSTRE_BUILD=$(sed 's/-.*//' <<<$LUSTRE_VERSION)
91 lbats_build_id: $LBATS_ID
92 lbats_build_name: $LBATS_NAME
93 architecture: $(uname -m)
95 os_distribution: $TEST_DISTRO
96 lustre_version: $LUSTRE_VERSION
97 lustre_build: $LUSTRE_BUILD
98 kernel_version: $(uname -r)
104 mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
106 node_name: $(hostname)
108 architecture: $(uname -m)
111 for nw in $(lctl list_nids | grep -v @lo | cut -f 2 -d '@' | uniq); do
126 for num in $(seq $MDSCOUNT); do
127 host=$(facet_active_host mds$num)
128 yml_entity "MDS $num" $host >> $logdir/node.$host.yml
131 for num in $(seq $OSTCOUNT); do
132 host=$(facet_active_host ost$num)
133 yml_entity "OST $num" $host >> $logdir/node.$host.yml
137 for host in ${CLIENTS//,/ }; do
138 yml_entity "Client $i" $host >> $logdir/node.$host.yml
144 if [ $1 != "FINISHED" ]; then
148 description: $TESTSUITE $1
155 yml_log_test_status() {
175 yml_log_sub_test_log() {