Tag Info

Hot answers tagged

27

You will need to modify the group policy that is applied to the servers. Open up the Group Policy Management Console and navigate to Computer Configuration >> Administrative Templates >> System and select "Display Shutdown Event Tracker." Disable that option.


22

There is no better way to restart your server by using anything else than any those commands. shutdown is the most common way to stop your system. reboot is a wrapper round shutdown which does some harddisk maintenance (syncing and/or putting in standby mode and not really relevant). New versions of reboot (>2.74) will initiate shutdown if not in runlevel ...


12

If you do not want to change via Polices you can always issue the shutdown command to avoid the question. shutdown /s /t 0 /s = shutdown /t = time till shutdown 0 = immediely


11

If the system has reached runlevel 0, it can be safely powered off. Not so many years ago, before ATX, you had to turn off a PC system by hand because it couldn't power down itself.


8

Running the following as an elevated admin: reg.exe add "HKLM\SOFTWARE\Policies\Control\Microsoft\Windows NT\Reliability" /v ShutDownReasonOn /t REG_DWORD /d 0 /f and the log off and on again should to the trick. This is quicker than using group policies which you should use when you are in a domain and want to apply this change to many servers.


6

The Procmon utility from Windows Sysinternals is capable of doing comprehensive logging of all processes during startup, logoff, and shutdown. For detailed information, read the Windows Sysinternals Administrator's Reference, section 2, chapter 4. There is a subsection titled Logging Boot, Post-Logoff, and Shutdown Activity on confiuguring the boot logging ...


6

Q. If my spot instance is automatically terminated due to my max bid being exceeded, is it a clean shutdown -- as if a user clicked Start>>Shutdown ? Or is it a hard shutdown -- as if someone just yanked out the power cord? It might be a clean shutdown, but it also might be a hard shutdown. Amazon's wording implies they try to make it clean but ...


6

It depends on how your configured your Virtual machines. If you have your VMs configured to 'Turn OFF', then shutting down the host OS would be close to equivalent to pulling the power from the VMs. If your VMs are configured this way, and you want them to safely shutdown, then you need to shut them down first. You could also use the other options like ...


4

$ dpkg -S /sbin/shutdown sysvinit-core: /sbin/shutdown You probably "upgraded" to systemd, removing shutdown and friends. If so, you now need to do systemctl poweroff to shutdown the system. Why does systemd not provide an alias to shutdown? Why not indeed... EDIT: /sbin/shutdown should be available if you install the systemd-sysv package. It would be ...


3

A graceful shutdown of Centos 6.x should be done by using the command as root: shutdown -h now This will attempt to stop all running services before shutting down the server gracefully. Using this command also prevents mySQL socket issues. Similarly, for a graceful reboot: reboot -h now You can read a previous answer about a similar question here: ...


3

There are SuperMicro servers, which have battery inside. And there are SSDs with supercap, like Intel's PLI technology. Edit: After quick googling I found this internal UPS. It looks dated, but may very well still be in production.


3

Shutdown.exe still ships with the new versions of Windows. Simply run: shutdown /i and the following prompt will appear, allowing you to shutdown/reboot 1 or more servers with a Reason comment:


3

"/sbin" is not in default cron PATH. So you need to add it there. you can check it with: */2 * * * * /bin/echo "$PATH" > /home/myuser/my.log Result: [root@localhost vagrant]# cat my.log /usr/bin:/bin Also you can see it in the mail headers sent by cron: Content-Type: text/plain; charset=UTF-8 Auto-Submitted: auto-generated X-Cron-Env: ...


3

I'm sure the OP has found the other answers useful but future readers may be interested in a powershell version. Works out of the box in 2008 or up, and maybe in 2003 if powershell is installed. if ( -Not (Test-Path 'registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability')) { New-Item -Path ...


3

There is no difference in them. Internally they do exactly the same thing: 1. reboot uses the shutdown command (with the -r switch). The shutdown command used to kill all the running processes, unmount all the file systems and finally tells the kernel to issue the ACPI power command. 2.init 6 tells the init process to shutdown all of the spawned ...


2

