#!/usr/bin/Envpython#-*-coding=utf-8-*-#Using GPL v2.7#Author: [email protected]126. Com#python Monitoring System Load"""1, the realization principle: obtains the system information through the SNMP protocol, then carries on the corresponding computation and the format, the final output result2, special note: SNMP is required on the monitored machine.Yum Install-Y net-snmp*installation"""#!/usr/bin/pythonimport osdef getallitems (Host, OID): SN1= Os.popen ('snmpwalk-v 2c-c Public'+ Host +' '+ OI
This article is an example of how Android monitors phone status and sends email notification calls. Share to everyone for your reference, specific as follows:
You can use Phonestatelistener to listen to mobile phone status (e.g. standby, call, Bell, etc.) on Android. This example is through it to monitor mobile phone status, when the phone calls, through the mail will send the caller number to the user's mailbox example. The specific procedures are a
:2Blocking_query:nullBlocking_lock_id:1592100:32:3:4Blocking_lock_mode:xBlocking_trx_started:2018-06-26 11:49:08blocking_trx_age:00:00:53Blocking_trx_rows_locked:1Blocking_trx_rows_modified:1Sql_kill_blocking_query:kill Query 2Sql_kill_blocking_connection:kill 2MySQL finally very intimate even kill SQL statements are produced, you only need to copy, paste canCareful you will find that through the innodb_lock_waits you can only see the lock statement, but do not see which query statement has the
return none, so we cannot draw a space-time curve for a normal, not full tablespace. Only when it is more than 93% slow, do we know the specific occupancy situation. If you want to collect and retain more information, you need to use a custom query by adding the SQL that you want to check in the Query.props file, for example, if we want to know about tablespace information, we can put down sql: Customtbl. Query=select ' TBL: ' | | a.tablespace_name| | ', ' TBL,
' total Size: ' | | Trunc (SUM (
, Cut command By default is tab-delimited, but PS aux display the string blank is a space instead of tab, we will use a space to split, Some of the string is a number of spaces, here the-f8 parameter is to intercept the 8th string (some system may be 6th), this string is the CPU utilization of MySQL!Maybe you have a question, now that you've got the CPU usage of MySQL, why is there a cut in the back? That's a good question! I didn't think of it at the beginning. Because we're comparing CPU occup
@FreeSize = freesize*1.0/1024 From (SELECT row_number () over (ORDER by Freesize ASC) as RowIndex, Freesize as Freesize From #DiskCapacity ) T WHERE RowIndex = 1; SELECT freesize*1.0/1024 from #DiskCapacity; BEGIN IF @FreeSize > 1 SET @EmailHead = ' Database disk capacity alarm (Alarm level 3) ' IF @FreeSize >= 0.5 SET @EmailHead = ' Databa
Monitoring Alert logsIdea: Follow the alert journal line number to the current last row and the previous scan row compared to the last scanned row from the previous scan line to scan to the final line#!/bin/bashscripthome= ' dirname$0 ' scriptname= ' basename$0 ' logdir= $scriptHome/logs#logfile= $logDir/$ scriptname_$ (date "+%y%m%d"). loglogfile= $logDir/ora-error.logrunfile= $logDir/run.logalertlogfile=/u01/app /oracle/diag/rdbms/orcl/orcl/trace/alert_orcl.logip= ' ifconfig|sed ' 2q ' |awk- f
Original address: 51417313Discover a tool for Arandr. The Arandr is a GUI tool that provides Ubuntu with the ability to set display resolutions and how to extend them.Use ubuntu under install command:[HTML] view plain copy
sudo apt-get install Arandr
Enter in terminal after installation is completeArandr appears as shown in the interfaceAt this time just adjust the position of LVDS1 and VGA1 click on the upper left corner of the tick, found to change over. Note that because my external di
Once the backup SQL file is generated in auto-package, monitor the operation!#Crontab Time # variablesfile_dir=/data/mysql_bak/ #备份存放路径DATE = ' Date +%y_%m_%d ' #获取当前系统时间FILE_NAME = " Mysqldata_bak_$date.tar.gz "#最终保存的数据库备份文件名FILE =${file_dir}${file_name} #echo" $FILE "# to determine if the backup file of the day generates an IF [!-f ' $FILE ']; Then echo "####### $DATA #########" >>/data/mysql_bak/mysql_bak.err echo "MySQL back up $DATE hava not crea ted! ">> /data/mysql_bak
1. Download sitescope2. you can install sitescope by default. The license number can be blank first. If it is blank, it indicates trial use. You can enter it after installation. After the installation is complete, a page is displayed. Click
This article mainly introduced PHP script monitoring Nginx 502 error and automatically restart PHP-FPM, this article directly give the implementation code, and then put into cron implementation, need friends can refer to the
Recently the server
Common fault One: the computer just opened the screen of the monitor jitter very badly, sometimes even the icon and text can not see clearly, but after one or two minutes will return to normal.
This phenomenon occurs more in humid weather, is the
Use an Oracle trigger to monitor an incremental deletion of a table and record it in another table.
Code:
Copy Code code as follows:
Create or Replace Trigger Test_trigger
Before insert or update or delete on test_table
For each row
Copy Code code as follows:
#!/usr/bin/env python
Import Sys,time
From socket import socket
def read_interface (in_file):
With file (In_file) as F:
return F.readlines () [2:]
def set_interface (inter_msg):
dic={}
For i in Xrange (Len
There are several problems in getting mobile phone usage traffic:①ios is unable to monitor the boot and shutdown broadcasts like Android, immediately shuts down and then turns on, and the traffic on the monitored mobile network is emptied by default.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.