<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # cat health 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cat-health.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cat-health.html) 譯文鏈接 : [http://www.apache.wiki/display/Elasticsearch/cat+health](http://www.apache.wiki/display/Elasticsearch/cat+health) 貢獻者 : [那伊抹微笑](/display/~wangyangting) **health** 是一個簡潔的,一行表示了來自 **/_cluster/health** 的相同的信息。 ``` curl -XGET 'localhost:9200/_cat/health?v&pretty' ``` 響應如下 :? ``` epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 1475871424 16:17:04 elasticsearch green 1 1 5 5 0 0 0 0 - 100.0% ``` 它有一個 **ts** 選項,以禁用?**timestamping**(時間戳):? ``` curl -XGET 'localhost:9200/_cat/health?v&ts=0&pretty' ``` 響應如下 :? ``` cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent elasticsearch green 1 1 5 5 0 0 0 0 - 100.0% ``` 此命令的一個常見用途是驗證所有節點的健康是不是一致的 :? ``` % pssh -i -h list.of.cluster.hosts curl -s localhost:9200/_cat/health [1] 20:20:52 [SUCCESS] es3.vm 1384309218 18:20:18 foo green 3 3 3 3 0 0 0 0 [2] 20:20:52 [SUCCESS] es1.vm 1384309218 18:20:18 foo green 3 3 3 3 0 0 0 0 [3] 20:20:52 [SUCCESS] es2.vm 1384309218 18:20:18 foo green 3 3 3 3 0 0 0 0 ``` 一個不太明顯的用途是來跟蹤一段時間內大型集群的恢復情況。有許多分片,啟動集群,或者在丟失一節點后恢復,可能需要一段時間(取決于網絡 & 硬盤)。其中的一種方法是在一個延遲的循環中使用跟蹤它的進程,命令如下 :? ``` % while true; do curl localhost:9200/_cat/health; sleep 120; done 1384309446 18:24:06 foo red 3 3 20 20 0 0 1812 0 1384309566 18:26:06 foo yellow 3 3 950 916 0 12 870 0 1384309686 18:28:06 foo yellow 3 3 1328 916 0 12 492 0 1384309806 18:30:06 foo green 3 3 1832 916 4 0 0 ^C ``` 在這種情況下,我們可以告訴到家,集群恢復大概需要**4**分鐘。如果恢復時間是**4**個小時的話,我們將會看到?`**UNASSIGNED**(未分配的)分片數量減少。如果數量保持不變,集群可能出現問題了。` 在集群故障時您通常會使用 **health** 命令。在這期間,它在整個日志文件,報警系統等相關聯的活動是非常重要。 有兩種輸出。一種是 **HH:MM:SS** 輸出,對于人們來說是友好的。另一種是 **epoch time**(**Epoch?**是指定為**1970**年**1**月**1**日凌晨零點零分零秒,[格林威治時間](https://www.baidu.com/s?wd=%E6%A0%BC%E6%9E%97%E5%A8%81%E6%B2%BB%E6%97%B6%E9%97%B4&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YzmWc3mvFbrHwBuAuBuW010ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EPHf1PWfYP1mY)),這樣保留了更多的信息,其中包括日期,如果恢復是跨天的話還可以排序。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看