Overview
Comment: | Added bash script to make simple report from megatest call gathering. This is handy if you are trying to find what is loading down a server for example. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.64 |
Files: | files | file ages | folders |
SHA1: |
69e4b889305a1f81a855d9f4b3c571ec |
User & Date: | mrwellan on 2017-07-20 10:02:53 |
Other Links: | branch diff | manifest | tags |
Context
2017-07-21
| ||
11:11 | Added a little code to move server logs aside in the case where the server decided to not start check-in: 2efebe79cc user: mrwellan tags: v1.64 | |
2017-07-20
| ||
10:02 | Added bash script to make simple report from megatest call gathering. This is handy if you are trying to find what is loading down a server for example. check-in: 69e4b88930 user: mrwellan tags: v1.64 | |
2017-07-18
| ||
16:03 | Checked in preliminary script to check pre-requisites for installing chicken check-in: ec59887bf5 user: jmoon18 tags: v1.64 | |
Changes
Added utils/mtrept.sh version [b1e7f25939].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | #!/bin/bash # # Rollup counts of calls to Megatest from a logging dat file # # Usage: mtrept.sh file [host] if [[ "$2"x != "x" ]];then host_name_grep="grep $2 | " else host_name_grep="" fi if [[ "$1"x == "x" ]];then datfile=/p/fdk/gwa/$USER/.logger/all.dat else datfile=$1 fi datcopy=/tmp/$USER/all.$PID.dat if [[ -e $datfile ]];then cp $datfile $datcopy list_runs=$(grep list-runs $datcopy |$host_name_grep wc -l) show_config=$(grep show-config $datcopy |$host_name_grep wc -l) list_targets=$(grep list-targets $datcopy |$host_name_grep wc -l) mt_run=$(grep ' -run ' $datcopy |$host_name_grep wc -l) execute=$(grep ' -execute' $datcopy|$host_name_grep wc -l) server=$(grep ' -server' $datcopy|$host_name_grep wc -l) sync_to=$(grep ' -sync-to' $datcopy|$host_name_grep wc -l) step=$(grep ' -step' $datcopy|$host_name_grep wc -l) state_status=$(grep ' -set-state-status' $datcopy|$host_name_grep wc -l) test_status=$(grep ' -test-status' $datcopy|$host_name_grep wc -l) other=$(egrep -v ' -(list-runs|show-config|list-targets|run|execute|server|sync-to|step|set-state-status|test-status)' $datcopy |$host_name_grep wc -l) start_time=$(head -1 $datcopy|awk '{print $1}') end_time=$(tail -1 $datcopy | awk '{print $1}') minutes=$(echo "($end_time-$start_time)/60.0" | bc) hours=$(echo "($minutes/60)"|bc) total_calls=$(cat $datcopy |$host_name_grep wc -l) if [[ $hours -gt 2 ]];then echo "Over $hours hour period we have;" else echo "Over $minutes minutes we have;" fi echo " list-runs: $list_runs" echo " show-config: $show_config" echo " list-targets: $list_targets" echo " execute: $execute" echo " run: $mt_run" echo " server: $server" echo " step: $step" echo " test-status: $test_status" echo " sync-to: $sync_to" echo " state-status: $state_status" echo " other: $other" echo " total: $total_calls" else echo "Could not find input file $datfile" fi |