您好,登錄后才能下訂單哦!
需求:
獲得的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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。