This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get CPU usage | |
# Use the top command in batch mode to run once, take the first line, use awk to get the 8th column (idle value), | |
# then subtract it from 100 to get the CPU usage percentage. | |
CPU_USAGE=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}') | |
CPU_USAGE=${CPU_USAGE%.*} | |
# Check if the CPU usage is less than 20% | |
if [ "$CPU_USAGE" -lt 20 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by iptables-save v1.8.7 on Fri Mar 31 15:15:21 2023 | |
*filter | |
:INPUT ACCEPT [86:13330] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [81:57555] | |
:InstanceServices - [0:0] | |
COMMIT | |
# Completed on Fri Mar 31 15:15:21 2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simplified / Traditional Chinese conversion tables | |
* | |
* Automatically generated using code and data in maintenance/language/zhtable/ | |
* Do not modify directly! | |
* | |
* @file | |
*/ |