HowtocheckVMisNormalShutdown

發布日期 2016-10-21
作者 作者(尚未處理)
HowtocheckVMisNormalShutdown
 
Windows OS:
1. Create Test.bat file.
Enter:

 

echo %date%_%time%-NormalShutdown >> C:\NormalShutdown.txt
 

 

HowtocheckVMisNormalShutdown

2. Run gpedit.msc
HowtocheckVMisNormalShutdown
3. Select Computer Configuration àWindows SettingsàScripts(Startup/Shutdown)àShutdown
HowtocheckVMisNormalShutdown
4. Add
HowtocheckVMisNormalShutdown
5. Press Browse, select Test.bat file
HowtocheckVMisNormalShutdown
6. Press Apply, OK
7. As Normal Shutdown OS will automatic creationNormalShutdown.txt file in C:
Force shut down have not this file.
HowtocheckVMisNormalShutdown
 
LinuxOS:
1. Create K30Normalshutdown.sh on /etc/rc0.d
 
#vi /etc/rc0.d/K30Normalshutdown.sh
Enter:
====================================================================
#! /bin/sh
date +”%Y/%m/%d %H:%M:%S Normal Shutdown”>> /root/NormalShutdown.txt
 
====================================================================
HowtocheckVMisNormalShutdown
#chmod 777 K30Normalshutdown.sh
HowtocheckVMisNormalShutdown
2. As Normal ShutdownOS will automatic creationNormalShutdown.txt file in /root
 Force shut down have not this file.
HowtocheckVMisNormalShutdown
HowtocheckVMisNormalShutdown ,
回頂部