Ideally, as a matter of best practice, (interactive) console applications should not be running on a server. Things that require interactive logon sessions should not be running on a server. Windows Services should be programmed to handle shutdown events. This is extremely common development practice. Windows sends a notification to all Windows Services ...


2

I believe that setting will only result in a Critical error message and SNMP trap triggering. Perhaps you could set up some SNMP collector that is able to run actions on trapped messages. (Ipmi poweroff, email.)


2

It's probably not running because it's unable to find the binary. Without any error log though, that's just an assumption I'm making. Try adjusting the s3cmd part in your script to use its full path. I'm not sure how you installed s3cmd (either via yum or manually), but you can find out its full path by running which s3cmd.


2

Solved: It's CATALINA_OPTS not JAVA_OPTS. The HOWTOs are wrong. Reference: Tomcat Docs Regarding Profiler


2

sshd sessions on my (rhel) server may be identified by: ~# ps -ef |grep sshd: root 12120 1 0 10:18 ? 00:00:00 sshd: sysope [priv] sysope 12132 12120 0 10:18 ? 00:00:00 sshd: sysope@pts/2 killing those processes will immediately close the connections. So adapt your sshd service file for systemd like this: [Unit] Description=SSH ...


2

Yes, If you rename or remove C:\Windows\WinSxS\pending.xml file, you could postpone update to next reboot. I advice renaming it. It may require changing the permissions and ownership of the file. I haven't tested it on running windows image, but I am sure it works when you interrupt windows boot. Boot into recovery mode or from windows installation disc ...


2

That's a good habit, congrats. The traditional way to enable/disable the Shutdown Event Tracker through a Group Policy setting (Computer Configuration > Administrative Templates > System / Display Shutdown Event Tracker) does not seem to work anymore. The GUI does not seem to offer this functionality anymore. Your options are to use the shutdown.exe with ...


2

As far as i can see, you are having a cyclic dependecy. You are telling systemd to start PHP-fpm before Apache and at the same time after Apache. This cannot work the way you want it to. In your httpd.service file specify the following: Requires=mariadb.service php-fpm.service After=mariadb.service php-fpm.service The explanation of the options for ...


1

When giving remote instructions to end-users and customers, I instruct them to use poweroff to shutdown and power the system off. If they want a warm reboot, I suggest that they use the reboot command. I suppose one could say that issuing Ctrl-Alt-Delete also accomplishes this ;)


1

A very careful reading of the shutdown(8) man page (i.e. not the first couple of times I looked and didn't find anything) reveals that a custom message can be provided on the command line. For instance: # shutdown -r +15 "We're rebooting for unicorns. Silence monitoring please." Shutdown scheduled for Tue 2014-11-25 10:17:53 EST, use 'shutdown -c' to ...


1

You can make a service that writes to the wall. The service will get started and create the "lock" file, and then you will get the message when rebooting or shutting down (Process is probably different for CentOS 7 since it uses systemd): Script (Could probably be better): [root@ny-kbrandt01 init.d]# cat reminder #!/bin/bash # chkconfig: 2345 99 01 # ...


1

No. You either do a hard shut down by killing the power to the device (pull the plug or hold down the power button) and risk corrupting the OS, or you can wait for it to finish, but there is no way to interact with the OS once it's started the process of shutting down and applying updates.


1

Short of patching your kernel, I don't think you can. During shutdown, the scsi disk driver issues a SYNCHRONIZE CACHE command to flush the disk's internal cache. This will cause the drive to spin up, then the drive is spun down again before shutting down.


1

This really isn't an answer due to the two limitations noted below but it's too long for a comment, so.. I did a simple test with the following two shortcomings: The scripts do not send email. I need the smtp relay of my ISP but it's too much hassle to find it. I'm testing on a Win10 preview, not a Win8.1. It's all I have this evening. Inside of Local ...


1

Studying and using everyone's comments and answers actually helped resolve my problem, but as sometimes is the case the real issue was somewhat different. So, I feel obligated to post what turned out to be the actual problem for me in case someone else gets caught by the same 'gotcha'. During script testing it seemed more convenient to work on my Win 8.1 ...



Only top voted, non community-wiki answers of a minimum length are eligible