CN110134546A - Batch restarts windows systems approach, electronic device and storage medium - Google Patents

Batch restarts windows systems approach, electronic device and storage medium Download PDF

Info

Publication number
CN110134546A
CN110134546A CN201910290126.XA CN201910290126A CN110134546A CN 110134546 A CN110134546 A CN 110134546A CN 201910290126 A CN201910290126 A CN 201910290126A CN 110134546 A CN110134546 A CN 110134546A
Authority
CN
China
Prior art keywords
user name
server
host
domain
restarts
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910290126.XA
Other languages
Chinese (zh)
Other versions
CN110134546B (en
Inventor
高峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910290126.XA priority Critical patent/CN110134546B/en
Publication of CN110134546A publication Critical patent/CN110134546A/en
Application granted granted Critical
Publication of CN110134546B publication Critical patent/CN110134546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to software developments, a kind of batch is provided and restarts windows systems approach, electronic device and storage medium, method includes: to call autoexec by ansible on host, and to autoexec input host ip, host subscriber's name, host login password, errorlevel is executed;Domain user name, domain login password are inputted on host, log in domain;Copy restarts the script of server into host;The network connection for establishing host and cluster server, judges whether network is connected to;Copy restarts the script of server to cluster server;Whether have domain user name, cluster server user name, if having cluster server user name and domain user name in local administrator group, the script for restarting server is called to execute reboot operation to corresponding server if veritifying in local administrator group.The present invention, which is not required to input password by platform server, carrys out reboot operation, can batch operation Server Restart, improve working efficiency and accuracy rate, reduce misuse rate.

Description

Batch restarts windows systems approach, electronic device and storage medium
Technical field
The present invention relates to field of software development, specifically, being related to a kind of batch restarts windows systems approach, electronics Device and storage medium.
Background technique
At present in industry local area network, for windows system, behaviour is restarted in execution after being required to Telnet host respectively Make, the server operation of more installation windows systems is very time-consuming, and can not also start simultaneously.This is invisible to increase people The time cost of member's operation, in view of the above problems, not finding that batch restarts the method for Windows system temporarily.
Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of batch and restarts windows systems approach, is applied to electronics and fills It sets, method includes the following steps:
Autoexec is called by ansible on host, and inputs host ip, user to the autoexec Name, password execute errorlevel;
The errorlevel proceeds as follows:
Domain user name, password are inputted on host, log in domain, wherein domain user name=Yu Ming user name;
Copy restarts the script of server into host;
The network connection of host and cluster server is established, and judges whether network is connected to;
Copy restarts the script of server to cluster server;
Whether have the domain user name, and record log is to host if veritifying in local administrator group, if local administrator group In have the domain user name, then whether in local administrator group have cluster server user name, and record log is to host if veritifying, if There is cluster server user name in local administrator group, then the script for restarting server is called to restart behaviour to cluster server execution Make.
Preferably, it veritifies before whether having domain user name and cluster server user's name in local administrator group, first disconnects Network connection.
Preferably, whether searched in administrators.txt by findstr-I-x order has and domain user name Matched character string therefore, it is determined that whether there is domain user name in local administrator group, and is existed by findstr-I-x order Searched in administrators.txt whether have with the matched character string of cluster server user name, therefore, it is determined that local management Whether there is cluster server user name in member's group.
Preferably, judged by way of variable d is set, passed through findstr-I-x " %Q% " " C: PsExe Log %1_administrators.txt " character string identical with domain user name is searched in administrators.txt, Character string identical with domain user name is such as found, then d+1, and judges whether domain user name is at this by the way that whether d is equal to 1 In ground group of administrators, if d be equal to 1, then it represents that do not find with the matched character string of the domain user name, then illustrate the domain use Reset command is not carried out not in administrators.txt in name in an account book, and output date, time, user name, server IP is into log, and otherwise, execution is restarted.
Preferably, judged by way of variable e is set, passed through findstr-I-x " %Q% " " C: PsExe Log %1_administrators.txt " searched in administrators.txt it is identical with cluster server user name Character string such as finds character string identical with cluster server user name, then e+1, and judges domain by the way that whether e is equal to 1 Whether user name is in local administrator group, if e is equal to 1, then it represents that do not find and the cluster server user name Matched character string then illustrates that the cluster server user name not in administrators.txt, is not carried out and restarts life Enable, and output date, the time, user name, server IP into log, otherwise, execution is restarted.
Preferably, copy restart server script be into host using the psexec.exe in PsTools tool come Execute the errorlevel for copied files on host or cluster server.
Preferably, also right after restart for the server of delay machine during executing the batch processing script restarted CPU down conversion process, and further monitor whether that there are also delay machine phenomenons, if cpu frequency is persistently increased to 100% after restart, Then determine to be that load too high leads to delay machine, then host control starting standby server, and continuous observation cpu frequency, if restarted Cpu frequency is no longer persistently increased to 100% afterwards, then determines delay machine Resolving probiems, the quantity for keeping current server to open.
The present invention also provides a kind of electronic device, which includes: memory and processor, is deposited in the memory It contains batch and restarts windows system program, the batch restarts realization when windows system program is executed by the processor Following steps:
Autoexec is called by ansible on host, and inputs host ip, user to the autoexec Name, password execute errorlevel;
The errorlevel proceeds as follows:
Domain user name, password are inputted on host, log in domain, wherein domain user name=Yu Ming user name;
Copy restarts the script of server into host;
The network connection of host and cluster server is established, and judges whether network is connected to;
Copy restarts the script of server to cluster server;
Whether have the domain user name, and record log is to host if veritifying in local administrator group, if local administrator group In have the domain user name, then whether in local administrator group have cluster server user name, and record log is to host if veritifying, if There is cluster server user name in local administrator group, then the script for restarting server is called to restart behaviour to cluster server execution Make.
Preferably, it veritifies before whether having domain user name and cluster server user's name in local administrator group, first disconnects Network connection.
The present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage has computer Program, the computer program includes program instruction, when described program instruction is executed by processor, realizes batch as described above Restart windows systems approach.
Batch of the invention restart windows systems approach, electronic device and storage medium do not need it is defeated by platform server Enter password and carry out reboot operation, can be restarted with batch operation server, save the plenty of time, improves working efficiency and accurate Rate reduces misuse rate.
Detailed description of the invention
By the way that embodiment is described in conjunction with following accompanying drawings, features described above of the invention and technological merit will become More understands and be readily appreciated that.
Fig. 1 is that the batch of the embodiment of the present invention restarts the flow diagram of windows systems approach;
Fig. 2 is the hardware structure schematic diagram of the electronic device of the embodiment of the present invention;
Fig. 3 is that the batch of the embodiment of the present invention restarts the module structure drafting of windows system program;
Fig. 4 is the unit composition figure of the veritification module of the embodiment of the present invention.
Specific embodiment
Restart windows systems approach, electronic device to describe batch of the present invention below with reference to the accompanying drawings and deposit The embodiment of storage media.Those skilled in the art will recognize, in feelings without departing from the spirit and scope of the present invention Under condition, described embodiment can be modified with a variety of different modes or combinations thereof.Therefore, attached drawing and description are at this Be in matter it is illustrative, be not intended to limit the scope of the claims.In addition, in the present specification, attached drawing do not press than Example is drawn, and identical appended drawing reference indicates identical part.
The batch of the present embodiment restart windows systems approach for by host to the windows system of cluster server System is restarted, and Fig. 1 is that the batch of the embodiment of the present invention restarts the flow diagram of windows systems approach, and this method includes Following steps:
Step S10 calls autoexec by ansible (configuration management tool) on host, and at described batch It manages file and inputs host ip, user name, password, execute errorlevel.Its form are as follows:
ansible windows-m win_command-a"C:\PsExe\PsExe\windows.bat$1$2$3".Its In, C: PsExe PsExe windows.bat windows be errorlevel performed on host, $ 1 represents host ip Address, $ 2 are represented as host subscriber's name, and $ 3 represents host login password, user according to the practical IP of its host, host subscriber's name, The input of host login password.Wherein, the local account of the entitled host of host subscriber can only be logged in host and be used, can not To use Internet resources (such as network printer, network share Logical Disk, network edition application software).Therefore, it is also needed behind Domain is logged in, restarts cluster server using domain.
The errorlevel proceeds as follows:
Step S301 inputs domain user name, domain login password on host, logs in domain, wherein domain user name=Yu Ming User (user name), for example, PAICDOM user;
Step S302, copy restart the script of server into host, and in the present embodiment, the script for restarting server is Restart3.bat, behind execute restart the order of server when can call this script;
Step S303, establishes the network connection of host and cluster server, and judges whether network is connected to, specifically, can To be judged using ping order;
Step S304, copy restart the script of server to cluster server, the script of server are restarted due to having copied It to each cluster server, does not need to log in each server, when the later period, the order of server was restarted in execution, can call directly The script may make each server execution to restart;
Whether step S305, veritifying in Administrators (local administrator group) has domain user name, and record log To host, wherein the domain user logged in is verified whether in local administrator group, if there is domain user in local administrator group Name then executes reboot operation to cluster server and does not execute if not having the domain user name in local administrator group and restart behaviour Make.Also, before executing reboot operation to cluster server, also whether have in veritification Administrators (local administrator group) Cluster server user name, and record log is to host, wherein whether verification cluster server user name is in local administrator group In, if there is cluster server user name in local administrator group, reboot operation is executed to cluster server, if local administrator There is no cluster server user name in group, does not then execute reboot operation.
In one alternate embodiment, veritify Administrators (local administrator group) in whether have domain user name and Before cluster server user name, network connection can be disconnected.
In one alternate embodiment, by findstr-I-x order search in administrators.txt whether Have with the matched character string of domain user name, therefore, it is determined that whether having domain user in Administrators (local administrator group) Name.Similarly, whether have and cluster server user name in administrators.txt by findstr-I-x order The character string matched, therefore, it is determined that whether having cluster server user name in Administrators (local administrator group).
It is possible to further being judged by way of variable d is arranged.For example, passing through findstr-I-x " %Q% " " C: PsExe log %1_administrators.txt " order in administrators.txt search and domain user name Identical character string such as finds character string identical with domain user name, then d+1, and judges that domain is used by the way that whether d is equal to 1 Whether name in an account book is in local administrator group.If d is equal to 1, then it represents that do not find and the matched character of the domain user name String, then illustrate the domain user name not in administrators.txt, is not carried out reset command, and output date, the time, Domain user name, server IP into log.Otherwise, execution is restarted.
It can be by way of variable e is set and judge.For example, pass through findstr-I-x " %Q% " " C: PsExe Log %1_administrators.txt " order is searched and cluster server user famous prime minister in administrators.txt Same character string, such as finds character string identical with cluster server user name, then e+1, and sentence by the way that whether e is equal to 1 Whether disconnected domain user name is in local administrator group.If e is equal to 1, then it represents that do not find and used with the cluster server The matched character string of name in an account book then illustrates the cluster server user name not in administrators.txt, and weight is not carried out Open order, and output date, the time, cluster server user name, server IP into log.Otherwise, execution is restarted.
In one alternate embodiment, copy restart the script of server be into host using PsTools (it is long-range or Local area systems management tool packet) psexec.exe in tool come execute on host or cluster server for copied files Errorlevel.It is specific as follows:
Start C: PsExe psexec.exe 127.0.0.1-u " paicdom sqluser "-p%3-s-d-i
- accepteula C: PsExe copy.bat%1
Wherein, it is the IP of host that C: psexec, which is the path , 127.0.0.1 of psexec.exe program,.-u" Paicdom sqluser " be domain user name.It .-p%3 is domain login password.Copy.bat is the batch processing script for executing copy.
In one alternate embodiment, it often will lead to server delay machine when Kernel Panic, load too high, for delaying The server of machine is only to restart that problem may not be able to solve, during executing the batch processing script restarted, for delay machine Server, after the completion of restarting, to the CPU down conversion process of this server, and further monitor this server whether also There is delay machine phenomenon.If cpu frequency is persistently increased to 100% after restart again, judgement is load too high, then host control is opened Dynamic standby server.And the cpu frequency of continuous observation this server, it is no longer persistently increased to if restarting rear cpu frequency 100%, then determine delay machine Resolving probiems, the quantity for keeping current server to open.
As shown in fig.2, being the hardware structure schematic diagram of the embodiment of electronic device of the present invention.It is described in the present embodiment Electronic device 2 be it is a kind of can according to the instruction for being previously set or store, automatic progress numerical value calculating and/or information processing Equipment.For example, it may be smart phone, tablet computer, laptop, desktop computer, rack-mount server, blade type take It is engaged in device, tower server or Cabinet-type server (including server set composed by independent server or multiple servers Group) etc..As shown in Fig. 2, the electronic device 2 includes at least, but it is not limited to, depositing for connection can be in communication with each other by system bus Reservoir 21, processor 22, network interface 23.Wherein: the memory 21 includes at least a type of computer-readable storage Medium, the readable storage medium storing program for executing include flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), Random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable are only Read memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..In some embodiments In, the memory 21 can be the internal storage unit of the electronic device 2, such as the hard disk or memory of the electronic device 2. In further embodiments, the memory 21 is also possible to the External memory equipment of the electronic device 2, such as electronics dress Set the plug-in type hard disk being equipped on 2, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, the memory 21 can also both include the electronic device 2 Internal storage unit also include its External memory equipment.In the present embodiment, the memory 21 is installed on commonly used in storage The operating system and types of applications software of the electronic device 2, such as the batch restart windows system-program code etc.. In addition, the memory 21 can be also used for temporarily storing the Various types of data that has exported or will export.
The processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in the control electricity The overall operation of sub-device 2, such as execute control relevant to the electronic device 2 progress data interaction or communication and processing Deng.In the present embodiment, the processor 22 is for running the program code stored in the memory 21 or processing data, example Batch as described in running restarts windows system program.
The network interface 23 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the electronic device 2 and other electronic devices.For example, the network interface 23 is used to incite somebody to action by network The electronic device 2 is connected with push platform, and data transmission channel is established between the electronic device 2 and push platform and is led to Letter connection etc..The network can be intranet (Intranet), internet (Internet), global system for mobile communications (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband CodeDivision Multiple Access, WCDMA), 4G network, 5G network, bluetooth (Bluetooth), Wi-Fi etc. is wireless Or cable network.
Optionally, which can also include user interface, and user interface may include input unit such as keyboard (Keyboard), speech input device such as microphone (microphone) etc. has the equipment of speech identifying function, voice defeated Device such as sound equipment, earphone etc. out.
Optionally, user interface can also include standard wireline interface and wireless interface.
Optionally, which can also include display, and display is referred to as display screen or display unit. It can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and Organic Light Emitting Diode in some embodiments (Organic Light-Emitting Diode, OLED) display etc..Display is used to be shown in handle in electronic device 2 Information and for showing visual user interface.
It should be pointed out that Fig. 2 illustrates only the electronic device 2 with component 21-23, it should be understood that not It is required that implement all components shown, the implementation that can be substituted is more or less component.
It may include operating system in memory 21 comprising readable storage medium storing program for executing, restart windows system program in batches 50 etc..Processor 22 executes and realizes following steps when restarting windows system program 50 in batches in memory 21:
Step S10 calls autoexec by ansible (configuration management tool) on host, and at described batch File input host ip, host subscriber's name, host login password are managed, errorlevel is executed.
The errorlevel proceeds as follows:
Step S301 inputs domain user name, domain login password on host, logs in domain, wherein domain user name=Yu Ming User (user name), for example, PAICDOM user;
Step S302, copy restarts the script of server into host, is restart3.bat in the present embodiment, behind This script can be called when executing and restarting the order of server;
Step S303, establishes the network connection of host and cluster server, and judges whether network is connected to, specifically, can To be judged using ping order;
Step S304, copy restart the script of server to cluster server, the script of server are restarted due to having copied It to each cluster server, does not need to log in each server, when the later period, the order of server was restarted in execution, can call directly The script may make each server execution to restart;
Whether step S305, veritifying in Administrators (local administrator group) has domain user name, and record log To host, wherein the domain user logged in is verified whether in local administrator group, if having the domain user name in group, to cluster Server executes reboot operation and does not execute reboot operation if not having the domain user name in local administrator group.Also, it is holding Before row reboot operation, also whether there is cluster server user name in veritification Administrators (local administrator group), and remember Log is recorded to host, wherein verification cluster server user name is whether in local administrator group, if there is cluster server in group User name then executes reboot operation to cluster server and does not hold if not having cluster server user name in local administrator group Row reboot operation.
In the present embodiment, the batch being stored in memory 21, which restarts windows system program, to be divided For one or more program module, one or more of program modules are stored in memory 21, and can be by one Or performed by multiple processors (the present embodiment is processor 22), to complete the present invention.For example, Fig. 3 shows the batch weight Open the program module schematic diagram of windows system program, in the embodiment, the batch restarts windows system program 50 can To be divided into autoexec calling module 501, login module 502, copy module 503, networking and suspension module 504, core Test module 505.Wherein, the so-called program module of the present invention is the series of computation machine program instruction for referring to complete specific function Section restarts implementation procedure of the windows system program in the electronic device 2 more suitable for describing the batch than program. The concrete function of the program module will specifically be introduced by being described below.
Wherein, autoexec calling module 501 calls batch processing by ansible (configuration management tool) on host File, and host ip, domain user name, domain login password are inputted to the autoexec, execute errorlevel.Its form Are as follows:
ansible windows-m win_command-a"C:\PsExe\PsExe\windows.bat$1$2$3".Its In, C: PsExe PsExe windows.bat windows be errorlevel performed on host, $ 1 represents host ip Address, $ 2 are represented as host subscriber's name, and $ 3 represents host login password, user according to the practical IP of its host, host subscriber's name, The input of host login password.Wherein, the local account of the entitled host of host subscriber can only be logged in host and be used, can not To use Internet resources (such as network printer, network share Logical Disk, network edition application software).Therefore, it is also needed behind Domain is logged in, restarts cluster server using domain.
Login module 502 inputs domain user name, domain login password on host, logs in domain, wherein domain user name=domain Name user (user name), for example, PAICDOM user;
Copy module 503 copies the script for restarting server into host, is restart3.bat in the present embodiment, after Face can call this script when executing and restarting the order of server;
Networking and suspension module 504 establish the network connection of host and cluster server, and judge whether network is connected to, and have Body is said, can be judged using ping order;
Copy module 503 copies the script for restarting server to cluster server, and the foot of server is restarted due to having copied This arrives each cluster server, does not need to log in each server, when the later period, the order of server was restarted in execution, can directly adjust With the script, that is, each server execution may make to restart;
As shown in figure 4, veritifying module 505 includes that domain user name veritifies unit 5051, it is (local to veritify Administrators Group of administrators) in whether have a domain user name, and record log is to host, wherein whether verifies the user logged in local management In member's group, if there is the domain user name in group, reboot operation is executed to cluster server, if there is no the domain in local administrator group User name does not execute reboot operation then.
Veritifying module 505 further includes that cluster server user name veritifies unit 5052, restarts it executing cluster server Before, also whether there is a cluster server user name in veritification Administrators (local administrator group), and record log is to leading Machine, wherein whether verification cluster server user name is in local administrator group, if there is cluster server user name in group, Reboot operation is executed to server and does not execute reboot operation if not having cluster server user name in local administrator group.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium It can be hard disk, multimedia card, SD card, flash card, SMC, read-only memory (ROM), Erasable Programmable Read Only Memory EPROM (EPROM), any one in portable compact disc read-only memory (CD-ROM), USB storage etc. or several timess Meaning combination.It include that batch restarts windows system program etc. in the computer readable storage medium, the batch is restarted Windows system program 50 by specific embodiment that processor 22 executes and above-mentioned batch restart windows systems approach with And the specific embodiment of electronic device 2 is roughly the same, details are not described herein.
The above description is only a preferred embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art For member, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is made it is any modification, Equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of batch restarts windows systems approach, it is applied to electronic device, which is characterized in that this method includes following step It is rapid:
Autoexec is called by ansible on host, and to autoexec input host ip, user name, close Code executes errorlevel;
The errorlevel proceeds as follows:
Domain user name, password are inputted on host, log in domain, wherein domain user name=Yu Ming user name;
Copy restarts the script of server into host;
The network connection of host and cluster server is established, and judges whether network is connected to;
Copy restarts the script of server to cluster server;
Whether have the domain user name, and record log is to host if veritifying in local administrator group, if having in local administrator group Whether the domain user name, then veritifying has cluster server user name in local administrator group, and record log is to host, if local There is cluster server user name in group of administrators, then the script for restarting server is called to execute reboot operation to cluster server.
2. batch according to claim 1 restarts windows systems approach, which is characterized in that veritify local administrator group In whether have domain user name and cluster server user name before, first disconnect network connection.
3. batch according to claim 1 restarts windows systems approach, which is characterized in that ordered by findstr-I-x Order searched in administrators.txt whether have with the matched character string of domain user name, therefore, it is determined that local administrator group In whether have a domain user name, and searched in administrators.txt by findstr-I-x order and whether have and collect The matched character string of group's server user's name, therefore, it is determined that whether there is cluster server user name in local administrator group.
4. batch according to claim 3 restarts windows systems approach, which is characterized in that by the shape that variable d is arranged Formula judges, by findstr-I-x " %Q% " " C: PsExe log %1_administrators.txt " Character string identical with domain user name is searched in administrators.txt, such as finds character identical with domain user name String, then d+1, and by d whether be equal to 1 come judge domain user name whether be in local administrator group, if d is equal to 1, table Show do not find with the matched character string of the domain user name, then illustrate the domain user name not in administrators.txt In, be not carried out reset command, and output date, the time, user name, server IP into log, otherwise illustrate local pipe There is the domain user name in reason person's group.
5. batch according to claim 3 restarts windows systems approach, which is characterized in that by the shape that variable e is arranged Formula judges, by findstr-I-x " %Q% " " C: PsExe log %1_administrators.txt " Character string identical with cluster server user name is searched in administrators.txt, is such as found and is used with cluster server The identical character string of name in an account book, then e+1, and by e whether be equal to 1 come judge domain user name whether be in local administrator group, If e be equal to 1, then it represents that do not find with the matched character string of cluster server user name, then illustrate the cluster service Reset command, and output date, time, user name, service is not carried out not in administrators.txt in device user name Otherwise the IP of device illustrates there is the cluster server user name in local administrator group into log.
6. batch according to claim 3 restarts windows systems approach, which is characterized in that copy restarts server Script be into host executed using the psexec.exe in PsTools tool on host or cluster server for copying What the errorlevel of file was realized.
7. batch according to claim 1 restarts windows systems approach, which is characterized in that execute restart batch at During managing script, for the server of delay machine, after restart also to CPU down conversion process, and further monitor whether also Delay machine phenomenon, if cpu frequency is persistently increased to 100% after restart, judgement is that load too high leads to delay machine, then host control System starting standby server, and continuous observation cpu frequency is sentenced if restarting rear cpu frequency is no longer persistently increased to 100% Determine delay machine Resolving probiems, the quantity for keeping current server to open.
8. a kind of electronic device, which is characterized in that the electronic device includes: memory and processor, is stored in the memory There is batch to restart windows system program, the batch is restarted to be realized such as when windows system program is executed by the processor Lower step:
Autoexec is called by ansible on host, and to autoexec input host ip, user name, close Code executes errorlevel;
The errorlevel proceeds as follows:
Domain user name, password are inputted on host, log in domain, wherein domain user name=Yu Ming user name;
Copy restarts the script of server into host;
The network connection of host and cluster server is established, and judges whether network is connected to;
Copy restarts the script of server to cluster server;
Whether have the domain user name, and record log is to host if veritifying in local administrator group, if having in local administrator group Whether the domain user name, then veritifying has cluster server user name in local administrator group, and record log is to host, if local There is cluster server user name in group of administrators, then the script for restarting server is called to execute reboot operation to cluster server.
9. electronic device according to claim 8, which is characterized in that
It veritifies before whether having domain user name and cluster server user's name in local administrator group, first disconnects network connection.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey Sequence, the computer program includes program instruction, when described program instruction is executed by processor, realizes that claim 1-7 such as appoints Batch described in one restarts windows systems approach.
CN201910290126.XA 2019-04-11 2019-04-11 Batch restarting windows system method, electronic device and storage medium Active CN110134546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910290126.XA CN110134546B (en) 2019-04-11 2019-04-11 Batch restarting windows system method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910290126.XA CN110134546B (en) 2019-04-11 2019-04-11 Batch restarting windows system method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN110134546A true CN110134546A (en) 2019-08-16
CN110134546B CN110134546B (en) 2023-10-20

