diff --git a/.travis.yml b/.travis.yml index 4738f91665dbe..b554991ce6b68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -201,6 +201,7 @@ env: - secure: "cFh8thThqEJLC98XKI5pfqflUzOlxsYPRW20AWRaYOOgYHPTiGWypTXiPbGSKaeAXTZoOA+DpQtEmefc0U6lt9dHc7a/MIaK6isFurjlnKYiLOeTruzyu1z7PWCeZ/jKXsU2RK/88DBtlNwfMdaMIeuKj14IVfpepPPL71ETbuk=" before_install: + # - ./src/ci/top.sh & - zcat $HOME/docker/rust-ci.tar.gz | docker load || true - mkdir -p $HOME/rustsrc # FIXME(#46924): these two commands are required to enable IPv6, @@ -290,6 +291,8 @@ after_failure: # the failure was while updating it (as it may be in a bad state) # https://github.com/travis-ci/travis-ci/issues/4472 before_cache: + # - echo "top statistics:" + # - cat /tmp/top.log - docker history -q rust-ci | grep -v missing | xargs docker save | diff --git a/src/ci/top.sh b/src/ci/top.sh new file mode 100755 index 0000000000000..55f446f7371a3 --- /dev/null +++ b/src/ci/top.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Copyright 2018 The Rust Project Developers. See the COPYRIGHT +# file at the top-level directory of this distribution and at +# http://rust-lang.org/COPYRIGHT. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +while `sleep 30` +do +# get tops summary and print it into a logfile every 30 secs +# run top in batch mode (b), skip idle processes (i) and quite after first output (n 1) +top -ibn 1 | head -n4 | tr "\n" " " | tee -a /tmp/top.log +echo "" | tee -a /tmp/top.log +done