您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
需求:
获得的Active_MQ的url数字,本次获的数等于今次减去上一次的数目
#!/bin/bash curl -u root:root 192.168.1.1:1111/admin/xml/queues.jsp > /usr/local/script/activemq_url_after.txt 2> /dev/null AFTER=`head -4411 /usr/local/script/activemq_url_after.txt | tail -1 | awk -F'"' '{print $2}'` BEFORE=`cat /usr/local/script/activemq_url_before.txt` expr $AFTER - $BEFORE echo $AFTER > /usr/local/script/activemq_url_before.txt
监控游戏用户金币获得
#!/usr/bin/env python import os,subprocess,sys for i in range (0,9): mytask=subprocess.Popen("mysql -uroot -p123456 -h 192.168.1.1 -e 'SELECT * FROM pjb0.UserScoreHistory%s WHERE CURDATE() = `Date` AND ScoreId = 1 AND IncNum > 1000000;'" % i,shell=True,stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdstr= mytask.stdout.read() if 'ERROR' in stdstr: print 0 sys.exit() num=os.popen("mysql -uroot -p123456 -h 192.168.1.1 -e 'SELECT * FROM pjb0.UserScoreHistory%s WHERE CURDATE() = `Date` AND ScoreId = 1 AND IncNum > 1000000;' | wc -l" % i) output = num.read() n=output.strip('\n') if n > 0: print n sys.exit() print 0
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。