Alibabacloud.com offers a wide variety of articles about screensaver for two monitors, easily find your screensaver for two monitors information here online.
This article describes the jquery Monitoring text box event and how to handle it accordingly. Share to everyone for your reference. Specific as follows://事情委托$(document).on(‘input propertychange‘, ‘#query‘, function(){var input = $(this).val();show(input);});var show = function(txt){var info = ‘监听: + txt + ‘+ ‘相关搜索: + showTags(txt);$(‘.info‘).html(info);}var showTags = function(txt){var tag = ‘‘;if(txt.length){for (var i = 0; i tag += ‘+txt+‘相关‘+i+‘;};}return tag;}jquery
Background introductionThe company has a number of Web sites, no configuration monitoring services, every day to check whether the server is working properly. Inefficient and time-consuming.
Code Snippets#!/bin/bash# Author Jerry.huang (Email:[email protected]) # Check Web Serverif[[-Z ' curl-i-S"http://www.baidu.com"|grep "OK"` ]]; ThenEcho "www.baidu.com Server server is down"| Mail-s"www.baidu.com Server Alert"[Email protected],616043155@qq. com Echo "$ (date) www.baidu.com server is down">
An alert Shell script that monitors MySQL transactions in Nagios for a long time without RUNNING.Preface:1. Write a transaction monitoring script#! /Bin/bash2. Add script monitoring on the nagios ClientTest the script first.[Root @ wgq_idc_dbm_3_61 binlog] #
Add monitoring command in nrpe. cfg4. Add configuration options on the main monitoring server of nagiosCheck on the nagios server firstAdd the transaction monitoring option in services. cfg:Add th
Php monitors the status of the varnish Cache Server
This article describes how to monitor the status of the varnish Cache Server in php. Varnish is a high-performance open-source HTTP accelerator that can replace Squid, Nginx, and other servers. For more information, see
When varnish and the website are deployed on the same server, it is impossible for us to log on to the server at any time to check varnish's hit rate. I did not expect a great man t
Jconsole monitors tomcat JVM memory, threads, CPU, and jconsolejvm
JConsole was introduced from Java 5 to monitor Java application performance and trace Java code. Jconsole is a built-in JDK monitoring tool. You only need to find the JDK installation path, open the bin folder, and double-clickJconsoleYou can.
0. Preparations before monitoring
Write the code to tomcat/bin/catalina. sh.
CATALINA_OPTS=-Djava.awt.headless=true JAVA_OPTS="-Djava.rmi.serve
Shell that monitors PHP processes and error log checks
1: When doing some asynchronous processing, it is inevitable that the program hangs, this shell can be used to listen to the queue processing of the PHP script process, if the process is dead will be restarted.
#!/bin/bashprocess= ' ps-ef|grep '/www/project/handle.php ' |grep-v grep|wc-l ' if [$process-eq 0];then/usr/bin/php/www/ project/handle.php# here can also record the log, understand the s
PHP Script monitors nginx 502 error and automatically restarts PHP-FPM
The server occasionally appears Nginx 502 bad Gateway, if in the computer next to good, if midnight or go out, how to do?No problem, write a script to detect the status of the service, found an exception, automatic restart.Automatic Restart Script:
Php$url= ' Http://blog.rebill.info '; $cmd= '/usr/local/php/sbin/php-fpm restart '; for($i= 0;$i$i++){ $exec= "Curl Connec
Host hosts in Cloudstack for some reason the status is not up, and you want Nagios to monitor this state through Cloudmonkey, as follows:#!/usr/bin/python#desc:thisscriptistocheckthestatusof hostsincloudstack#canuse-htoshow Usageimportos,sysimportjsonfromoptparseimportoptionparsere_ok=0e_ warning=1e_critical=2e_unknown=3e_code=e_okparser= Optionparser () parser.add_option ("-I", "--ignore", dest= "Ignore", help= "ipaddressthat ignoretocheck ") (Options,args) =parser.parse_args () comm= '/usr/bin
= Smtplib. SMTP () s.connect (mail_host) s.login (Mail_user,mail_pass) s.sendmail (me, Mailto_list,msg.as_string ()) print (' Send successfully! \ n ') s.close () exceptexception ase:print (str (e))The following effects are performed:650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/06/98/wKiom1m6i9azyByDAABqTWMs_tc175.png "title=" 1.png "alt=" Wkiom1m6i9azybydaabqtwms_tc175.png "/>Hidden Points of knowledge!1) Du-s is based on the bytes to statistics, "--exclude= ' Yunwei '" is in th
I believe everyone is familiar with the netstat command, the main use of this command, the online spread of the DDoS deflate tool is to use the number of IP to count external connections, and then combined with Iptables method to implement an IP blacklist and unblock an IPNetstat-ntu | awk ' {print $} ' | Cut-d:-f1 | Sort | uniq-c | Sort-none of the commands used, there are obvious deficiencies, such as not determining whether the local connection 127.0.0.1 or any address identifies 0.0.0.0 or e
First, the script functionTo determine whether the IP is occupied, the ping rule is considered to be occupied and the results are output to ip_yes.txt and Ip_no.txt, respectively, by means of the ping command detection.Second, script writing#!/bin/bash#Check the network is onlineip_num=192.168.1.For i in ' SEQ 1 254 'DoPing-c 2 $ip _num$i >/dev/nullIf [$? = 0];thenecho "Echo $ip _num$i is yes"Echo $ip _num$i is yes >> ip_yes.txtElseecho "Echo $ip _num$i is no"Echo Echo $ip _num$i is no >> ip_no.
#!/bin/shecho "Current DIR is" $PWDWhile [1]DoServerpid= ' Ps-ef|grep process name |grep-v Grep|awk ' {print $} 'If ["$serverpid"]Thenecho "Process name is Running,pid" $serverpid#kill-9 $serverpidElseecho "Process name is down, now starting ..."dt= ' Date +%f 'Nohup process 2>>/data/socket/$dt "_ad_error.log" 1>>/data/socket/$dt "_ad_access.log" FiSleep 5DoneA script that monitors the process, if the process unexpectedly restarts the process
The script implements a 2-per-scan monitoring of the process for the specified process name and restarts once the discovery process does not exist.#!/bin/sha=10;While [[@a-gt 5]]; Doif test $ (pgrep-f $1|wc-l)-eq 2;thenSH stop.shGnome-terminal-x SH start.sh FiSleep 2;DoneSummary: (1) indicates that the current process starts a process to execute the gnome-terminal command, (2) The parent process of Linux hangs up, the child process is not hung, but the parent process of the child process is set
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.