All Products
Search
Document Center

Elastic Compute Service:Perform system management

Last Updated:Aug 28, 2023

Workbench allows you to use System Management to manage operating system users and services of Linux instances, or create custom crontab scheduled tasks. This topic describes how to perform system management on Elastic Compute Service (ECS) Linux instances.

Prerequisites

View logon history

On the Logon History page, you can view the historical logon information of all operating system users (such as root and bin), including the logon address, logon time, and duration.

  1. In the top navigation bar, choose Features > System Management > Logon History.

  2. On the Logon History page, view the logon history of operating system users.

Create a crontab scheduled task

On the Scheduled Task page, you can create a crontab scheduled task, specify a command in the task, and associate the task with instances. Then, the system executes the task to run the specified command on the instances at the specified interval.

  1. In the top navigation bar, choose Features > System Management > Scheduled Task.

  2. On the Scheduled Task page, click Create Task.

  3. In the Create Task dialog box, configure the parameters that are described in the following table.

    Parameter

    Description

    Execution Time

    • Daily: Specify a time of the day to run the command each day.

    • Every Week: Specify a day of the week and a time of the day to run the command at the specified time every week.

    • Every Month: Specify a date and a time of the day to run the command at the specified time on the specified day every month.

    • Fixed Interval: Specify an interval at which to run the command. You can specify the interval in minutes, hours, or days. This option is applicable when tasks need to be executed at a fixed interval.

    • Expression: Use a cron expression to specify a schedule on which to run the command. Set Expression to a cron expression that defines a schedule accurate to the minute, hour, day of the month, month, or day of the week. The system calculates the execution times of the command based on this cron expression and runs the command as scheduled. This option provides flexibility and is suitable for tasks that need to run on a schedule.

      For example, if you set Expression to 0 12 ? * WED, the system runs the command at 12:00:00 every Wednesday. For more information about cron expressions, see Run a command on a schedule.

    Crontab Expression

    A crontab expression is automatically generated based on the specified time.

    Command

    Enter the command that you want to run.

  4. Click OK.

Manage users

On the User Management page, you can create, view, or delete operating system users (such as root and bin), or change their passwords.

  1. In the top navigation bar, choose Features > System Management > User Management.

  2. On the User Management page, you can perform the following operations:

    • Add a user

      1. Click Add User.

      2. In the Add User dialog box, enter a username and password.

      3. (Optional) In the lower part of the dialog box, click More Options to show the optional parameters that are described in the following table.

        Parameter

        Description

        User Group

        Select the user group to which to assign the user, such as bin or sys. You can also click Add a user group to create a user group.

        Home Directory

        Enter the home directory of the user.

        User Details

        Enter more information about the user.

      4. Click OK.

    • Change a user password

      1. Find the user for which you want to change the password and click Change Password in the Actions column.

      2. In the Change Password dialog box, set a new password for the user.

      3. Click OK.

    • Delete a user

      1. Find the user that you want to delete and click Delete in the Actions column.

      2. In the Prompt message, click OK.

        Note

        After the user is deleted, you can no longer log on to the instance as the user.

Manage services

On the Service Management page, you can view the status, configurations, and manual of each service, and start or stop each systemd service.

Note

Systemd is a collection of basic Linux system components. It provides a system and service manager that runs and starts other programs.

  1. In the top navigation bar, choose Features > System Management > Service Management.

  2. On the Service Management page, you can click the following buttons in the Actions column corresponding to a service to perform operations on the service:

    • Check Status: View the state of the service.

    • Restart: Restart the service as needed.

    • Stop: Stop the service as needed.

      Warning

      Service interruptions may occur when you stop services. We recommend that you stop services during off-peak hours.

    • View Configurations: View the configurations of the service.

    • View Manual: View the manual of the service.