home *** CD-ROM | disk | FTP | other *** search
/ ftp.jcu.edu.au / 2014.06.ftp.jcu.edu.au.tar / ftp.jcu.edu.au / v6.3.2b / SWBD63 / fabos-6.3.2b-10.ppc.rpm / fabos-6.3.2b.10.cpio.gz / fabos-6.3.2b.10.cpio / fabos / sbin / scmonitor < prev    next >
Text File  |  2010-11-10  |  970b  |  52 lines

  1. #!/bin/sh
  2. #
  3. #
  4. #    Copyright (c) 2010-2020 Brocade Communications Systems, Inc.
  5. #    All rights reserved.
  6. #
  7. #    File name:   StuckFlowDetection.sh
  8. #    Module name: an/
  9. #
  10. #  NAME
  11. #     scmonitor - enable or disable stuck flow detection
  12. #
  13. #  SYNOPSIS
  14. #     scmonitor 0 or 1
  15. #
  16. #  AVAILABILITY
  17. #     root
  18. #
  19. #  DESCRIPTION
  20. #     Use  this  command  to  enable or disable stuck flow deetction
  21. #
  22. #
  23. #  OPTIONS
  24. #         The input is 0 (disable) or 1 (enable).
  25. #
  26.  
  27. export PATH=/fabos/sbin:/fabos/bin:/bin:/usr/bin:/sbin
  28.  
  29. #set ROLE to root pass remaining RBAC checks. Don't do it before rbac_check
  30. if [ "$ROLE_ID" != "root" ]
  31. then
  32.     echo "Error: this command is available only to the root user."
  33.     exit 0
  34. fi
  35.  
  36. if [ $# != 1 ]
  37. then
  38.     echo "Error: Invalid arguments."
  39.     echo "Usage: scmonitor 1/0"
  40.     exit 0
  41. fi
  42.  
  43. if [ $1 == 1 ] || [ $1 == 0 ]
  44. then
  45.     echo $1 > /tmp/stuckvcdata.conf
  46.     bottleneckmon --status > /dev/null
  47. else
  48.     echo "Error: Invalid arguments."
  49.     echo "Usage: scmonitor 1/0"
  50.     exit 0
  51. fi
  52.