Ask Your Question
0

Tasks performed during shutdown

asked 2013-02-12 07:10:51 -0500

Abid Rahman K gravatar image

updated 2013-07-13 01:39:04 -0500

FranciscoD_ gravatar image

Hi,

Is it possible to know what kind of actions are performed while computer is being shutdown ? I mean, what processes, services are terminated etc ? Is there any command or program which stores this data as a log or txt file in system?

I am using Fedora 18 GNOME 64 bit version.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2013-02-12 08:06:22 -0500

updated 2013-02-12 08:08:21 -0500

First of all you need to understand about run-levels.

Generally, Red Hat Linux operates in runlevel 3 — full multi-user mode. The following runlevels are defined in Red Hat Linux:

0 — Halt

1 — Single-user mode

2 — Not used (user-definable)

3 — Full multi-user mode

4 — Not used (user-definable)

5 — Full multi-user mode (with an X-based login screen)

6 — Reboot

The default runlevel for a system to boot to and stop is configured in /etc/inittab.

Basically when you enter in shutdown mode, the operating system switches wo run level 0. Ordering all processo to terminate nicely.

Once all processes have stopped and the file systems are unloaded, the kernel sends an ACPI signal to the BIOS that turns the power supply off.

When shutting down, many applications have to store its current state on the file system for future executions, and the file system has to flush the changes from RAM to the hard drive.

You can read more about this in here

And here

edit flag offensive delete link more
0

answered 2013-02-14 14:01:06 -0500

Chad Farmer gravatar image

As Linux shuts down, a fair amount of work is done after the logging service is terminated. So messages from that can not be logged. The traditional way to debug this is to configure a serial port as the primary console, and connect a system with a terminal emulator (with logging) to that serial port. The serial port is very low level, so it does not really shut down. You will see kernel messages up to the message before giving control to the BIOS (permanently).

I know that is old technology, but how badly do you need to see the messages? Server systems often includes a Serial-Over-LAN capability that allows this without the need for a RS232C cross-over cable and two physical serial ports.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-02-12 07:10:51 -0500

Seen: 208 times

Last updated: Jul 13 '13