Advanced Search
Search Results
17 total results found
Common Commands
Get Container Running Containersdocker ps All Containersdocker ps -a Inspect Container docker inspect foo Get Tail Logs docker logs --tail 100 xxx Get Mounts Info docker inspect foo | grep -A 10 -i mounts "Mounts": [ { "Type": "bind", ...
CPU Memory Stat
Node Stat #!/bin/bash echo -e "NODE\t\t\tCPU Requests\tCPU Limits\tMemory Requests\tMemory Limits" for node in $(kubectl get nodes -o name | cut -d'/' -f2); do kubectl describe node "$node" | awk -v node="$node" ' BEGIN { cpu_req = cpu_lim = m...
Others
Cluster Info kubectl cluster-info Kubernetes master is running at https://lb-tomato.example.local:6443 KubeDNS is running at https://lb-tomato.example.local:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster...
Pod
Get Pod Image kubectl get po xxx -o jsonpath="{.items[*].spec['containers'][*].image}{'\n'}"; echo List All Images All Images = Containers Images + Init Containers Images All Imageskubectl get pods -o jsonpath="{.items[*].spec['containers', 'initContainers'...
Common Commands
List Repo helm repo ls Search Chart helm search repo chart-name List Release helm ls NAME: clickhouse NAMESPACE: monitor REVISION: 1 UPDATED: 2023-07-24 10:52:50.017724318 +0000 UTC STATUS: deployed CHART: clickhouse-0.2.5 APP VERSION: 23.6.2.18-alpine...
Basic Usage
Get Health curl -s "http://localhost:9200/_cluster/health?pretty" { "cluster_name" : "docker-cluster", // 集群名称 "status" : "green", // 集群健康状态,green 表示正常 "timed_out" : false, // 查询集群健康时是否超时,false 表示未超时 "number_of_nodes" ...
mysqldump
With DB Creation User --database mysqldump -hlocalhost -uroot -P3306 -pcmajor --databases foo > db-2025-05-09-17-51.sql
Common Commands 1
MAN This command can view different sections of the manual pages. man man man - an interface to the system reference manuals The table below shows the section numbers of the manual followed by the types of pages they contain. 1 Executable programs or shell...
Common Commands 2
Sort Sorts lines of text files by default, non-numeric. sort - sort lines of text files Reverse Order sort -r file Numeric Sort sort -n file Sort By Month Month format: Jan, Feb, Mar. sort -M file Specify Column Default is separated by (consecutive) space...
Compression
[todo]
GREP
Full name Global Regular Expression Print, originated from a Unix editor ed command g/re/p, where g (global) is global matching, re (regular expression) is regular expression, p (print) is print. Therefore, the grep tool is essentially used to globally match r...
PS
PS stands for Process Status. man ps ps - report a snapshot of the current processes. Style Source Prefix Unix AT&T System of Bell Labs - BSD Berkeley Software Distribution None GNU Improved version by GNU Project -- Due to historical reasons, ...
Terminate Process
Kill Command It's actually a tool for sending signals to processes, not necessarily killing them. man kill kill - send a signal to a process Default Signal The default signal for the kill command is SIGTERM, corresponding to number 15, for a graceful termin...
TOP
man top top - display Linux processes The top command defaults to sorting processes by CPU usage rate and dynamically displaying the results. top - 09:19:05 up 6 days, 10:02, 2 users, load average: 0.13, 0.05, 0.01 Tasks: 126 total, 1 running, 125 sleepi...
Commands
Get Router IP netstat -nr | grep default Destination Gateway Flags Netif Expire default 172.30.109.1 UGScg en1 default link#24 UCSIg bridge100 ! default ...
Commands
iostat -x 1 iotop lsblk lsblk -o NAME,SIZE,TYPE,MOUNTPOINT dmsetup ls lvdisplay cat /etc/fstab
kubectl edit
https://kubernetes.io/docs/reference/kubectl/generated/kubectl_edit/ Examples Edit in JSON kubectl edit -o json deploy foo Change Editor KUBE_EDITOR="vim" kubectl edit deploy foo Save Config kubectl edit deploy foo --save-config 把本次修改后的完整资源配置,保存到 annotati...