每天监控的数据,还要从多个地方获取,还要合并,实在是厌烦了
来吧,脚本带来的美好生活
-
@echo off
-
-
set yue=%date:~0,4%-%date:~5,2%
-
set riqi=%date:~0,4%-%date:~5,2%-%date:~8,2%
-
del /q c:\data\*
-
-
set datacenter1=xxx
-
set ip=%datacenter1%
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/mysql.csv c:\data\mysql1.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/mysql_tabspace.csv c:\data\mysql_tabspace1.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/oracle.csv c:\data\oracle1.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/oracle_asm.csv c:\data\oracle_asm1.csv
-
-
rem 获取监控数据
-
set dc2=yyy
-
set ip=%dc2%
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/mysql.csv c:\data\mysql2.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/mysql_tabspace.csv c:\data\mysql_tabspace2.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/oracle.csv c:\data\oracle2.csv
-
certutil -urlcache -split -f http://%ip%/httpd/databasecheck/%yue%/%riqi%/oracle_asm.csv c:\data\oracle_asm2.csv
-
-
-
explorer c:\data
再挂到一个计划任务上,完美。
阅读(1082) | 评论(0) | 转发(0) |