• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Analyzing Unexpected Shutdown of Ubuntu Cloud Server

By Abhishek Ghosh March 2, 2019 7:40 pm Updated on March 2, 2019

Analyzing Unexpected Shutdown of Ubuntu Cloud Server

Advertisement

Ideally one should everyday login to Ubuntu server running WordPress like software. Public internet has been dangerous and hackers known to perform various kind of practice. It is not great get astonished by an unexpected shutdown of cloud server in clueless manner.

Overheating a common issue for the dedicated servers while cloud Server instances commonly have the issue of operating system related failure of “forced upgrade” resulting dumb, mute server. Many start with Ubuntu as they feel it is easy but time push everyone towards becoming semi-expert and to shift to REHL or CentOS like production grade server operating systems.

Programs root privileged programs can gracefully shutdown an operating system. Either a humane user with root privileges or an acpi script can do that job. In either cases we can find out the reason by checking the logs. Overheating a common issue for the dedicated servers. An acpi shutdown can be caused by power button press, overheating. Virtual and cloud have virtual buttons on control panel. Someone can login to your control panel to shut down the instance.

Advertisement

---

Not always system have the chance to save logs. But monitoring logs, graphs of the system will show load average charting, other matters which can indicate the scence.

 

How To Examine Unexpected Shutdown of Cloud Server From SSH

 

You must SSH as fast you detected such scene. Hackers love to add scripts via crontab, so check it :

Vim
1
sudo crontab -e

Usually /var/log will tell the time the machine was shut down but not the initial reason, it will be like :

Vim
1
shutdown[25861]: shutting down for system halt

Command can be like :

Vim
1
2
3
grep -iv ': starting\|kernel: .*: Power Button\|watching system buttons\|Stopped Cleaning Up\|Started Crash recovery kernel' \
  /var/log/messages /var/log/syslog /var/log/apcupsd* \
  | grep -iw 'recover[a-z]*\|power[a-z]*\|shut[a-z ]*down\|rsyslogd\|ups'

Check the following log files with the keyword shutdown :

Vim
1
2
3
4
5
/var/log/debug
/var/log/syslog (will be pretty full and may be harder to browse)
/var/log/user.log
/var/log/kern.log
/var/log/boot

Of course there are commands to check :

Display list of last reboot entries:

Vim
1
last reboot | less

Display list of last shutdown entries:

Vim
1
last -x | less

or

Vim
1
2
3
4
5
6
7
8
9
10
11
12
last -x | grep shutdown | less
 
#
 
last -x | head | tac
 
 
#
 
 
 
last reboot | head -6

This is a normal shutdown :

Vim
1
2
3
4
runlevel (to lvl 0)   2.6.32- Sat Mar 02 09:48 - 08:51  (00:02)
shutdown system down  ... <-- first the system shuts down  
reboot   system boot  ... <-- afterwards the system boots
runlevel (to lvl 3)  

This kind of keywords in log :

Vim
1
rsyslogd: ... exiting on signal 15

probably some software performed orderly shutdown. Run these :

Vim
1
2
systemd-analyze blame
system-analyze blame

Rsyslog hanged this server inviting shutdown :

Analyzing Unexpected Shutdown of Ubuntu Cloud Server

Removing it will fix the problem as emergency measure. Why it acted oddly requires research. Hacker’s altered script can fake odd behavior. Is such hanging by rsyslog happened to the others? Web search saying yes. So, it was probably not out of intrusion.

There is a good old article on this topic :

Vim
1
https://web.archive.org/web/20170904210829/http://scofaq.aplawrence.com:80/FAQ_scotec1haltcatch.html

We hope, Ubuntu users conclude reason of shutdown to this (and not an intrusion) :

Vim
1
https://askubuntu.com/questions/878630/apt-unattended-upgrades-stalls-shutdown

You can talk with your host. The thing is not good if repeats twice. Result with no backup can be sucking thumb.

Tagged With https://thecustomizewindows com/2019/03/analyzing-unexpected-shutdown-of-ubuntu-cloud-server/
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Analyzing Unexpected Shutdown of Ubuntu Cloud Server

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Join/Merge Multiple Log Files For Big Data Analysis

    Here Are The Ways To Join/Merge Multiple Log Files For Big Data Analysis, Store Them To OpenStack Based Cloud Storage And Delete Old Files.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • unix Commands to Check Server Logs For Security

    Here is a Basic Guide For the Beginners to Self Manage Cloud Server Instances. Master these unix Commands to Check Server Logs For Security.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Market Segmentation in BriefSeptember 20, 2023
  • What is Booting?September 18, 2023
  • What is ncurses?September 16, 2023
  • What is JTAG in Electronics?September 15, 2023
  • iPhone 15 Pro Max Vs Samsung Galaxy S22/S23 UltraSeptember 14, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy