Detect pending Linux shutdown

Since I install pending updates for my Ubuntu server as soon as possible, I have to restart my Linux server frequently I'm running webapp on this server and want to warn my users about pending restarts Now, I do this manually, add notifications before restarting, give them some time to finish their work, restart and delete announcements

I hope that shutdown - R 60 writes a file that contains all the information about restart, and I can check every access Do you have such documents? For performance reasons, I prefer files in virtual file systems like / proc

I'm running Ubuntu 10.04 2 LTS

Solution

If you are using SYSTEMd, the following command displays scheduled shutdown information

cat /run/systemd/shutdown/scheduled
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>