Family

ID=67569677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910290126.XA Active CN110134546B (en) 2019-04-11 2019-04-11 Batch restarting windows system method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110134546B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955457A (en) * 2019-10-11 2020-04-03 广西电网有限责任公司信息中心 Batch automatic operation and maintenance management method for operating systems
CN113422879A (en) * 2020-03-03 2021-09-21 富士施乐实业发展(中国)有限公司 Multifunction apparatus, control method thereof, user terminal, and control method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090265710A1 (en) * 2008-04-16 2009-10-22 Jinmei Shen Mechanism to Enable and Ensure Failover Integrity and High Availability of Batch Processing
CN105068900A (en) * 2015-07-27 2015-11-18 浪潮电子信息产业股份有限公司 Test method for remote control server cold reboot
CN105162623A (en) * 2015-08-12 2015-12-16 深圳市瑞驰信息技术有限公司 Cloud processing method and cloud server
CN105487943A (en) * 2015-12-09 2016-04-13 浪潮电子信息产业股份有限公司 Method for automatically copying files to each node of cluster server
CN106789362A (en) * 2017-02-20 2017-05-31 京信通信技术(广州)有限公司 A kind of device management method and network management system
WO2017124799A1 (en) * 2016-01-18 2017-07-27 中兴通讯股份有限公司 Firmware management method and device
CN107895107A (en) * 2017-12-21 2018-04-10 郑州云海信息技术有限公司 A kind of method and system of batch setting BMC username and passwords
CN108196982A (en) * 2017-12-29 2018-06-22 北京诺君安信息技术股份有限公司 A kind of LINUX system restarts the configuration method of service automatically

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090265710A1 (en) * 2008-04-16 2009-10-22 Jinmei Shen Mechanism to Enable and Ensure Failover Integrity and High Availability of Batch Processing
CN105068900A (en) * 2015-07-27 2015-11-18 浪潮电子信息产业股份有限公司 Test method for remote control server cold reboot
CN105162623A (en) * 2015-08-12 2015-12-16 深圳市瑞驰信息技术有限公司 Cloud processing method and cloud server
CN105487943A (en) * 2015-12-09 2016-04-13 浪潮电子信息产业股份有限公司 Method for automatically copying files to each node of cluster server
WO2017124799A1 (en) * 2016-01-18 2017-07-27 中兴通讯股份有限公司 Firmware management method and device
CN106789362A (en) * 2017-02-20 2017-05-31 京信通信技术(广州)有限公司 A kind of device management method and network management system
WO2018149221A1 (en) * 2017-02-20 2018-08-23 京信通信系统(中国)有限公司 Device management method and network management system
CN107895107A (en) * 2017-12-21 2018-04-10 郑州云海信息技术有限公司 A kind of method and system of batch setting BMC username and passwords
CN108196982A (en) * 2017-12-29 2018-06-22 北京诺君安信息技术股份有限公司 A kind of LINUX system restarts the configuration method of service automatically

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955457A (en) * 2019-10-11 2020-04-03 广西电网有限责任公司信息中心 Batch automatic operation and maintenance management method for operating systems
CN113422879A (en) * 2020-03-03 2021-09-21 富士施乐实业发展(中国)有限公司 Multifunction apparatus, control method thereof, user terminal, and control method thereof

