This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
code:linux [2020/03/12 08:30] hansek |
code:linux [2023/11/11 00:39] (current) hansek [jq] |
||
|---|---|---|---|
| Line 228: | Line 228: | ||
| </ | </ | ||
| + | * rc = Remove - only Configs | ||
| + | * ii = Install - Installed | ||
| + | |||
| + | [[https:// | ||
| ===== Disable / enable services from autostart ===== | ===== Disable / enable services from autostart ===== | ||
| Line 262: | Line 266: | ||
| <code bash> | <code bash> | ||
| SystemMaxUse=500M | SystemMaxUse=500M | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Jaký proces využívá port ===== | ||
| + | |||
| + | <code bash> | ||
| + | lsof -i :80 | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Certbot / Certifikáty ===== | ||
| + | |||
| + | List of existing certificates on host | ||
| + | |||
| + | <code bash> | ||
| + | certbot certificates | ||
| + | </ | ||
| + | |||
| + | Certificate detailed info | ||
| + | |||
| + | <code bash> | ||
| + | openssl x509 -text -noout -in < | ||
| + | </ | ||
| + | |||
| + | nebo online | ||
| + | |||
| + | <code bash> | ||
| + | nmap -p 443 --script ssl-cert coex.cz | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== CPU iowait debug ===== | ||
| + | |||
| + | Source: https:// | ||
| + | |||
| + | <code bash> | ||
| + | atop # run it with -d option or press d to toggle the disk stats view. | ||
| + | iostat -xm 2 # try it with the -xm 2 options for extended statistics, in megabytes and in two-second intervals. | ||
| + | iotop -oPa # – top-like I/O monitor. Try it with the -oPa options to show the accumulated I/O of active processes only. | ||
| + | ps auxf # – use auxf, then under the “STAT” column “D” usually indicates disk iowait. | ||
| + | strace | ||
| + | lsof # – after you’ve identified the process responsible, | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== jq ===== | ||
| + | |||
| + | **Inplace transform Unix timestamp to Datetime inside json log** | ||
| + | |||
| + | <code bash> | ||
| + | docker events | TZ=Europe/ | ||
| + | </ | ||
| + | |||
| + | **Inplace decode all k8s secrets values** | ||
| + | |||
| + | <code bash> | ||
| + | kubectl get secrets postgres-secrets -o json | jq '.data | map_values(@base64d)' | ||
| </ | </ | ||