VB omnipotent 6: monitor program running
-- Author: bell
Blog: http://blog.csdn.net/useway
In a twinkling of an eye, this series of articles has been written to the sixth one. What do you want to write today? I still have to write something that does not seem to be done by VB. So let's write VB's control over the operating system from today on. First, let's talk about the VB monitoring method for the called
Solution:top-d 0.01-n 2000-b|grep Lzma-d Specifies how often the top collects data, which is 0.01 seconds.-n Specifies the total number of times, which is set to 2000, to ensure that top does not end the statistics during the program run.GREP specifies the process characteristics that need to be counted.How to use:1. Enable 2 sessions, one session runs as above command, another session runs the specified program, and the top command outputs the resource usage associated with this command.Use the
Monitoring services, which are placed on crontab tasks, individuals do not like to use a dead loop to run in the background.So every time 3 cycles are executed, 3 cycles in a row, and any one of the services is down, the alarm will be reported.Popularize small knowledge, pay attention to redirect 3 kinds of writing, in fact, the effect is the same.#!/bin/bashnmap-p606510.31.6.6|egrep "6065/tcpopen" >/dev/nullcode1=$?nmap-p8010.31.6.6|grep "80/tcpopen http ">/dev/null2>1code2=$?curlhttp://10.31.
follows:
$ Conky
Running Conky Monitor
This allows Conky to run as a window and use the Conky base configuration file located in/etc/conky/conky.conf.
You might want to integrate Conky into the desktop and don't want it to appear every time you have a window, and here's what you need to do:
Copy the profile/etc/conky/conky.conf to your home directory and rename it to. CONKYRC, the startin
Microsoft SQL Server 2005 provides a number of tools to monitor the database. One way to do this is to manage views dynamically. Server state information returned by the dynamic management view (DMV) and dynamic management functions (DMF) can be used to monitor the health of server instances, diagnose problems, and optimize performance.
General server dynamic management objects include:
Dm_db_*: Database
Commands under Aix
1) topas checks the operating status of the Operating System
2) nmon (c -- CPU, m -- Memory, d -- Disk) checks the three conditions
Commands in Oracle
Tip: The following views monitor the database status on the production machine in real time. The query results change with the database system status at all times.
(1)
Selectopname, target, start_time, last_update_time, SQL _hash_value from V $ session_longopsorder by star
In order to achieve a highly available based on the Apache web site environment, in Apache for a variety of reasons automatically stop running, want to immediately restore site access, this requires a tool to monitor the operation of Apache real-time and can automatically restart the HTTPD service, on the Internet to find relevant information, Rewrite the following simple monitoring and restart script:Princ
Preface:
Preface:An error occurred while submitting the business alarm order. The page was not responded. After troubleshooting, the transaction was not committed or rolled back. I thought that if the operation status of the transaction was monitored in time, in this way, you can troubleshoot the problem in time to facilitate operation and processing. Therefore, you have created a shell script for nagios to handle transaction alerts.
1. write a transaction monitoring script
#! /Bin/bash
# Autho
When we are not using ADO. net for data interaction, but with some E/R database frameworks (such as nhib.pdf, LINQ to SQL, EF, etc.) for data interaction, it is often difficult to intuitively see the SQL statements executed in the database. At this time, we can only go to the database and execute some SQL statements to monitor the database operation. The following is an SQL monitoring script (applicable to SQL Server 2005)
Select creation_time n '
You can use bootchart to conveniently monitor linux Startup and RuntimeStatus, And the status information is Graphically displayed and output as an image.However, because of the special implementation of bootchart, it is not suitable for embedded systems.In an embedded system, you can use the simplified bootchart-lite to replace bootchart.1. Download bootchart-lite source codeHttp://code.google.com/p/bootchart-lite/2. CompileCC = arm-linux-gcc./config
Write a shell script to check whether a process is running
1 #! /Bin/ Sh 2 3 Cmd = Pgrep 4 # Process name 5 Pproc = Test 6 # Loop, to keep the script running for monitoring 7 While : 8 Do 9 If [-N " '$ Cmd $ pproc' " ] 10 Then Echo " Test is OK " 11 Else 12 Echo " Test is killed " 13 Fi 14 #60 seconds for each monitoring 15 Slee
My idea is to simply add a performance monitoring tool during Flash Player running.This helps me understand some of its situations. The framestats tool helps you determine that flash player is executing code.It is still rendering or both.This tool
MyBatis is used in the project, a more annoying problem is unable to see the specific circumstances of the executed SQL, So, find the Log4jdbc-log4j2. This is a jdb-based
MyBatis is used in the project, a more annoying problem is unable to see the
1, first we enter the Control Panel, enter the method here will not nag, the Unified method: Start → run (Win+r can also call up the operation) input: Control Click OK (or carriage return execution).
2, access to power options, two ways,
Script content:
The code is as follows
Copy Code
VI iptables-reset.sh#!/bin/bash#Powered by blog.slogra.comport= ' Iptables-vl|grep Ssh|awk ' {split ($NF, A, ":");p rint a[2]} ' |wc-l 'if [$port = 1];thenecho
Introduction: Using MyBatis in the project, a more vexing problem is the inability to see the specifics of the SQL executed, so the log4jdbc-log4j2 is found. This is a JDBC-based monitoring tool that listens to the main operations of the database,
Introduction: The use of MyBatis in the project, a more annoying problem is unable to see the specific execution of the SQL, So, find the Log4jdbc-log4j2. This is a jdbc-level listening tool that can listen for the main operations on the database,
One server installs zookeeper and starts, then installs monitor dubbo-monitor-simple-2.8.3 on another server to unzip the installationModifying a configuration fileDubbo.container=log4j,spring,registry,jettyDubbo.application.name=simple-monitorDubbo.application.owner=#dubbo. registry.address=multicast://224.5.6.7:1234dubbo.registry.address=zookeeper://113.52.182.149:54111?backup=113.52.182.150:54111#dubbo.
Real Spy Monitor is a software that monitors the Internet and personal computers to safeguard their security. including keystrokes, Web sites, Windows switches, program execution, screen scanning, and access to files are the objects of their monitoring.1. Add the Use passwordBefore you use real Spy Monitor to monitor your system, you need to set up some of the fo
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.