Chinaunix首页 | 论坛 | 博客
  • 博客访问: 372912
  • 博文数量: 125
  • 博客积分: 265
  • 博客等级: 二等列兵
  • 技术积分: 1429
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-27 20:44
个人简介

just do it

文章分类

全部博文(125)

文章存档

2018年(3)

2017年(6)

2016年(17)

2015年(16)

2014年(39)

2013年(34)

2012年(10)

分类: SOLARIS

2017-07-04 16:36:44


点击(此处)折叠或打开

  1. #$language = "VBScript"
  2. #$interface = "1.0"
  3. crt.Screen.Synchronous = True
  4. ' This automatically generated script may need to be
  5. ' edited in order to work correctly.
  6. ' chr(13) 回车符
  7. Sub Main
  8. ' ---the system info---
  9. crt.Screen.Send "hostname | tee -a" & chr(13)
  10. crt.Screen.WaitForString "# "
  11. crt.Sleep 1000
  12. crt.Screen.Send "uptime | tee -a" & chr(13)
  13. crt.Screen.WaitForString "# "
  14. crt.Sleep 1000
  15. crt.Screen.Send "date | tee -a" & chr(13)
  16. crt.Screen.WaitForString "# "
  17. crt.Sleep 1000
  18. crt.Screen.Send "uname -a | tee -a" & chr(13)
  19. crt.Screen.WaitForString "# "
  20. crt.Sleep 1000
  21. crt.Screen.Send "last reboot | tee -a" & chr(13)
  22. crt.Screen.WaitForString "# "
  23. crt.Sleep 1000
  24. crt.Screen.Send "dmesg | tee -a" & chr(13)
  25. crt.Screen.WaitForString "# "
  26. crt.Sleep 1000
  27. ' ---the hardware info---
  28. crt.Screen.Send "/usr/platform/`uname -i`/sbin/prtdiag -v | tee -a" & chr(13)
  29. crt.Screen.WaitForString "# "
  30. crt.Sleep 1000
  31. crt.Screen.Send "eeprom | tee -a" & chr(13)
  32. crt.Screen.WaitForString "# "
  33. crt.Sleep 1000
  34. ' ---the disk monitor---
  35. crt.Screen.Send "format
  36. crt.Screen.WaitForString "# "
  37. crt.Sleep 1000
  38. crt.Screen.Send "iostat -En | tee -a" & chr(13)
  39. crt.Screen.WaitForString "# "
  40. crt.Sleep 1000
  41. ' ---the slice monitor---
  42. crt.Screen.Send "df -k | tee -a" & chr(13)
  43. crt.Screen.WaitForString "# "
  44. crt.Sleep 1000
  45. crt.Screen.Send "df -h | tee -a" & chr(13)
  46. crt.Screen.WaitForString "# "
  47. crt.Sleep 1000
  48. crt.Screen.Send "more /etc/vfstab | tee -a" & chr(13)
  49. crt.Screen.WaitForString "# "
  50. crt.Sleep 1000
  51. ' ---the system performance monitor---
  52. crt.Screen.Send "mpstat 3 5 | tee -a" & chr(13)
  53. crt.Screen.WaitForString "# "
  54. crt.Sleep 1000
  55. crt.Screen.Send "vmstat 3 5 | tee -a" & chr(13)
  56. crt.Screen.WaitForString "# "
  57. crt.Sleep 1000
  58. crt.Screen.Send "iostat -xPnc | tee -a" & chr(13)
  59. crt.Screen.WaitForString "# "
  60. crt.Sleep 1000
  61. crt.Screen.Send "iostat -xnzd 3 5 | tee -a" & chr(13)
  62. crt.Screen.WaitForString "# "
  63. crt.Sleep 1000
  64. crt.Screen.Send "sar 3 5 | tee -a" & chr(13)
  65. crt.Screen.WaitForString "# "
  66. crt.Sleep 1000
  67. '---the network info---
  68. crt.Screen.Send "netstat -r | tee -a" & chr(13)
  69. crt.Screen.WaitForString "# "
  70. crt.Sleep 1000
  71. crt.Screen.Send "netstat -i 3 5 | tee -a" & chr(13)
  72. crt.Screen.WaitForString "# "
  73. crt.Sleep 1000
  74. crt.Screen.Send "ifconfig -a | tee -a" & chr(13)
  75. crt.Screen.WaitForString "# "
  76. crt.Sleep 1000
  77. '---the cluster info---
  78. crt.Screen.Send "/usr/cluster/bin/scstat | tee -a" & chr(13)
  79. crt.Screen.WaitForString "# "
  80. crt.Sleep 1000
  81. crt.Screen.Send "/usr/cluster/bin/scstat -pv | tee -a" & chr(13)
  82. crt.Screen.WaitForString "# "
  83. crt.Sleep 1000
  84. crt.Screen.Send "/opt/VRTSvcs/bin/hastatus -sum | tee -a" & chr(13)
  85. crt.Screen.WaitForString "# "
  86. crt.Sleep 1000
  87. '---the Veritas software info---
  88. crt.Screen.Send "pkginfo -i |grep -i vxvm | tee -a" & chr(13)
  89. crt.Screen.WaitForString "# "
  90. crt.Sleep 1000
  91. crt.Screen.Send "/usr/sbin/vxdisk list | tee -a" & chr(13)
  92. crt.Screen.WaitForString "# "
  93. crt.Sleep 1000
  94. crt.Screen.Send "/usr/sbin/vxdg list | tee -a" & chr(13)
  95. crt.Screen.WaitForString "# "
  96. crt.Sleep 1000
  97. crt.Screen.Send "/usr/sbin/vxprint -ht | tee -a" & chr(13)
  98. crt.Screen.WaitForString "# "
  99. crt.Sleep 1000
  100. crt.Screen.Send "pkginfo -i |grep -i vxfs | tee -a" & chr(13)
  101. crt.Screen.WaitForString "# "
  102. crt.Sleep 1000
  103. crt.Screen.Send "pkginfo -i |grep -i backup | tee -a" & chr(13)
  104. crt.Screen.WaitForString "# "
  105. crt.Sleep 1000
  106. '磁盘检查
  107. crt.Screen.Send "metastat |tee -a" & chr(13)
  108. crt.Screen.WaitForString "# "
  109. crt.Sleep 1000
  110. crt.Screen.Send "metastat -p |tee -a" & chr(13)
  111. crt.Screen.WaitForString "# "
  112. crt.Sleep 1000
  113. crt.Screen.Send "metadb -i |tee -a" & chr(13)
  114. crt.Screen.WaitForString "# "
  115. crt.Sleep 1000
  116. crt.Screen.Send "raidctl |tee -a" & chr(13)
  117. crt.Screen.WaitForString "# "
  118. crt.Sleep 1000
  119. crt.Screen.Send "/usr/sbin/raidconfig list all | tee -a" & chr(13)
  120. crt.Screen.WaitForString "# "
  121. End Sub

阅读(462) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册