-defined service.
static void Main(){ System.ServiceProcess.ServiceBase[] MyServices; MyServices = new System.ServiceProcess.ServiceBase[] { new Service1(), new Service2() }; System.ServiceProcess.ServiceBase.Run(MyServices);}
Iii. Windows service applications (using a timer to write window logs in real time ):1. Create a Windows Service Project ,:
2. Add a counter on the created Project (remember below the system. Timer class). For details, see the http://www.cnblogs.com/wxukie/archive/2
Motivation
Log is an indispensable function for the development of a software system. Whether it is problem tracing or status analysis, with log assistance, developers can trace the problem. For the implementation modules of these log functions, developers can choose the EventLog built in. net, or the third-party log4net .... And so on. There are so many implementation modules that can be used to simplify the workload of developers, but it also brings
exceptions to system logs. That is to say, we can view the exceptions in the event viewer.
For convenience, create an appexception. CS file in the app_code folder of the website and perform the following steps:
1. Add "using system. diagnostics;" reference. The diagnostics namespace provides classes that can interact with system processes, event logs, and performance counters.
2. Create a method named predictionlog () to write a log in the event log of the application.
3. In the exceptionlog ()
Syslog and Windows Event log collectionEVENTLOG Analyzer collects the event logs from distributed Windows devices, or collects syslog from distributed Linux and UNIX devices, switches, and routers (Cisco). The event log report is generated in real time to display important system information throughout the network.No need for agent/client software log CollectionFor event Log collection, the EventLog Analyzer application does not need to install a sepa
shut down each one, so it's easy to disconnect the network. After the network disconnects, the CPU drops immediately. So where exactly is the problem, it's time to sacrifice our weapon--sqlserver Profiler.Monitoring the database using SQL Server ProfilerLet colleagues use sqlprofiler monitoring for about 20 minutes, and then save as a trace file *.RTC.Let's see what the hell is wrong with sql:SQL1: Find the latest 30 alarm eventsSelect Top A.orderno,a.agentbm,a.alarmtime,a.removetime,c.name as
clear the system disk of junk filesExample: Remove all temporary files from the system diskRemove-item *.tmp-recurseManaging Event Logs
View the Practice log: Get-eventlog
Delete Event Log Clear-eventlog
Get-eventlog
-logname: View event logs of the specified type, word parameters are required
-newest: Specifies how many new logs a
Successfully re-opened the Eventlog-note:some events may have been missed.
Attempting to re-open the local eventlog ...
Unable to read the local eventlog reason: The event log file has changed between reads. ).
Event Type: Warning
Event Source: SQLServerAgent
Event Type: Alert Engine
Event id:312
Date: 2008-7-19
Event: 17:08:17
Users: N/A
Computer: B-se
Typically, people use file-based logs. There is no problem with this, but it is easier to use Windows to provide system internal logs.
If you have administrative privileges, you can create a new log at any time:
Copy Code code as follows:
New-eventlog-logname Mylog-source Jobdue, Jobdone, remark
This command creates a log called MyLog, which originates from "Jobdue", "Jobdone" and "remark". Admin permissions are just to create the lo
shut down each one, so it's easy to disconnect the network. After the network disconnects, the CPU drops immediately. So where exactly is the problem, it's time to sacrifice our weapon--sqlserver Profiler.Monitoring the database using SQL Server ProfilerLet colleagues use sqlprofiler monitoring for about 20 minutes, and then save as a trace file *.RTC.Let's see what the hell is wrong with sql:SQL1: Find the latest 30 alarm eventsSelect Top A.orderno,a.agentbm,a.alarmtime,a.removetime,c.name as
This article mainly introduces SQLSERVERAGENT warning: Event ID: 312, information: Event ID: 311, error: Event ID: 318, for more information, see Successfully re-opened the local eventlog-NOTE: Some events may have been missed.
Attempting to re-open the local eventlog...
Unable to read local eventlog (reason: the event log file has been changed between reads .).
unexpected issues during actual operation. Do not write the diagnostic database on your own unless you understand what the framework already provides.
The system. Diagnostics. debug, system. Diagnostics. Trace and system. Diagnostics. EventLog classes provideProgramAll tools to create diagnostic information. The functions of the first two classes are basically the same. Apart from the differences, the trace class is controlled by the preprocessing
Label:If you are reinstalling Oracle and the Setup program is running, please close it first. Full Uninstall: 1, stop all Oracle Services 2, through the Start menu Oracle installation products, Universal Installer Run the Oracle Uninstall Tool 3, run the Registry Editor, delete Oracle-related information, Mainly include: [XHTML]View Plaincopyprint?
Hkey_local_machine/software/oracle
hkey_local_machine/system/currentcontrolset/services/[all items beginning with Oracle]
hkey_local_mach
,a.AgentBm,a.AlarmTime,a.RemoveTime,c.Name as AddrName,b.Name as MgrObjName,a.Ch,a.Value,a.Content,a.Level,ag.Name as AgentServerName,a.EventBm,a.MgrObjId,a.Id,a.Cfmoper,a.Cfm,a.Cfmtime,a.State,a.IgnoreStartTime,a.IgnoreEndTime,a.OpUserId,d.Name as MgrObjTypeName,l.UserName as userName,f.Name as AddrName2 from eventlog as a left join mgrobj as b on a.MgrObjId=b.Id and a.AgentBm=b.AgentBm left join addrnode as c on b.AddrId=c.Id left join mgrobjtype as
size of the memory buffer for each shuffle file output stream, in KB. These buffers can reduce the number of disk seek operations and reduce system calls when creating shuffle intermediate files.
Spark. reducer. maxmbinflight
48
Each reduce task obtains the maximum size (in MB) of map output at the same time ). Since each map output requires a buffer to receive it, this means that each reduce task has a fixed memory overhead, so you need to set a small point unless there is a lar
Summary of solutions for service failure to respond to startup or control requests in a timely manner
Restart the service first, restart the service, or disable the service. Enable the eventlog service and the "WorldWideWebPublishing" service in sequence, and then iis is normal. If the problem persists, you can try the following methods one by one.
1. System Environment: Windowsxp + sp2, II5.0
Fault description: After the IIS service is stopped in th
connect to the database, just to insert a record. In contrast, this approach consumes system resources, and if the system itself does not have database support, then this approach is simply not feasible. This article is about the second way to write information to the system log.Several classes are provided in the System.Diagnostics namespace of. NET, specifically for operating system logs.One: Write information to the logFirst, we'll refer to the System.Diagnostics namespace. Then, we instanti
collected again.
4. Re-enable and start the event Log service.
5. If the Event Log service does not start successfully, restart Windows XP.
You will not be able to delete or rename log files during the event log service run
Occurs after Windows Event Viewer is opened: The event log file is corrupted (the event, corrupt)
Solution:
1 Disable the EventLog service and reboot the computer!
2 after reboot, delete the 3 evt files under System32
Appe
Button3click (Sender:tobject);Private{Private declarations}Public{Public declarations}EndVarForm1:tform1;Eventarr:array[0..1000]of eventmsg;Eventlog:integer;Playlog:integer;Hhook,hplay:integer;Recok:integer;Canplay:integer;Bdelay:bool;Implementation{$R *. DFM}Function Playproc (Icode:integer;wparam:wparam;lparam:lparam): Lresult;stdcall;BeginCanplay:=1;result:=0;If Icode 0 then//must pass the message to the next accepted unit in the message chainResult: = CallNextHookEx (Hplay,icode,wparam,lpar
Windows Registry Editor Version 5.00[-hkey_local_machine\system\currentcontrolset\services\oracleoradb11g_ Home1tnslistener][-hkey_local_machine\system\currentcontrolset\services\oraclemtsrecoveryservice][-hkey_local_ Machine\system\currentcontrolset\services\oraclejobschedulerxe][-hkey_local_machine\system\currentcontrolset\ Services\oracle11][-hkey_local_machine\system\currentcontrolset\services\oracle Data Provider for. NET][-HKEY_ Local_machine\system\currentcontrolset\services\oraclexetnsli
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.