linux查看es状态
时间: 2023-11-25 18:41:02 浏览: 92
Linux查看服务状态.
要查看Elasticsearch(ES)的状态,您可以使用以下命令:
```
systemctl status elasticsearch
```
如果ES正在运行,您将看到以下输出:
```
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-08-20 09:25:50 UTC; 2min 30s ago
Docs: http://www.elastic.co
Main PID: 1118 (java)
Tasks: 47 (limit: 1153)
Memory: 1.6G
CGroup: /system.slice/elasticsearch.service
├─1118 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStac...
├─1324 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
└─1407 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
```
如果ES没有运行,您将看到以下输出:
```
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2021-08-20 09:24:38 UTC; 3min 58s ago
Docs: http://www.elastic.co
Process: 1002 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 1002 (code=exited, status=1/FAILURE)
```
阅读全文