markdown/reference/cli/admin_utilities/hawqstate.html.md.erb (45 lines of code) (raw):

--- title: hawq state --- <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> Shows the status of a running HAWQ system. ## <a id="topic1__section2"></a>Synopsis ``` pre hawq state [-b] [-l <logfile_directory> | --logdir <logfile_directory>] [(-v | --verbose) | (-q | --quiet)] hawq state [-h | --help] ``` ## <a id="topic1__section3"></a>Description The `hawq state` utility displays information about a running HAWQ instance. A HAWQ system is comprised of multiple PostgreSQL database instances (segments) spanning multiple machines, and the `hawq state` utility can provide additional status information, such as: - Total segment count. - Which segments are down. - Master and segment configuration information (hosts, data directories, etc.). - The ports used by the system. - Whether a standby master is present, and if it is active. - Whether Ranger authorization is enabled for HAWQ, and if so, the status of the HAWQ Ranger Plug-in Service. ## <a id="topic1__section4"></a>Options <dt>-b (brief status) </dt> <dd>Display a brief summary of the state of the HAWQ system. This is the default mode.</dd> <dt>-l, -\\\-logdir \<logfile\_directory\> </dt> <dd>Specifies the directory to check for logfiles. The default is `$GPHOME/hawqAdminLogs`. Log files within the directory are named according to the command being invoked, for example: hawq\_config\_\<log\_id\>.log, hawq\_state\_\<log\_id\>.log, etc.</dd> <dt>-q, -\\\-quiet </dt> <dd>Run in quiet mode. Except for warning messages, command output is not displayed on the screen. However, this information is still written to the log file.</dd> <dt>-v, -\\\-verbose </dt> <dd>Displays error messages and outputs detailed status and progress information.</dd> <dt>-h, -\\\-help (help) </dt> <dd>Displays the online help.</dd> ## <a id="topic1__section6"></a>Examples Show brief status information of a HAWQ system: ``` shell $ hawq state -b ``` Change the log directory from `hawqAdminLogs` to `TodaysLogs`. ```shell $ hawq state -l TodaysLogs $ ls TodaysLogs hawq_config_20160707.log hawq_init_20160707.log master.initdb ``` ## <a id="topic1__section7"></a>See Also [hawq start](hawqstart.html#topic1), [gplogfilter](gplogfilter.html#topic1)