Skip to content

Instantly share code, notes, and snippets.

View shyamvyas5's full-sized avatar

Shyam Vyas shyamvyas5

  • Rajkot, Gujarat, India
View GitHub Profile
@shyamvyas5
shyamvyas5 / README.md
Last active October 2, 2023 14:29
getting count of 4xx and 5xx logs from the logs file
@wpscholar
wpscholar / grep-status-codes.sh
Last active October 6, 2023 17:46
How to use grep to lookup status codes in access logs.
# Output the access log
cat access.log
# Run the results through grep to find any 500 status codes
cat access.log | grep "[: ]500[: ]"
# Find any non 200 status codes
cat access.log | grep -v "[: ]200[: ]"
# Find multiple status codes
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table