· Local Connection
Because the server runs 24x7, the connection time of the NIC will change once it is restarted, and there will be a certain error with the actual boot time.
When will it be restarted? It can be calculated based on the current connection time of the network card and the total running time of the server. Of course, this approach is relatively simple, if a maintenance operation is performed on the server three to five days, a restart operation may occur in the middle of the process. This is a good decision, but if two or more times occur... other methods are required;
· Input"Systeminfo", The last start time of the server is displayed;
· In the service console (services. MSC), if a manually started service exists, you can check whether the service has been stopped. If it is stopped, it indicates that the server has actually restarted;
· System Log filtering related resources (Source"EventLog"If you find that"EventLog ")The event records of the server prove that the server has been restarted. The server can accurately determine when the server has restarted based on the time recorded by EventLog, if the server is maintained from 15 days to 30 days, you can filter all"EventLog"In this way, you can know exactly when the server has restarted several times!
· How to obtain the reason for server restart? The method I have come up with is captured from the system log. If you don't need to write your own program or monitor the program, I think this is the only method!