

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

# Gérer l'agent
<a name="managing-agent"></a>

 L' AWS Ground Station agent fournit les fonctionnalités suivantes pour configurer, démarrer, arrêter, mettre à niveau, rétrograder et désinstaller l'agent à l'aide des outils de commande Linux intégrés. 

**Rubriques**
+ [AWS Ground Station Configuration de l'agent](#gs-agent-configuration)
+ [AWS Ground Station Démarrage de l'agent](#gs-agent-start)
+ [AWS Ground Station Agent, arrêtez.](#gs-agent-stop)
+ [AWS Ground Station Mise à niveau des agents](#gs-agent-upgrade)
+ [AWS Ground Station Rétrogradation de l'agent](#gs-agent-downgrade)
+ [AWS Ground Station Désinstallation de l'agent](#gs-agent-uninstall)
+ [AWS Ground Station Statut de l'agent](#gs-agent-status)
+ [AWS Ground Station Informations sur l'agent RPM](#gs-agent-rpm-info)

## AWS Ground Station Configuration de l'agent
<a name="gs-agent-configuration"></a>

 Accédez à`/opt/aws/groundstation/etc`, qui doit contenir un seul fichier nommé aws-gs-agent-config .json. Consultez [Fichier de configuration de l'agent](configuring-agent.md#agent-config-file) 

## AWS Ground Station Démarrage de l'agent
<a name="gs-agent-start"></a>

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

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

Devrait produire une sortie indiquant que l'agent est **actif**.

```
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 Agent, arrêtez.
<a name="gs-agent-stop"></a>

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

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

 Devrait produire une sortie indiquant que l'agent est **inactif** (arrêté). 

```
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 Mise à niveau des agents
<a name="gs-agent-upgrade"></a>

1. Téléchargez la dernière version de l'agent. Consultez [Agent de téléchargement](installing-the-agent.md#download-agent).

1. Arrêtez l'agent .

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

1. Mettez à jour l'agent.

   ```
   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 Rétrogradation de l'agent
<a name="gs-agent-downgrade"></a>

1. Téléchargez la version de l'agent dont vous avez besoin. Consultez [Agent de téléchargement](installing-the-agent.md#download-agent).

1. Rétrogradez l'agent.

   ```
   # 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 Désinstallation de l'agent
<a name="gs-agent-uninstall"></a>

 La désinstallation de l'agent renommera/opt/aws/groundstation/etc/aws-gs-agent-config.json to /opt/aws/groundstation/etc/aws- gs-agent-config .json.rpmsave. Si vous réinstallez l'agent sur la même instance, les valeurs par défaut du aws-gs-agent-config fichier .json seront écrites et devront être mises à jour avec les valeurs correctes correspondant à vos ressources AWS. Consultez [Fichier de configuration de l'agent](configuring-agent.md#agent-config-file). 

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

## AWS Ground Station Statut de l'agent
<a name="gs-agent-status"></a>

 L'état de l'agent est **actif** (l'agent est en cours d'exécution) ou **inactif** (l'agent est arrêté). 

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

 Un exemple de sortie montre que l'agent est installé, **inactif** (arrêté) et **activé** (démarrage du service au démarrage). 

```
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 Informations sur l'agent RPM
<a name="gs-agent-rpm-info"></a>

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

 La sortie est la suivante : 

**Note**  
La « version » peut être différente en fonction de la dernière version publiée par l'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
```