-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommands.yml
More file actions
263 lines (231 loc) · 8.75 KB
/
commands.yml
File metadata and controls
263 lines (231 loc) · 8.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# Commands for CPITMschool/Scripts
# This file should be added to your GitHub repository as commands.yml
- id: system
name: System
description: System commands and monitoring
icon: fas fa-cogs
commands:
- id: system_info
name: System Information
description: Show detailed system information
command: uname -a && echo "---" && free -h && echo "---" && df -h && echo "---" && lscpu | head -20
category: system
icon: fas fa-info-circle
- id: memory_usage
name: Memory Usage
description: Detailed memory usage information
command: free -h && echo "---" && cat /proc/meminfo | head -15
category: system
icon: fas fa-memory
- id: disk_usage
name: Disk Usage
description: Show disk space usage
command: df -h && echo "---" && du -sh /* 2>/dev/null | sort -hr | head -10
category: system
icon: fas fa-hdd
- id: top_processes
name: Top Processes
description: Show most resource-intensive processes
command: ps aux --sort=-%cpu | head -20
category: system
icon: fas fa-list
- id: network
name: Network
description: Network commands and diagnostics
icon: fas fa-network-wired
commands:
- id: network_info
name: Network Interfaces
description: Show network interface information
command: ip addr show && echo "---" && ip route show
category: network
icon: fas fa-ethernet
- id: ping_test
name: Connectivity Test
description: Test connectivity to main DNS servers
command: ping -c 4 8.8.8.8 && echo "---" && ping -c 4 1.1.1.1
category: network
icon: fas fa-satellite-dish
- id: port_scan
name: Open Ports
description: Show open ports and active connections
command: netstat -tuln && echo "---" && ss -tuln
category: network
icon: fas fa-door-open
- id: network_speed
name: Network Speed
description: Test network connection speed
command: curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 - --simple
category: network
icon: fas fa-tachometer-alt
- id: docker
name: Docker
description: Docker container management
icon: fab fa-docker
commands:
- id: docker_status
name: Docker Status
description: Show Docker service status and basic information
command: systemctl status docker --no-pager && echo "---" && docker version
category: docker
icon: fas fa-info
- id: docker_containers
name: Container List
description: Show all Docker containers
command: docker ps -a --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}\t{{.Image}}"
category: docker
icon: fas fa-boxes
- id: docker_images
name: Docker Images
description: Show all Docker images with sizes
command: docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}\t{{.CreatedAt}}"
category: docker
icon: fas fa-compact-disc
- id: docker_stats
name: Container Stats
description: Show container resource usage
command: docker stats --no-stream --format "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}"
category: docker
icon: fas fa-chart-bar
- id: docker_cleanup
name: Docker Cleanup
description: Remove unused Docker resources
command: docker system prune -f && docker volume prune -f
category: docker
icon: fas fa-broom
requiresConfirmation: true
- id: blockchain
name: Blockchain Nodes
description: Blockchain node management
icon: fas fa-cubes
commands:
- id: node_status
name: Node Status
description: Check status of all running nodes
command: systemctl status node-* --no-pager -l | head -50
category: blockchain
icon: fas fa-heartbeat
- id: node_logs
name: Node Logs
description: Show recent node logs
command: journalctl -u node-* -n 50 --no-pager
category: blockchain
icon: fas fa-file-alt
- id: cosmos_status
name: Cosmos Node Status
description: Check Cosmos SDK node status
command: curl -s localhost:26657/status | jq '.result | {node_info: .node_info.moniker, sync_info: .sync_info}'
category: blockchain
icon: fas fa-atom
- id: validator_info
name: Validator Info
description: Show validator information
command: curl -s localhost:26657/status | jq '.result.validator_info'
category: blockchain
icon: fas fa-shield-alt
- id: peer_count
name: Peer Count
description: Show number of connected peers
command: curl -s localhost:26657/net_info | jq '.result.n_peers' && echo "Peers:" && curl -s localhost:26657/net_info | jq '.result.peers[].node_info.moniker'
category: blockchain
icon: fas fa-users
- id: latest_block
name: Latest Block
description: Show latest block information
command: curl -s localhost:26657/status | jq '.result.sync_info | {latest_block_height, latest_block_time, catching_up}'
category: blockchain
icon: fas fa-cube
- id: monitoring
name: Monitoring
description: System monitoring commands
icon: fas fa-chart-line
commands:
- id: cpu_usage
name: CPU Usage
description: Show CPU usage
command: top -b -n1 | grep "Cpu(s)" && echo "---" && ps aux --sort=-%cpu | head -10
category: monitoring
icon: fas fa-microchip
- id: load_average
name: System Load
description: Show system load average
command: uptime && echo "---" && w && echo "---" && cat /proc/loadavg
category: monitoring
icon: fas fa-weight-hanging
- id: io_stats
name: I/O Statistics
description: Show input/output statistics
command: iostat -x 1 1 2>/dev/null || (echo "iostat not available, using alternative:" && cat /proc/diskstats | head -10)
category: monitoring
icon: fas fa-exchange-alt
- id: system_logs
name: System Logs
description: Show recent system logs
command: journalctl -n 30 --no-pager | tail -20
category: monitoring
icon: fas fa-scroll
- id: failed_services
name: Failed Services
description: Show services that failed to start
command: systemctl --failed --no-pager
category: monitoring
icon: fas fa-exclamation-triangle
- id: security
name: Security
description: Security check commands
icon: fas fa-shield-alt
commands:
- id: login_attempts
name: Login Attempts
description: Show recent login attempts
command: last -n 20 && echo "---" && lastb -n 10
category: security
icon: fas fa-sign-in-alt
- id: ssh_connections
name: SSH Connections
description: Show active SSH connections
command: who && echo "---" && ss -tn state established '( dport = :22 or sport = :22 )'
category: security
icon: fas fa-terminal
- id: firewall_status
name: Firewall Status
description: Show firewall status and rules
command: ufw status verbose 2>/dev/null || (systemctl status firewalld --no-pager 2>/dev/null || echo "No firewall detected")
category: security
icon: fas fa-fire
- id: open_ports
name: Open Ports
description: Show all open ports and services
command: nmap -sT -O localhost 2>/dev/null || netstat -tuln
category: security
icon: fas fa-door-open
- id: maintenance
name: Maintenance
description: System maintenance commands
icon: fas fa-tools
commands:
- id: update_system
name: System Updates
description: Check and install system updates
command: apt list --upgradable 2>/dev/null || yum check-update 2>/dev/null || echo "Package manager not detected"
category: maintenance
icon: fas fa-download
- id: clean_logs
name: Clean Logs
description: Clean old logs to free up space
command: journalctl --disk-usage && echo "Cleaning..." && journalctl --vacuum-time=7d
category: maintenance
icon: fas fa-broom
requiresConfirmation: true
- id: backup_configs
name: Backup Configurations
description: Create backup of important configuration files
command: tar -czf /tmp/configs-backup-$(date +%Y%m%d).tar.gz /etc/systemd/system/ /etc/nginx/ /etc/ssh/ 2>/dev/null && ls -la /tmp/configs-backup-*.tar.gz
category: maintenance
icon: fas fa-archive
- id: check_certificates
name: Check Certificates
description: Check SSL certificate expiration dates
command: find /etc/letsencrypt/live/ -name "cert.pem" -exec openssl x509 -in {} -text -noout \; 2>/dev/null | grep -A2 "Not After" || echo "No certificates found"
category: maintenance
icon: fas fa-certificate