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
An ECS Linux instance is created and in the Running (Running) state.
The instance is connected by using Workbench. For more information, see Connect to a Linux instance by using a password or key.
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.
In the top navigation bar, choose .
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.
In the top navigation bar, choose .
On the Scheduled Task page, click Create Task.
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.
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.
In the top navigation bar, choose .
On the User Management page, you can perform the following operations:
Add a user
Click Add User.
In the Add User dialog box, enter a username and password.
(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.
Click OK.
Change a user password
Find the user for which you want to change the password and click Change Password in the Actions column.
In the Change Password dialog box, set a new password for the user.
Click OK.
Delete a user
Find the user that you want to delete and click Delete in the Actions column.
In the Prompt message, click OK.
NoteAfter 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.
Systemd is a collection of basic Linux system components. It provides a system and service manager that runs and starts other programs.
In the top navigation bar, choose .
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.
WarningService 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.