Red Flag System Service Management Tool
User's Guide

Contents

1. Introduction

return

When Linux boots up, it will automatically start or stop some system services based on the current run level. You can also manually start, stop or restart system services, or change the starting/stopping order of the services. Below is a brief introduction to some key concepts:

1.1 Run Level

return

A certain runlevel includes some services are to be started or stopped when Linux boot into this runlevel. It defines which service should be started and which should be stopped. Runlevel is a number, and Red Flag Linux defines 7 different runlevels:

Runlevel Definitions
0 Halt System.  (DO NOT make it the default runlevel)
1 Single-user Mode, used for special system admin tasks, like get back missing root passwd, file system checking.
2 Multi-user Mode, NFS not supported.
3 Full Multi-user Mode.
4 Reserved.
5 Multi-user Mode. Graphical Login Interface.
6 Reboot System. (DO NOT make it the default runlevel)

Modify /etc/initab to change the default runlevel. Below is an example, which change the current runlevel to 5 (to have graphical login interface):

change

    id:3:initdefault:

to:

    id:5:initdefault:

One interesting way to shutdown system is to switch the runlevel to 0 (system halt), like:

    # init 0

1.2 Run Sequence

return

A certain runlevel includes a group of services to be stopped as well as a group of services to be started, when enter a runlevel (e.g. use command "init 0" to switch to runlevel 0), the services in the "stop group" will be stopped one by one, and services in the "start group" will be started one by one. The order of starting/stopping is determined by the run sequence number, which is an integer number between 0 and 99. Service with smaller sequence number will be started/stopped firstly. Different services can share the same sequence number.

Every service has its default start sequence and stop sequence. All services that are required should have a smaller start sequence number, which means they should be started earlier. All services that are required should have a larger stop sequence number, which means they should be stopped later.

2. How To Start

Return

To start system service management tool, you can either click "Service" icon in control panel, or from start menu, click "start->system->service", or just type "rfsysv" in terminal.

Main window lists all the system services, showing following properties:

Description Short description of this service.
Status Running status including "Stopped" and "Running"
Start Type
Start type including "Auto" and "Manual", "Auto" means this service will be started automatically when enter this runlevel, "Manual" means otherwise, user has to start the service manually.
Start Sequence       
The start sequence number of the service within the selected runlevel.

The start type and start sequence is related to the selected runlevel, the default selected runlevel is the current runlevel, you can use the "Runlevel" menu to select different runlevel.

Follow operations can be applied to each service:

Start Start the service
Stop Stop the service
Restart Restart the service
Refresh Refresh all service information
Properties Popup properties dialog
Help Online help

All those operations can be accessed from either menu or toolbar.

3. Start, stop and Restart Service

Return
After the start/stop operation, a message box will be popped up the show the resulting information:

Result Succeed or Failed
Command The executed command
Output
Command execution outputs.


After the service is started successfully, the status will be changed to "Running"; after the service is stopped sucessfully, the status will be changed to "Stopped".

When do restart operation, the service will be stopped firstly, then started. If the operation is successful, the status will be changed to "Running".

Note: Most services require privileged permission (root) to run. If normal user tries to start/stop service, usually error message will be popped up saying something like "Permission Denied".

4. Service Properties

Return

Highlight certain service, clike "Operation->Properties", or double click the service entry, a service properties dialog will be popped up.
Click "Apply" button to commit the changes; click "OK" button to commit the changes and quit; click "Cancel" button to close the dialog, all changes will be lost.

4.1 General Properties

Return

General properties include following informations: 

Name Name of the service, e.g. httpd.
Short Description
One line description of the service.
Detailed Description
Longer and detailed description of the service.
Executable Path         Full path of the corresponding executable file.
Start Type
Start type, "Auto" or "Manual"
Type

There are Three types: "Daemon", "Oneshot" and  "Special"

 Daemon: Run continuously after startup, such as most network services.

 Oneshot: Run one once after startup, such as loading device driver.

 Special: Some services that offer special functionalities, such as shutdown. Usually you do not want to touch them.

Status Running or Stopped

Following operations can be applied:

4.2 Run Level

Return

Runlevel configuration tab is used the configure the runlevels that the service is to be included. You can add or remove the service from certain runlevel.  The general properties tab shows the current runlevel and the run sequence of the service.

Following operations:

Click "Apply" or "OK" to commit the changes.

4.3 Start Script

Return

Each system service has one corresponding start program (usually a shell script), which usually accepts following command line arguments:

Comand Line Arguments
Description
start Start the service
stop Stop the service
restart Restart the service
status Show the service status

When start/stop a service, this start script is executed with certain arguments listed above, for example, run "/etc/init.d/httpd start" to start the Apache Web service, run "/etc/init.d/httpd stop" to stop the Apache Web service.

The contents of the script are displayed in the start script tab.


Return


Copyright © 2002-2003 Red Flag Software Co., Ltd.

rfsysv 1.0