Operating system management device and method
By building a Restful API interface in the operating system, the cumbersome management of multi-machine operating systems is solved, centralized configuration management is realized, management efficiency and programmability are improved, and interface packaging costs are reduced.
Patent Information
- Application Number
- CN202411106886.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-12-03
AI Technical Summary
In multi-machine operating system management, the prior art causes cumbersome management and requires professional personnel, resulting in low operating system management efficiency, especially in cluster environments, the need to develop management interfaces to integrate into professional systems.
Provide an operating system management device and method, and build a Restful API interface for each operating system through the server. The client can send configuration management requests to update operating system configuration parameters, improve management efficiency and programmability, including the server and database. Real-time data acquisition and user authorization mechanism.
It realizes centralized configuration management of multiple operating systems, improves management efficiency and programmability, and saves time and cost of general interface packaging.
Smart Images

Figure CN119065727A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer operating systems, and in particular to an operating system management device and method. Background Art
[0002] In the information age, the importance of operating systems is self-evident. As the core and cornerstone of computer systems, operating systems play a key role at multiple levels, providing strong support for the information process of modern society. Modern operating systems are mostly managed and operated in desktop systems or command line mode, and there are hundreds or thousands of operating systems in general enterprises. Desktop systems need to log in to the desktop environment one by one to configure the management system, and the programmability is poor. The command line or network terminal mode requires high professionalism of management personnel.
[0003] In summary, the management of multi-machine operating systems is either cumbersome or requires professionals. In a cluster environment, corresponding management interfaces need to be developed before they can be integrated into professional systems, resulting in low management efficiency of the operating system. Summary of the invention
[0004] The purpose of this application is to provide an operating system management device and method, which can improve the management efficiency and programmability of the operating system.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides an operating system management device, comprising: a server and a client; the server is deployed on an operating system; the client is connected to multiple servers;
[0007] The client is used to receive a configuration management request input by a user, and send the configuration management request to the server; the configuration management request includes an operating system identifier and configuration parameters;
[0008] The server is used to determine the RestfulAPI interface of each service of each operating system, and according to the received configuration management request, use the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier, and make the operating system corresponding to the operating system identifier reload the configuration.
[0009] Optionally, the operating system management device further includes a database end;
[0010] The server is also connected to the database; the server is also used to obtain the configuration parameters and operation status information of each operating system in real time;
[0011] The database end is used to store the configuration parameters and operation status information of each operating system.
[0012] Optionally, the database also stores user information;
[0013] The client is also used to receive a login request input by a user and send the login request to the server; the login request includes a user name, password and role;
[0014] The server is also used to determine whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database. If so, authorization information is generated and sent to the client. Otherwise, illegal user information is sent to the client.
[0015] Optionally, the configuration management request also includes authorization information and a client identifier;
[0016] The server uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier based on the received configuration management request, specifically including: determining whether the received configuration management request carries authorization information; if so, using the corresponding RestfulAPI to update the configuration parameters of the operating system corresponding to the operating system identifier; otherwise, sending unauthorized information to the corresponding client.
[0017] Optionally, the client is further used to receive a data acquisition request input by a user and send it to the server; the data acquisition request includes a client identifier, an operating system identifier and authorization information;
[0018] The server is also used to determine whether the received data acquisition request carries authorization information. If so, the operating system running status information and configuration parameters corresponding to the operating system identifier are sent to the corresponding client according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client.
[0019] In a second aspect, the present application provides an operating system management method, comprising:
[0020] Determine the RESTful API interface of each service of each operating system through the server;
[0021] Obtaining a configuration management request input by a user through a client, and sending the configuration management request to the server; the configuration management request includes an operating system identifier and configuration parameters;
[0022] The server uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier according to the received configuration management request, and causes the operating system corresponding to the operating system identifier to reload the configuration.
[0023] Optionally, the operating system management method further includes:
[0024] Obtain the configuration parameters and operating status information of each operating system in real time through the server;
[0025] The configuration parameters and operating status information of each operating system are stored through the database.
[0026] Optionally, the database side also stores user information; before obtaining the configuration management request input by the user through the client, the operating system management method further includes:
[0027] Receive a login request input by a user through a client, and send the login request to the server; the login request includes a user name, password and role;
[0028] The server determines whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database. If so, authorization information is generated and sent to the client. Otherwise, illegal user information is sent to the client.
[0029] Optionally, the configuration management request also includes authorization information and a client identifier;
[0030] The server uses the corresponding Restful API interface to update the configuration parameters of the operating system corresponding to the operating system identifier according to the received configuration management request, specifically including:
[0031] The server determines whether the received configuration management request carries authorization information. If so, the corresponding RestfulAPI interface is used to update the configuration parameters of the operating system corresponding to the operating system identifier. Otherwise, unauthorized information is sent to the corresponding client.
[0032] Optionally, the operating system management method further includes:
[0033] Receive a data acquisition request input by a user through the client, and send it to the server; the data acquisition request includes a client identifier and an operating system identifier;
[0034] The server determines whether the received data acquisition request carries authorization information. If so, the operating system running status information and configuration parameters corresponding to the operating system identifier are sent to the corresponding client according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client.
[0035] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0036] The present application provides an operating system management device and method. By constructing a RestfulAPI interface for each service of each operating system on the server side, the user can input a configuration management request on the client side. The configuration management of multiple operating systems can be implemented based on the RestfulAPI interface constructed on the server side, thereby improving the management efficiency and programmability of the operating system and saving a lot of time cost for general interface encapsulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A schematic diagram of a user login authorization process provided in an embodiment of the present application;
[0039] Figure 2 A schematic diagram of a process for collecting operating system data provided by an embodiment of the present application;
[0040] Figure 3 A schematic diagram of a process for real-time data acquisition provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of a process for obtaining historical data provided by an embodiment of the present application;
[0042] Figure 5 A schematic diagram of a process for obtaining configuration information provided in an embodiment of the present application;
[0043] Figure 6 A flowchart of system software configuration provided in an embodiment of the present application;
[0044] Figure 7 A flowchart of an operating system management method provided in one embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0047] In an exemplary embodiment, Figures 1 to 6 As shown, an operating system management device is provided, including a server 2 and a client 1. The server 2 is deployed on an operating system 4; the client 1 is connected to multiple servers 2.
[0048] The client 1 is used to receive a configuration management request input by a user, and send the configuration management request to the server 2. The configuration management request includes an operating system identifier and configuration parameters.
[0049] Specifically, the client 1 is a device supporting the HTTP protocol, such as a browser. The Restful API interface provided by the server 2 is used to implement user login and access, display the real-time and historical operating status information of the operating system 4, and configure and manage the software and hardware of the operating system 4.
[0050] The server 2 is used to determine the RestfulAPI interface of each service of each operating system 4, and according to the received configuration management request, use the corresponding RestfulAPI interface to update the configuration parameters of the operating system 4 corresponding to the operating system identifier, and reload the configuration of the operating system 4 corresponding to the operating system identifier.
[0051] Specifically, the server 2 implements a set of RestfulAPI interfaces through the HTTP protocol, provides authorization, authentication and other mechanisms, realizes permission management, static configuration of the operating system 4 and real-time dynamic data collection, provides basic data for the client 1, and provides the client 1 with the configuration management function of the operating system 4 software through the configuration management interface.
[0052] RestfulAPI is a Web API whose design principles are simple and clear. It is easy to understand and implement. It supports multiple data formats such as JSON, XML, HTML, etc. and can run on different platforms and devices.
[0053] Through the RestfulAPI interface provided in this application, the management efficiency and programmability of the operating system 4 are improved, the management and integration speed of the operating system 4 are accelerated, and a large amount of time cost for general interface encapsulation is saved.
[0054] Furthermore, the operating system management device further comprises a database terminal 3. The server terminal 2 is also connected to the database terminal 3. The server terminal 2 is also used to obtain the configuration parameters and operation status information of each operating system 4 in real time.
[0055] The database end 3 is used to store the configuration parameters and operation status information of each operating system 4.
[0056] Specifically, the database end 3 uses a structured or unstructured database to store user information, configuration information of the operating system 4, operating status information of the operating system 4, and the like.
[0057] In order to ensure the security of operating system configuration management, the database end 3 also stores user information.
[0058] The client 1 is also used to receive a login request input by a user, and send the login request to the server 2. The login request includes a user name, a password and a role.
[0059] The server 2 is also used to determine whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database 3. If so, authorization information is generated and sent to the client 1, otherwise, illegal user information is sent to the client 1.
[0060] In this embodiment, the configuration management request also includes authorization information and client identification. The server 2 uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system 4 corresponding to the operating system identification according to the received configuration management request, specifically including: judging whether the received configuration management request carries authorization information, if so, using the corresponding RestfulAPI interface to update the configuration parameters of the operating system 4 corresponding to the operating system identification, otherwise, sending unauthorized information to the corresponding client 1.
[0061] Furthermore, the client 1 is also used to receive a data acquisition request input by a user and send it to the server 2. The data acquisition request includes a client identifier, an operating system identifier and authorization information.
[0062] The server 2 is also used to determine whether the received data acquisition request carries authorization information. If so, the operating status information and configuration parameters of the operating system 4 corresponding to the operating system identifier are sent to the corresponding client 1 according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client 1.
[0063] In order to better understand the technical solution of the present application, the user login authorization process, the operating system data acquisition process and the configuration management process are respectively introduced below.
[0064] (1) Figure 1 As shown, the user login authorization process is:
[0065] (11) Client 1 sends a login request and sends user information such as username, password, role, etc. to server 2 via HTTP protocol.
[0066] (12) After parsing the login request, the server 2 determines whether the user is a legitimate user through the database 3 or the system user. If the user is a legitimate user, authorization information is generated based on the user information and sent to the client 1 via the HTTP protocol. The subsequent communication between the client 1 and the server 2 can use the authorization information as the user credential (that is, authorization is successful). If the user is an illegal user, no authorization information is generated (that is, authorization fails).
[0067] (13) Client 1 sends a non-user login request, and server 2 determines whether it contains authorization information. If it contains legal authorization information, the request is dispatched to the corresponding interface and the return data is sent to client 1. Otherwise, the request fails. Non-user login requests include configuration management requests, data acquisition requests, etc.
[0068] (2) Figures 2 to 4 As shown in the figure, the operating system data acquisition process is:
[0069] (21) The server 2 obtains the real-time data of the operating system 4 (including software and hardware configuration information and operation status information).
[0070] (22) The server 2 parses and caches the real-time data of the operating system 4, and regularly samples and saves the real-time data to the database 3.
[0071] (23) Client 1 requests real-time data from server 2. Server 2 determines whether the user is a legitimate user. If the user is an illegal user, server 2 returns unauthorized information. If the user is a legitimate user, server 2 returns real-time data of the operating system 4 to client 1 for display.
[0072] (24) Client 1 requests historical data from server 2. Server 2 determines whether the user is a legitimate user. If the user is an illegal user, server 2 returns unauthorized information. If the user is a legitimate user, server 2 queries historical data from database 3 and returns the historical data to client 1.
[0073] (3) Figure 5 and Figure 6 As shown in the figure, the configuration management process is:
[0074] (31) Client 1 requests server 2 to obtain the system software configuration. Server 2 determines whether the user is a legitimate user. If the user is an illegal user, server 2 returns unauthorized information. If the user is a legitimate user, server 2 obtains the software configuration of operating system 4 and returns the software configuration of operating system 4 to client 1.
[0075] (32) Server 2 classifies and encapsulates each service and its configuration, and provides a Restful API interface with corresponding reference recommended values for the parameters and setting standards of each function, thereby realizing configuration management of each service.
[0076] (33) Client 1 requests a specified RestfulAPI interface to implement configuration management of the specified software in the operating system 4. Specifically, client 1 requests server 2 to set the system software configuration. Server 2 determines whether the user is a legitimate user. If the user is an illegal user, it returns an unauthorized message. If the user is a legitimate user, it checks whether the configuration parameters are legitimate. If not, it returns an invalid parameter message. Otherwise, it writes the software configuration to the operating system 4 and notifies the service to reload the configuration. The operating system 4 returns a message indicating whether the setting is successful.
[0077] For example, the RESTful API for adding an NFS share is / v1 / software / nfs / addshare. The request parameters are generally JSON or x-www-form-urlencoded: share path, accessible address range, read and write permissions, data storage method, etc. The response data is generally in JSON format: error code, error message, prompt message, etc.
[0078] In another exemplary embodiment, Figure 7 As shown, an operating system management method is provided, including steps 201 to 209.
[0079] Step 201: receiving a login request input by a user through the client 1, and sending the login request to the server 2. The login request includes a user name, a password and a role.
[0080] Step 202, the server 2 determines whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database 3. If so, authorization information is generated and sent to the client 1, otherwise, illegal user information is sent to the client 1.
[0081] Specifically, the client 1 sends a login request to the server 2 based on the HTTP protocol, and the server 2 sends authorization information to the client 1 based on the HTTP protocol.
[0082] Step 203 , obtaining configuration parameters and operation status information of each operating system 4 in real time through the server 2 .
[0083] Specifically, the server 2 uses system tools and system interfaces, including but not limited to dmidecode, rpm, apt, lscpu, lspci, lsusb and other tools to collect the hardware and software configuration information of each operating system 4, and uses iotop, iftop, iostat, vmstat, mpstat, sar, pidstat, sadc, nfsiostat, cifsiostat, iptraf, nmon, nmap and other tools to collect the running status information of each operating system 4, and saves the running status information to the database end 3 through sampling at a certain frequency.
[0084] The operating status information of the operating system 4 includes data such as the CPU information, GPU information, memory information, network bandwidth, disk IO, services, and process operating status of the operating system 4.
[0085] Step 204 , storing user information, configuration parameters of each operating system 4 and operation status information through the database end 3 .
[0086] Specifically, the database end 3 stores information such as operating system system identification, CPU model, CPU manufacturer, CPU core number, memory manufacturer, memory size, GPU model, GPU manufacturer, GPU memory size, GPU core number, motherboard information, hard disk information, external devices and installed software list.
[0087] Step 205: receiving a data acquisition request input by a user through the client 1 and sending it to the server 2. The data acquisition request includes a client identifier and an operating system identifier.
[0088] Step 206, the server 2 determines whether the received data acquisition request carries authorization information. If so, the operating status information and configuration parameters of the operating system 4 corresponding to the operating system identifier are sent to the corresponding client 1 according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client 1.
[0089] Step 207 , determining the Restful API interface of each service of each operating system 4 through the server 2 .
[0090] Among them, the services of the operating system 4 include but are not limited to Libvirt / Network / NTP / NFS / CIFS / FTP / HTTP / DNS / ISCSI / LVM / S3 / DB.
[0091] Step 208: Obtain the configuration management request input by the user through the client 1, and send the configuration management request to the server 2. The configuration management request includes an operating system identifier and configuration parameters.
[0092] Step 209: The server uses the corresponding Restful API interface to update the configuration parameters of the operating system 4 corresponding to the operating system identifier according to the received configuration management request, and causes the operating system 4 corresponding to the operating system identifier to reload the configuration.
[0093] Specifically, the configuration management request also includes authorization information and client identification. In step 209, the server uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system 4 corresponding to the operating system identification according to the received configuration management request, which specifically includes: judging whether the received configuration management request carries authorization information through the server 2, and if so, using the corresponding RestfulAPI interface to update the configuration parameters of the operating system 4 corresponding to the operating system identification, otherwise, sending unauthorized information to the corresponding client 1.
[0094] This application constructs a RestfulAPI interface for each service of each operating system 4 through the server 2. Users can view the real-time operating status information, real-time configuration parameters, historical operating status information and historical configuration parameters of the operating system 4 on the client 1, and implement configuration management of multiple operating systems 4 based on the RestfulAPI interface of the server 2, thereby improving the management efficiency and programmability of the operating system 4 and saving a lot of time cost for general interface encapsulation.
[0095] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0096] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0097] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0098] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. An operating system management device, characterized in that: The operating system management device comprises: a server and a client; the server is deployed on the operating system; the client is connected to multiple servers; The client is used to receive a configuration management request input by a user, and send the configuration management request to the server; the configuration management request includes an operating system identifier and configuration parameters; The server is used to determine the RestfulAPI interface of each service of each operating system, and according to the received configuration management request, use the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier, and make the operating system corresponding to the operating system identifier reload the configuration.
2. The operating system management device according to claim 1, characterized in that: The operating system management device also includes a database end; The server is also connected to the database; the server is also used to obtain the configuration parameters and operation status information of each operating system in real time; The database end is used to store the configuration parameters and operation status information of each operating system.
3. The operating system management device according to claim 2, characterized in that: The database also stores user information; The client is also used to receive a login request input by a user and send the login request to the server; the login request includes a user name, password and role; The server is also used to determine whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database. If so, authorization information is generated and sent to the client. Otherwise, illegal user information is sent to the client.
4. The operating system management device according to claim 3, characterized in that: The configuration management request also includes authorization information and client identification; The server uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier based on the received configuration management request, specifically including: determining whether the received configuration management request carries authorization information; if so, using the corresponding RestfulAPI to update the configuration parameters of the operating system corresponding to the operating system identifier; otherwise, sending unauthorized information to the corresponding client.
5. The operating system management device according to claim 3, characterized in that: The client is also used to receive a data acquisition request input by a user and send it to the server; the data acquisition request includes a client identifier, an operating system identifier and authorization information; The server is also used to determine whether the received data acquisition request carries authorization information. If so, the operating system running status information and configuration parameters corresponding to the operating system identifier are sent to the corresponding client according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client.
6. An operating system management method, using the operating system management device according to any one of claims 1 to 5, characterized in that: The operating system management method comprises: Determine the RESTful API interface of each service of each operating system through the server; Obtaining a configuration management request input by a user through a client, and sending the configuration management request to the server; the configuration management request includes an operating system identifier and configuration parameters; The server uses the corresponding RestfulAPI interface to update the configuration parameters of the operating system corresponding to the operating system identifier according to the received configuration management request, and causes the operating system corresponding to the operating system identifier to reload the configuration.
7. The operating system management method according to claim 6, characterized in that: The operating system management method further includes: Obtain the configuration parameters and operating status information of each operating system in real time through the server; The configuration parameters and operating status information of each operating system are stored through the database.
8. The operating system management method according to claim 7, characterized in that: The database also stores user information; Before obtaining the configuration management request input by the user through the client, the operating system management method further includes: Receive a login request input by a user through a client, and send the login request to the server; the login request includes a user name, password and role; The server determines whether the corresponding user is a legitimate user based on the received login request and the user information stored in the database. If so, authorization information is generated and sent to the client. Otherwise, illegal user information is sent to the client.
9. The operating system management method according to claim 8, characterized in that: The configuration management request also includes authorization information and client identification; The server uses the corresponding Restful API interface to update the configuration parameters of the operating system corresponding to the operating system identifier according to the received configuration management request, specifically including: The server determines whether the received configuration management request carries authorization information. If so, the corresponding RestfulAPI interface is used to update the configuration parameters of the operating system corresponding to the operating system identifier. Otherwise, unauthorized information is sent to the corresponding client.
10. The operating system management method according to claim 8, characterized in that: The operating system management method further includes: Receive a data acquisition request input by a user through the client, and send it to the server; the data acquisition request includes a client identifier and an operating system identifier; The server determines whether the received data acquisition request carries authorization information. If so, the operating system running status information and configuration parameters corresponding to the operating system identifier are sent to the corresponding client according to the received data acquisition request. Otherwise, unauthorized information is sent to the corresponding client.
