mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.0 KiB

  1. #!/bin/bash
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/scripts/Create-ParaStatus
  11. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. config=default
  25. while [ "$1" ] ; do
  26. case "$1" in
  27. -cfg) config=$2 ; shift ; shift ;;
  28. *) echo
  29. echo "Usage: $0 [ -cfg <config> ]"
  30. echo
  31. echo " Show the current status of a parallel build."
  32. echo
  33. echo " -cfg <config> the configuration to use"
  34. echo
  35. exit 1 ;;
  36. esac
  37. done
  38. . scripts/parse-config
  39. qdir="$base/build/$ROCKCFG_ID/ROCK/queue"
  40. if [ ! -d $qdir ] ; then
  41. echo
  42. echo "$qdir:"
  43. echo "Queue not found! Please start 'Build-Target -cfg $config'"
  44. echo "first on the master node ..."
  45. echo
  46. exit 1
  47. fi
  48. date '+%H:%M %Y-%m-%d:%t--- current status ---' | expand -t20
  49. cat $qdir/*.stat $qdir/*.lock 2> /dev/null | expand -t30
  50. if [ -f $qdir/queue.txt ] ; then
  51. while read line ; do
  52. set $line ; cat $qdir/$1-$6.todo 2> /dev/null
  53. done < $qdir/queue.txt | expand -t30
  54. else
  55. echo -e 'Queue file not found!\tDisplaying' \
  56. 'all prepared jobs:' | expand -t30
  57. cat $qdir/*.todo 2> /dev/null | sort -n -r -k9 | expand -t30
  58. fi
  59. date '+%H:%M %Y-%m-%d:%t----------------------' | expand -t20