DDR爱好者之家 Design By 杰米
#!/usr/bin/perl -w use DBI; use POSIX qw(strftime); my $dbh = DBI->connect(“DBI:mysql:shencan:111.1.32.153:3306″,”shencan”,”shencan”); #my $sql = “select * from shencan.LVS”; #my $sth = $dbh->prepare($sql); #$sth->execute(); my $HOSTNAME=`hostname`; chomp($HOSTNAME); my $type; my $hostinfo; #while($hostname = $sth->fetchrow_hashref()) #{ # print “$hostname->{hostname} $hostname->{hostip}\n”; #} #my @value; #while(@value = $sth->fetchrow_array()) #{ # print “@value\n”; #} #my $SQL = “update shencan.LVS set node='CBN_CQ' where hostname='CBN-CQ-1-3Z2′”; #my $STH = $dbh->prepare($SQL); #$STH->execute(); #####MYSQL UPDATE SUB START ##### sub update{ my $sql = shift @_; my $mysqlupdate = $dbh->prepare($sql); $mysqlupdate->execute(); } #####MYSQL UPDATE SUB END ##### #sub SCselect { # my $sql = shift @_; # my $myselect = $dbh->prepare($sql); # $myselect->execute(); # while($hostinfo = $myselect->fetchrow_hashref()) { print “$type\n” ;print “$hostinfo->{$type} \n” ;} #} #####MYSQL SELECT SUB START##### sub shencan { my @shencan = @_; foreach $type (@shencan){ my $sql = “select * from shencan.FC where hostname='$HOSTNAME'”; my $myselect = $dbh->prepare($sql); $myselect->execute(); while($hostinfo = $myselect->fetchrow_hashref()) { return “$hostinfo->{$type}” ; } } } #####MYSQL SELECT SUB END###### #####MYSQL SELECT START ####### my $FC =shencan “fcversion”; chomp($FC); my $os = shencan “OS”; chomp($os); my $arch = shencan “arch”; chomp($arch); my $fdns =shencan “fdnsversion”; chomp($fdns); my $ng = shencan “ngversion”; chomp($ng); my $amr =shencan “amrversion”; chomp($amr); my $oh =shencan “ohversion”; chomp($oh); my $dm = shencan “dmversion”; chomp($dm); my $cpisbin = shencan “cpisbinversion”; chomp($cpisbin); my $node = shencan “node”; chomp($node); my $type1 =shencan “type”; chomp($type1); #####MYSQL SELECT END###### ####CHECK NG VERSION START##### my $NG =`rpm -q NG`; chomp($NG); ####CHECK NG VERSION END##### ####CHECK AMR VERSION START##### my $AMR =`rpm -q AMR`; chomp($AMR); ####CHECK AMR VERSION END##### ####CHECK OH VERSION START##### my $OH =`rpm -q OH`; chomp($OH); ####CHECK OH VERSION END##### ####CHECK DM VERSION START##### my $DM =`rpm -q DM`; chomp($DM); ####CHECK DM VERSION END##### ####CHECK MFTT VERSION START##### my $MFTT =`rpm -q MFTT`; chomp($MFTT); ####CHECK MFTT VERSION END##### ####CHECK CPISBIN VERSION START##### my $CPISBIN = `rpm -q CPISBIN`; chomp($CPISBIN); ####CHECK CPISBIN VERSION END##### ####CHECK NODE START##### my @NODE=split(/-/,$HOSTNAME); $NODE = “$NODE[0]_$NODE[1]“; ####CHECK NODE END##### ####CHECK ARCH STAR ##### my $ARCH=`arch`; chomp($ARCH); #####CHECK ARCH END ##### ####CHECK EP53 STATUS AND UPDATE START##### my $ep53 =`dig \@127.0.0.1 www.qq.com >/dev/null && echo ok||echo bad`; chomp($ep53); update “update shencan.FC set ep53='$ep53′ where hostname='$HOSTNAME'”; ####CHECK EP53 STATUS AND UPDATE END##### ####CHECK EP80 STATUS AND UPDATE START##### my $GW=`route -n |awk ‘\$1==”0.0.0.0″{print \$2}'|awk -F”.” ‘{print \$1″.”\$2″.”\$3}'`; chomp($GW); my $IP=`ip a|grep inet|grep $GW|awk -F”[ /]” ‘{print\$6}'`; chomp($IP); my $ep80 =`curl -H “Host:www.qq.com” -o /dev/null -s -w “%{http_code}” http://$IP`; chomp($ep80); update “update shencan.FC set ep80='$ep80′ where hostname='$HOSTNAME'”; ####CHECK EP80 STATUS AND UPDATE END##### print “NG: $NG ARM: $AMR OH: $OH DM: $DM MFTT:$MFTT CPISBIN: $CPISBIN\n”; print “$HOSTNAME NODE: $NODE OS: $os arch: $arch FC: $FC fdns: $fdns ng: $ng\n”; #####CHECK OS START###### sub OS { open (OS,”</etc/issue”); @line =<OS>; $line= $line[0]; chomp($line); my @os =split(/\s+|\(|\)/,$line); if($os[0] ge “Red”){ $SC = “REHL$os[6].$os[10]“; }else{ $SC = “$os[0]$os[2]“; } } OS; close(OS); #####CHECK OS END###### ######CHECK FDNS OR NAME VERSION START###### open (FDNS,”</etc/ChinaCache/app.d/cpisbm.amr”); while(<FDNS>){ if(/RestartCmd/){ my @fc1 =split(/\s+/,$_); my $FC =”$fc1[2]“; if($FC ge “named”){ $FCVER=`/usr/sbin/named -v`; chomp($FCVER); my @FC1 =split(/\s+/,$FCVER); $FCVER1=”$FC1[0]$FC1[1]“; }else{ $FCVER=`/FlexiDNS/application/sbin/fdns -v`; chomp($FCVER); my @FC1 =split(/\s+/,$FCVER); $FCVER1=”$FC1[0]$FC1[1]“; } } } close(FDNS); ######CHECK FDNS OR NAME VERSION END###### #####CHECK FCVERSION AND TYPE START###### open (FC,”</etc/ChinaCache/app.d/cpisfc.amr”); while(<FC>){ if(/RestartCmd/){ my @squid =split(/\s+/,$_); my $SQUID =”$squid[2]“; if($SQUID ge “squid”){ $SQUIDVER=`/usr/local/squid/sbin/squid -v|head -n 1 |awk ‘{print “V”\$4}'`; chomp($SQUIDVER); $TYPE=”FC5″; }else { $SQUIDVER=`/usr/local/flexicache/sbin/flexicache -v|awk ‘{print \$3}'`; chomp($SQUIDVER); $TYPE=”FC6″; } } } close(FC); #####CHECK FCVERSION AND TYPE END###### ####Change MYSQL ####### if($SQUIDVER eq $FC){ }else{ update “update shencan.FC set fcversion='$SQUIDVER' where hostname='$HOSTNAME'”; } if($NG eq $ng){ }else{ update “update shencan.FC set ngversion='$NG' where hostname='$HOSTNAME'”; } if($DM eq $dm){ }else{ update “update shencan.FC set dmversion='$DM' where hostname='$HOSTNAME'”; } if($AMR eq $amr){ }else{ update “update shencan.FC set amrversion='$AMR' where hostname='$HOSTNAME'”; } if($OH eq $oh){ }else{ update “update shencan.FC set ohversion='$OH' where hostname='$HOSTNAME'”; } if($CPISBIN eq $cpisbin){ }else{ update “update shencan.FC set cpisbinversion='$CPISBIN' where hostname='$HOSTNAME'”; } if($NODE eq $node){ }else{ update “update shencan.FC set node='$NODE' where hostname='$HOSTNAME'”; } if($TYPE eq $type1){ }else{ update “update shencan.FC set type='$TYPE' where hostname='$HOSTNAME'”; } if($FCVER1 eq $fdns){ }else{ update “update shencan.FC set fdnsversion='$FCVER1′ where hostname='$HOSTNAME'”; } if($SC eq $os){ }else{ update “update shencan.FC set OS='$SC' where hostname='$HOSTNAME'”; } if($ARCH eq $arch){ }else{ update “update shencan.FC set arch='$ARCH' where hostname='$HOSTNAME'”; } my $time = strftime “%Y-%m-%d_%H:%M:%S”, localtime; chomp($time); update “update shencan.FC set lmtime='$time' where hostname='$HOSTNAME'”;
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2025年01月04日
2025年01月04日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]