OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright 2015 The Crashpad Authors. All rights reserved. |
| 3 |
| 4 Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 you may not use this file except in compliance with the License. |
| 6 You may obtain a copy of the License at |
| 7 |
| 8 http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
| 10 Unless required by applicable law or agreed to in writing, software |
| 11 distributed under the License is distributed on an "AS IS" BASIS, |
| 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 See the License for the specific language governing permissions and |
| 14 limitations under the License. |
| 15 --> |
| 16 |
| 17 # crashpad_database_util(1) |
| 18 |
| 19 ## Name |
| 20 |
| 21 crashpad_database_util—Operate on Crashpad crash report databases |
| 22 |
| 23 ## Synopsis |
| 24 |
| 25 **crashpad_database_util** [_OPTION…_] |
| 26 |
| 27 ## Description |
| 28 |
| 29 Operates on Crashpad crash report databases. The database’s settings can be |
| 30 queried and modified, and information about crash reports stored in the database |
| 31 can be displayed. |
| 32 |
| 33 When this program is requested to both show and set information in a single |
| 34 invocation, all “show” operations will be completed prior to beginning any “set” |
| 35 operation. |
| 36 |
| 37 Programs that use the Crashpad client library directly will not normally use |
| 38 this tool, but may use the database through the programmatic interfaces in the |
| 39 client library. This tool exists to allow developers to manipulate a Crashpad |
| 40 database. |
| 41 |
| 42 ## Options |
| 43 |
| 44 * **--create** |
| 45 |
| 46 Creates the database identified by **--database** if it does not exist, |
| 47 provided that the parent directory of _PATH_ exists. |
| 48 |
| 49 * **-d**, **--database**=_PATH_ |
| 50 |
| 51 Use _PATH_ as the path to the Crashpad crash report database. This option is |
| 52 required. The database must already exist unless **--create** is also |
| 53 specified. |
| 54 |
| 55 * **--show-client-id** |
| 56 |
| 57 Show the client ID stored in the database’s settings. The client ID is |
| 58 formatted as a UUID. The client ID is set when the database is created. |
| 59 [crashpad_handler(8)](../handler/crashpad_handler.md) retrieves the client ID |
| 60 and stores it in crash reports as they are written. |
| 61 |
| 62 * **--show-uploads-enabled** |
| 63 |
| 64 Show the status of the uploads-enabled bit stored in the database’s settings. |
| 65 [crashpad_handler(8)](../handler/crashpad_handler.md) does not upload reports |
| 66 when this bit is false. This bit is false when a database is created, and is |
| 67 under an application’s control via the Crashpad client library interface. |
| 68 |
| 69 See also **--set-uploads-enabled**. |
| 70 |
| 71 * **--show-last-upload-attempt-time** |
| 72 |
| 73 Show the last-upload-attempt time stored in the database’s settings. This |
| 74 value is `0`, meaning “never,” when the database is created. |
| 75 [crashpad_handler(8)](../handler/crashpad_handler.md) consults this value |
| 76 before attempting an upload to implement its rate-limiting behavior. The |
| 77 database updates this value whenever an upload is attempted. |
| 78 |
| 79 See also **--set-last-upload-attempt-time**. |
| 80 |
| 81 * **--show-pending-reports** |
| 82 |
| 83 Show reports eligible for upload. |
| 84 |
| 85 * **--show-completed-reports** |
| 86 |
| 87 Show reports not eligible for upload. A report is moved from the “pending” |
| 88 state to the “completed” state by |
| 89 [crashpad_handler(8)](../handler/crashpad_handler.md). This may happen when a |
| 90 report is successfully uploaded, when a report is not uploaded because |
| 91 uploads are disabled, or when a report upload attempt fails and will not be |
| 92 retried. |
| 93 |
| 94 * **--show-all-report-info** |
| 95 |
| 96 With **--show-pending-reports** or **--show-completed-reports**, show all |
| 97 metadata for each report displayed. Without this option, only report IDs will |
| 98 be shown. |
| 99 |
| 100 * **--show-report**=_UUID_ |
| 101 |
| 102 Show a report from the database looked up by its identifier, _UUID_, which |
| 103 must be formatted in string representation per RFC 4122 §3. All metadata for |
| 104 each report found via a **--show-report** option will be shown. If _UUID_ is |
| 105 not found, the string `"not found"` will be printed. If this program is only |
| 106 requested to show a single report and it is not found, it will treat this as |
| 107 a failure for the purposes of determining its exit status. This option may |
| 108 appear multiple times. |
| 109 |
| 110 * **--set-report-uploads-enabled**=_BOOL_ |
| 111 |
| 112 Enable or disable report upload in the database’s settings. _BOOL_ is a |
| 113 string representation of a boolean value, such as `"0"` or `"true"`. |
| 114 |
| 115 See also **--show-uploads-enabled**. |
| 116 |
| 117 * **--set-last-upload-attempt-time**=_TIME_ |
| 118 |
| 119 Set the last-upload-attempt time in the database’s settings. _TIME_ is a |
| 120 string representation of a time, which may be in _yyyy-mm-dd hh:mm:ss_ |
| 121 format, a numeric `time_t` value, or the special strings `"never"` or |
| 122 `"now"`. |
| 123 |
| 124 See also **--show-last-upload-attempt-time**. |
| 125 |
| 126 * **--new-report**=_PATH_ |
| 127 |
| 128 Submit a new report located at _PATH_ to the database. If _PATH_ is `"-"`, |
| 129 the new report will be read from standard input. The new report will be in |
| 130 the “pending” state. The UUID assigned to the new report will be printed. |
| 131 This option may appear multiple times. |
| 132 |
| 133 * **--utc** |
| 134 |
| 135 When showing times, do so in UTC as opposed to the local time zone. When |
| 136 setting times, interpret ambiguous time strings in UTC as opposed to the |
| 137 local time zone. |
| 138 |
| 139 * **--help** |
| 140 |
| 141 Display help and exit. |
| 142 |
| 143 * **--version** |
| 144 |
| 145 Output version information and exit. |
| 146 |
| 147 ## Examples |
| 148 |
| 149 Shows all crash reports in a crash report database that are in the “completed” |
| 150 state. |
| 151 |
| 152 ``` |
| 153 $ crashpad_database_util --database /tmp/crashpad_database \ |
| 154 --show-completed-reports |
| 155 23f9512b-63e1-4ead-9dcd-e2e21fbccc68 |
| 156 4bfca440-039f-4bc6-bbd4-6933cef5efd4 |
| 157 56caeff8-b61a-43b2-832d-9e796e6e4a50 |
| 158 ``` |
| 159 |
| 160 Disables report upload in a crash report database’s settings, and then verifies |
| 161 that the change was made. |
| 162 |
| 163 ``` |
| 164 $ crashpad_database_util --database /tmp/crashpad_database \ |
| 165 --set-uploads-enabled false |
| 166 $ crashpad_database_util --database /tmp/crashpad_database \ |
| 167 --show-uploads-enabled |
| 168 false |
| 169 ``` |
| 170 |
| 171 ## Exit Status |
| 172 |
| 173 * **0** |
| 174 |
| 175 Success. |
| 176 |
| 177 * **1** |
| 178 |
| 179 Failure, with a message printed to the standard error stream. |
| 180 |
| 181 ## See Also |
| 182 |
| 183 [crashpad_handler(8)](../handler/crashpad_handler.md) |
| 184 |
| 185 ## Resources |
| 186 |
| 187 Crashpad home page: https://crashpad.chromium.org/. |
| 188 |
| 189 Report bugs at https://crashpad.chromium.org/bug/new. |
| 190 |
| 191 ## Copyright |
| 192 |
| 193 Copyright 2015 [The Crashpad |
| 194 Authors](https://chromium.googlesource.com/crashpad/crashpad/+/master/AUTHORS). |
| 195 |
| 196 ## License |
| 197 |
| 198 Licensed under the Apache License, Version 2.0 (the “License”); |
| 199 you may not use this file except in compliance with the License. |
| 200 You may obtain a copy of the License at |
| 201 |
| 202 http://www.apache.org/licenses/LICENSE-2.0 |
| 203 |
| 204 Unless required by applicable law or agreed to in writing, software |
| 205 distributed under the License is distributed on an “AS IS” BASIS, |
| 206 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 207 See the License for the specific language governing permissions and |
| 208 limitations under the License. |
OLD | NEW |