3 # Copyright (c) 2021 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 echo "---> jjb/scripts/post_build_executor_info.sh"
18 # Output executor runtime attributes [again] in case the job fails prior to
19 # running setup_executor_env.sh
20 long_line="************************************************************************"
21 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
22 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
25 echo "Executor Runtime Attributes:"
26 echo "OS: $OS_ID-$OS_VERSION_ID"
28 echo "Number CPUs: $(nproc)"
30 echo "Nomad Hostname: $(grep search /etc/resolv.conf | cut -d' ' -f2 | head -1)"
31 echo "Container ID: $(hostname)"
33 echo -e "lscpu:\n$(lscpu)"
35 echo -e "df -h:\n$(df -h)"
37 echo -e "free -m:\n$(free -m)"
39 if [ -n "$(which ccache)" ] ; then
41 echo "ccache statistics:"
42 [ -n "${CCACHE_DISABLE:-}" ] && echo "CCACHE_DISABLE = '$CCACHE_DISABLE'"
43 [ -n "${CCACHE_DIR:-}" ] && echo "CCACHE_DIR = '$CCACHE_DIR'"