In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Linux how to view online users and send notifications before shutting down". The content is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to view online users and send notifications before Linux shuts down".
Step 1: view
As an administrator, the first step is to see who is using the machine, who is using the machine, and what programs the user is executing.
To see who is on this Linux server, the command is who. Execution on the command line returns which users logged in to the server through which terminal and what IP address was used to log in, as shown in the following figure.
To view the programs executed by all users, you can use the ps command with appropriate parameters, and the specific use of the ps command will be explained in detail in later experiments.
Step 2: notification
If you notify other users that the system is going to shut down, you can notify other online users by email or phone before executing the shutdown command, or you can add parameters to prompt the shutdown time on the screen of other users when executing the shutdown command. It is important to give advance notice before shutting down the phone. Companies with different notification methods have corresponding operation and maintenance management systems, which must be implemented in accordance with the requirements, otherwise the consequences will be very serious.
Step 3: turn off the computer
The correct use of the command, in the Linux system, in order to speed up the data reading speed, by default, the data being executed will be temporarily stored in memory, that is, Cache, rather than directly written to the hard disk to save. Because the reading speed of the memory is more than 10 bits faster than that of the hard disk, this running mechanism makes the data read in the cache much faster.
However, this operation mechanism will also bring some problems, that is, once the LinuX system shuts down abnormally due to some special circumstances, such as the abnormal power outage in the computer room or the misoperation of the maintenance personnel, some of the data is stored in the cache and has not been written to the hard disk, resulting in the loss of some data and file damage. This will have a serious impact on the normal operation of the system. So how to avoid this kind of accident in Linux system? There is a sync instruction to write to disk with updated data in the cache. Commands such as shutdown/reboot/halt call the sync command to update data to disk before shutting down, but to be more secure, execute the sync command a few more times before shutdown.
The above is all the contents of the article "how to view online users and notify Linux before shutting down". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.