v-list-sys-cpu-status 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. # info: list system cpu info
  3. # options: [FORMAT]
  4. #
  5. # The function lists cpu information
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  8. #----------------------------------------------------------#
  9. # Argument definition
  10. #format=${1-shell}
  11. # Includes
  12. #source $VESTA/func/main.sh
  13. #----------------------------------------------------------#
  14. # Action #
  15. #----------------------------------------------------------#
  16. # Displaying top 30
  17. top -b -n1 | head -n 37
  18. echo -en "\n-------------------------------------"
  19. echo -en "-------------------------------------\n\n"
  20. # Displaying process tree
  21. pstree -s
  22. echo -en "\n-------------------------------------"
  23. echo -en "-------------------------------------\n\n"
  24. # Displaying CPU information
  25. grep 'model name' /proc/cpuinfo|cut -f 2 -d : | sed "s/ //"
  26. echo
  27. lscpu 2>/dev/null
  28. #----------------------------------------------------------#
  29. # Vesta #
  30. #----------------------------------------------------------#
  31. exit