Check ClickHouse Disks

Following query will show you ClickHouse Disks via reading system.disks table.

SELECT name, path, formatReadableSize(sum(free_space)) as free_space, formatReadableSize(sum(total_space)) as total_space, 
       formatReadableSize(sum(keep_free_space)) as keep_free_space, type
FROM system.disks
GROUP BY name, path, type FORMAT PrettyCompact

Example Output:

Query id: 92dac3b4-7b3e-4d98-9e64-d4d071669e77

┌─name────┬─path─────────────────┬─free_space─┬─total_space─┬─keep_free_space─┬─type──┐
│ default │ /var/lib/clickhouse/ │ 46.11 GiB  │ 58.37 GiB   │ 0.00 B          │ local │
└─────────┴──────────────────────┴────────────┴─────────────┴─────────────────┴───────┘

1 row in set. Elapsed: 0.018 sec. 

 

Was this article helpful?

Related Articles

CHISTADATA IS COMMITTED TO OPEN SOURCE SOFTWARE AND BUILDING HIGH PERFORMANCE COLUMNSTORES

In the spirit of freedom, independence and innovation. ChistaDATA Corporation is not affiliated with ClickHouse Corporation 

Need Support?

Can't find the answer you're looking for?
Contact Support

ChistaDATA Inc. Knowledge base is licensed under the Apache License, Version 2.0 (the “License”)

Copyright 2022 ChistaDATA Inc

Licensed 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.