

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# エージェントを管理する
<a name="managing-agent"></a>

 AWS Ground Station エージェントには、組み込みの Linux コマンドツールを使用してエージェントを設定、開始、停止、アップグレード、ダウングレード、アンインストールするための以下の機能があります。

**トピック**
+ [AWS Ground Station エージェント設定](#gs-agent-configuration)
+ [AWS Ground Station エージェント開始](#gs-agent-start)
+ [AWS Ground Station エージェント停止](#gs-agent-stop)
+ [AWS Ground Station エージェントのアップグレード](#gs-agent-upgrade)
+ [AWS Ground Station エージェントダウングレード](#gs-agent-downgrade)
+ [AWS Ground Station エージェントのアンインストール](#gs-agent-uninstall)
+ [AWS Ground Station エージェントのステータス](#gs-agent-status)
+ [AWS Ground Station エージェント RPM 情報](#gs-agent-rpm-info)

## AWS Ground Station エージェント設定
<a name="gs-agent-configuration"></a>

 `/opt/aws/groundstation/etc` に移動します。ここには、aws-gs-agent-config.json という名前の単一のファイルが含まれているはずです。「[エージェント設定ファイル](configuring-agent.md#agent-config-file)」を参照してください。

## AWS Ground Station エージェント開始
<a name="gs-agent-start"></a>

```
#start
sudo systemctl start aws-groundstation-agent

#check status
systemctl status aws-groundstation-agent
```

エージェントが**アクティブ**であることを示す出力を生成する必要があります。

```
aws-groundstation-agent.service - aws-groundstation-agent
Loaded: loaded (/usr/lib/systemd/system/aws-groundstation-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-03-14 00:39:08 UTC; 1 day 13h ago
Docs: https://aws.amazon.com/ground-station/
Main PID: 8811 (aws-gs-agent)
CGroup: /system.slice/aws-groundstation-agent.service
└─8811 /opt/aws/groundstation/bin/aws-gs-agent production
```

## AWS Ground Station エージェント停止
<a name="gs-agent-stop"></a>

```
#stop
sudo systemctl stop aws-groundstation-agent

#check status
systemctl status aws-groundstation-agent
```

 エージェントが**非アクティブ** (停止中) であることを示す出力を生成する必要があります。

```
aws-groundstation-agent.service - aws-groundstation-agent
Loaded: loaded (/usr/lib/systemd/system/aws-groundstation-agent.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2023-03-09 15:35:08 UTC; 6min ago
Docs: https://aws.amazon.com/ground-station/
Process: 84182 ExecStart=/opt/aws/groundstation/bin/launch-aws-gs-agent (code=exited, status=0/SUCCESS)
Main PID: 84182 (code=exited, status=0/SUCCESS)
```

## AWS Ground Station エージェントのアップグレード
<a name="gs-agent-upgrade"></a>

1. エージェントの最新バージョンをダウンロードします。「[エージェントをダウンロードする](installing-the-agent.md#download-agent)」を参照してください。

1. エージェントを停止します。

   ```
   #stop
   sudo systemctl stop aws-groundstation-agent
   
   #confirm inactive (stopped) state
   systemctl status aws-groundstation-agent
   ```

1. エージェントを更新します。

   ```
   sudo yum update ${MY_RPM_FILE_PATH}
   
   # check the new version has been installed correctly by comparing the agent version with the starting agent version
   yum info aws-groundstation-agent
   
   # reload the systemd configuration
   sudo systemctl daemon-reload
   
   # restart the agent
   sudo systemctl restart aws-groundstation-agent
   
   # check agent status
   systemctl status aws-groundstation-agent
   ```

## AWS Ground Station エージェントダウングレード
<a name="gs-agent-downgrade"></a>

1. 必要なエージェントバージョンをダウンロードします。「[エージェントをダウンロードする](installing-the-agent.md#download-agent)」を参照してください。

1. エージェントをダウングレードします。

   ```
   # get the starting agent version
   yum info aws-groundstation-agent
   
   # stop the agent service
   sudo systemctl stop aws-groundstation-agent
   
   # downgrade the rpm
   sudo yum downgrade ${MY_RPM_FILE_PATH}
   
   # check the new version has been installed correctly by comparing the agent version with the starting agent version
   yum info aws-groundstation-agent
   
   # reload the systemd configuration
   sudo systemctl daemon-reload
   
   # restart the agent
   sudo systemctl restart aws-groundstation-agent
   
   # check agent status
   systemctl status aws-groundstation-agent
   ```

## AWS Ground Station エージェントのアンインストール
<a name="gs-agent-uninstall"></a>

 エージェントをアンインストールすると、/opt/aws/groundstation/etc/aws-gs-agent-config.json という名前が /opt/aws/groundstation/etc/aws-gs-agent-config.json.rpmsave に変更されます。同じインスタンスにエージェントを再度インストールすると、aws-gs-agent-config.json のデフォルト値が書き込まれるため、AWS リソースに対応する正しい値に更新する必要があります。「[エージェント設定ファイル](configuring-agent.md#agent-config-file)」を参照してください。

```
sudo yum remove aws-groundstation-agent
```

## AWS Ground Station エージェントのステータス
<a name="gs-agent-status"></a>

 エージェントのステータスは、**アクティブ** (エージェントが実行中) か、**非アクティブ** (エージェントが停止中) のいずれかです。

```
systemctl status aws-groundstation-agent
```

 出力例には、エージェントがインストール済み、**非アクティブ** (停止中)、**有効** (起動時にサービスを開始) のステータスが表示されます。

```
aws-groundstation-agent.service - aws-groundstation-agent
Loaded: loaded (/usr/lib/systemd/system/aws-groundstation-agent.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2023-03-09 15:35:08 UTC; 6min ago
Docs: https://aws.amazon.com/ground-station/
Process: 84182 ExecStart=/opt/aws/groundstation/bin/launch-aws-gs-agent (code=exited, status=0/SUCCESS)
Main PID: 84182 (code=exited, status=0/SUCCESS)
```

## AWS Ground Station エージェント RPM 情報
<a name="gs-agent-rpm-info"></a>

```
yum info aws-groundstation-agent
```

 出力は次のとおりです。

**注記**  
「バージョン」は、エージェントが公開している最新のバージョンによって異なる場合があります。

```
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
Name        : aws-groundstation-agent
Arch        : x86_64
Version     : 1.0.2677.0
Release     : 1
Size        : 51 M
Repo        : installed
Summary     : Client software for AWS Ground Station
URL         : https://aws.amazon.com/ground-station/
License     : Proprietary
Description : This package provides client applications for use with AWS Ground Station
```