Also Published As

Publication number Publication date
CN110134546B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
US20190163594A1 (en) Using Cognitive Technologies to Identify and Resolve Issues in a Distributed Infrastructure
US20150040127A1 (en) Virtual computing instance migration
JP5758995B2 (en) System, method and computer-readable storage medium for sharing analysis results between virtual machines
US8321843B2 (en) Automatic analysis of an application's run-time settings
CN109768961A (en) Wechat small routine login method, device and the storage medium led to based on an account
EP2989543B1 (en) Method and device for updating client
US20200272728A1 (en) Management of login information affected by a data breach
US9292341B2 (en) RPC acceleration based on previously memorized flows
US9973525B1 (en) Systems and methods for determining the risk of information leaks from cloud-based services
TWI719336B (en) System and method for micro-service heterogeneous regenerating based on industrial internet, readable storage medium
CN105450759A (en) System mirror image management method and device
CN109257249A (en) A kind of network interface card stability test method, apparatus, terminal and storage medium
CN107391038A (en) Method for writing data, flash memory and the storage medium of data storage type flash memory
CN110134546A (en) Batch restarts windows systems approach, electronic device and storage medium
CN112615945A (en) Domain name resolution record management method and device, computer equipment and storage medium
US11474809B2 (en) Upgrades based on analytics from multiple sources
US7630988B2 (en) Computer product and session management method
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
CN111399999B (en) Computer resource processing method, device, readable storage medium and computer equipment
CN107294905A (en) A kind of method and device for recognizing user
CN111683091A (en) Method, device, equipment and storage medium for accessing cloud host console
US10761940B2 (en) Method, device and program product for reducing data recovery time of storage system
CN109905407B (en) Management method, system, equipment and medium for accessing intranet based on VPN server
US10216505B2 (en) Using machine learning to optimize minimal sets of an application
CN109634690A (en) Data clearing method, device, terminal and storage medium based on WinPE system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant