Server Resource Usage Recommendations

This form calculator helps recommend server specs based on your determined existing Linux server's resource usage by asking you questions and providing an example Linux SSH command line(s) you can click on the command line text to automatically copy the text and then paste into your SSH session to get the answer. Your existing Linux server must already have sar command installed from sysstat YUM/APT packages. The resource usage from sar command are only based on past 24hrs or past 7 days of activity and resource usage. You can pick a peak server/site activity time to run these commands.

For more accurate resource usage monitoring, you can use sar command and other tools over a longer duration than the past 24hrs. Centmin Mod LEMP stack users also have access to cminfo command tool which already uses sysstat YUM package.

For non-Centmin Mod LEMP stacks, you can check out these guides for installing sysstat:

Metrics


nproc
Use the above command in your server's terminal to find out the number of CPU threads.
Text copied to clipboard

Past 24hrs:

awk -v nproc=$(nproc) '/Average/ {print $4 / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $5 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 1-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $4 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 1-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && { new_values=$(sar -q -f "$file" | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $4 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 1-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."
Use the above command in your server's terminal to find out the Cpu Load Average for 1 min interval accounting for number of CPU threads.

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && values+=($(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $5 / nproc}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && values+=($(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $4 / nproc}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -q -f "$file" | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $4 / nproc}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'
Use the above command in your server's terminal to find out the Cpu Load Average for 1 min interval accounting for number of CPU threads.

Past 24hrs:

awk -v nproc=$(nproc) '/Average/ {print $5 / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $6 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 5-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $5 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 5-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && { new_values=$(sar -q -f "$file" | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $5 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 5-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."
Use the above command in your server's terminal to find out the Cpu Load Average for 5 min interval accounting for number of CPU threads.

Past 24hrs:

awk -v nproc=$(nproc) '/Average/ {print $6 / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $7 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 15-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_values=$(sar -q -f $file | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $6 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 15-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && { new_values=$(sar -q -f "$file" | awk -v nproc=$(nproc) '/^$/ {next} /^[A-Za-z]/ {next} {print $6 / nproc}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average 15-min load average over the last 7 days: $(printf "%0.4f" $average)"; } || echo "No data available."
Use the above command in your server's terminal to find out the Cpu Load Average for 15 min interval accounting for number of CPU threads.

Past 24hrs:

awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($5 > max) max = $5} END {print max / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($5/nproc > max) max = $5/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 1-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($4/nproc > max) max = $4/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 1-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($4/nproc > max) max = $4/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 1-min CPU load (per core) over the last 7 days: $(printf "%0.6f" $max)"
Use the above command in your server's terminal to find out the CPU load peak for 1 min interval accounting for number of CPU threads.

Past 24hrs:

awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($6 > max) max = $6} END {print max / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-5/ && !/runq-sz/ && !/^$/ {if ($6/nproc > max) max = $6/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 5-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-5/ && !/runq-sz/ && !/^$/ {if ($5/nproc > max) max = $5/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 5-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($5/nproc > max) max = $5/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 5-min CPU load (per core) over the last 7 days: $(printf "%0.6f" $max)"
Use the above command in your server's terminal to find out the CPU load peak for 5 min interval accounting for number of CPU threads.

Past 24hrs:

awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($7 > max) max = $7} END {print max / nproc}' <(sar -q)

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-15/ && !/runq-sz/ && !/^$/ {if ($7/nproc > max) max = $7/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 15-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-15/ && !/runq-sz/ && !/^$/ {if ($6/nproc > max) max = $6/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 15-min CPU load (per core) over the last 7 days: $(printf "%0.4f" $max)"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f $file ] && { new_max=$(sar -q -f $file | awk -v nproc=$(nproc) 'NR > 3 && !/Average/ && !/ldavg-1/ && !/runq-sz/ && !/^$/ {if ($6/nproc > max) max = $6/nproc} END {print max}'); [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ] && max=$new_max; }; done; echo "Peak 15-min CPU load (per core) over the last 7 days: $(printf "%0.6f" $max)"
Use the above command in your server's terminal to find out the CPU load peak for 15 min interval accounting for number of CPU threads.

Past 24hrs:

sar -u | awk '/Average/ {print 100 - $8}'

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{total=0; count=0} /all/ && !/Average/ {total+=(100 - $9); count++} END{if(count>0){print total/count}else{print 0}}'; done | awk '{total+=$1; count++} END{if(count>0){print total/count}else{print "No data available."}}'); echo "Average CPU utilization (per core) over the last 7 days: ${total:-0}%"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{total=0; count=0} /all/ && !/Average/ {total+=(100 - $9); count++} END{if(count>0){print total/count}else{print 0}}'; done | awk '{total+=$1; count++} END{if(count>0){print total/count}else{print "No data available."}}'); echo "Average CPU utilization (per core) over the last 7 days: ${total:-0}%"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{total=0; count=0} /all/ && !/Average/ {total+=(100 - $8); count++} END{if(count>0){print total/count}else{print 0}}'; done | awk '{total+=$1; count++} END{if(count>0){print total/count}else{print "No data available."}}'); echo "Average CPU utilization (per core) over the last 7 days: ${total:-0}%"
Use the above command in your server's terminal to find out the average CPU utilization % over the last 7 days.

Past 24hrs:

sar -u | awk '/all/ && !/Average/ {if (100 - $9 > max) max = 100 - $9} END {print max}'

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if (100 - $9 > max) max = 100 - $9} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU utilization (per core) over the last 7 days: $(printf "%0.4f" $max)%"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if (100 - $9 > max) max = 100 - $9} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU utilization (per core) over the last 7 days: $(printf "%0.4f" $max)%"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if (100 - $9 > max) max = 100 - $8} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU utilization (per core) over the last 7 days: $(printf "%0.4f" $max)%"
Use the above command in your server's terminal to find out the peak CPU % utilization.

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print 100 - $9}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print 100 - $9}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print 100 - $8}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'
Use the above command in your server's terminal to find out the peak CPU % utilization percentile values.

Past 24hrs:

sar -u | awk '/Average/ {print $7}'

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{total=0; count=0} /all/ && !/Average/ && !/LINUX RESTART/{total+=$6; count++} END{if(count>0){print total/count}else{print 0}}'; done | awk '{total+=$1; count++} END{if(count>0){print total/count}else{print "No data available."}}'); echo "Average CPU steal (per core) over the last 7 days: ${total:-0}%"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{total=0; count=0} /all/ && !/Average/ && !/LINUX RESTART/{total+=$6; count++} END{if(count>0){print total/count}else{print 0}}'; done | awk '{total+=$1; count++} END{if(count>0){print total/count}else{print "No data available."}}'); echo "Average CPU steal (per core) over the last 7 days: ${total:-0}%"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=$(for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "-$day days")"; [ -f "$file" ] && sar -u -f "$file" | awk 'BEGIN{day_total=0; day_count=0} /all/ && !/Average/ && !/LINUX RESTART/{day_total+=$7; day_count++} END{if(day_count>0) print day_total/day_count}'; done | awk '{total+=$1; count++} END{if(count>0) {print total/count} else {print "No data available"}}'); echo "Average CPU steal (per core) over the last 7 days: ${total:-0}%"
Use the above command in your server's terminal to find out the average CPU steal %.

Past 24hrs:

sar -u | awk '/all/ && !/Average/ {if ($8 > max) max = $8} END {print max+0}'

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if ($6 > max) max = $6} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU steal (per core) over the last 7 days: $(printf "%0.4f" $max)%"

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if ($6 > max) max = $6} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU steal (per core) over the last 7 days: $(printf "%0.4f" $max)%"

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

max=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; if [ -f "$file" ]; then new_max=$(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {if ($6 > max) max = $6} END {print max}'); if [[ "$new_max" =~ ^[0-9]+(.[0-9]+)?$ ]] && [ "$(echo "$new_max > $max" | bc -l)" -eq 1 ]; then max=$new_max; fi; fi; done; echo "Peak CPU steal (per core) over the last 7 days: $(printf "%0.4f" $max)%"
Use the above command in your server's terminal to find out the peak CPU steal %.

Past 7 days for EL7 based RHEL/CentOS sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print $6}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for EL8+ based RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print $6}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

values=(); for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f "$file" ] && values+=($(sar -u -f "$file" | awk 'NR > 3 && !/Average/ {print $6}')); done; printf "%s
" "${values[@]}" | sort -n | awk 'BEGIN{percentiles[1]=90; percentiles[2]=95; percentiles[3]=99} {all[NR]=$1} END{for (i in percentiles) {idx=int(NR*percentiles[i]/100); print percentiles[i]"th percentile: "all[idx]}}'
Use the above command in your server's terminal to find out the peak CPU steal % percentile values.

Past 24hrs for EL7 systems:

sar -r | awk '/Average/ {print $3 / 1024 / 1024}'

Past 24hrs for EL8+ systems:

sar -r | awk '/Average/ {print $4 / 1024 / 1024}'

Past 7 days for RHEL/CentOS/AlmaLinux/Rocky Linux/Oracle Linux sar command:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sa/sa$(date +%d -d "$day days ago")"; [ -f $file ] && { col=$(sar -r -f $file | head -3 | tail -1 | tr -s ' ' | tr ' ' '
' | nl | grep kbmemused | cut -f1); [ "$col" != "" ] && { new_values=$(sar -r -f $file | awk -v col="$col" '/^$/ {next} /^[A-Za-z]/ {next} {print $(col) / 1024 / 1024}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average memory usage over the last 7 days: $(printf "%0.4f" $average) GB"; } || echo "No data available."

Past 7 days for Ubuntu 20+ Linux sar command where $(seq 0 6) in below code determines days 0 - 6 = 7 days. So for 30 days you can change to $(seq 0 29). Centmin Mod LEMP stacks are configured to log max of 59 days while non-Centmin Mod systems using default will be between 28-31 days max:

total=0; count=0; for day in $(seq 0 6); do file="/var/log/sysstat/sa$(date +%Y%m%d -d "$day days ago")"; [ -f $file ] && { col=$(sar -r -f $file | head -3 | tail -1 | tr -s ' ' | tr ' ' '
' | nl | grep kbmemused | cut -f1); [ "$col" != "" ] && { new_values=$(sar -r -f $file | awk -v col="$col" '/^$/ {next} /^[A-Za-z]/ {next} {print $(col) / 1024 / 1024}'); for value in $new_values; do total=$(echo "$total + $value" | bc -l); count=$((count + 1)); done; }; }; done; [ $count -gt 0 ] && { average=$(echo "$total / $count" | bc -l); echo "Average memory usage over the last 7 days: $(printf "%0.4f" $average) GB"; } || echo "No data available."
Use the above command in your server's terminal to find out the average Memory usage in Gigabytes.

grep -i "Committed_AS" /proc/meminfo | awk '{print $2 / 1024 / 1024 }'
Use the above command in your server's terminal to find out the peak Memory usage in Gigabytes. The Committed_AS value in /proc/meminfo shows the total amount of memory that Linux has committed to processes, which includes both the memory currently in use and additional memory reserved for potential future use, helping to identify if your system is at risk of running out of memory

Enter the number of local backup copies of your data that you want to keep at a time.

df -h | grep ' /$' | awk '{print $3}'
Your current disk usage on partition /.

interface=$(ip -o link show | awk '$9 == "UP" {print $2}' | sed 's/:$//' | head -n 1)
sar -n DEV | grep $interface | grep -v Average | awk '{total += $5} END {print (total / NR) * 8 / 1000 }'
Average bandwidth out on network device over past 24hrs.

For EL7 systems:

interface=$(ip -o link show | awk '$9 == "UP" {print $2}' | sed 's/:$//' | head -n 1)
sar -n DEV | awk -v iface="$interface" '($3 == iface) && $1 !~ /^(Average:|IFACE)$/ && $1 ~ /^[0-9]/ {if ($5 > max) max = $5} END {print "Interface: " iface ", Peak Egress Bandwidth: " max * 8 / 1000 }'

For EL8+ systems:

interface=$(ip -o link show | awk '$9 == "UP" {print $2}' | sed 's/:$//' | head -n 1)
sar -n DEV | awk -v iface="$interface" '($2 == iface) && $1 !~ /^(Average:|IFACE)$/ && $1 ~ /^[0-9]/ {if ($5 > max) max = $5} END {print "Interface: " iface ", Peak Egress Bandwidth: " max * 8 / 1000 }'

For Ubuntu 20+ Linux systems:

interface=$(ip -o link show | awk '$9 == "UP" {print $2}' | sed 's/:$//' | head -n 1)
sar -n DEV | awk -v iface="$interface" '($2 == iface) && $1 !~ /^(Average:|IFACE)$/ && $1 ~ /^[0-9]/ {if ($5 > max) max = $5} END {print "Interface: " iface ", Peak Egress Bandwidth: " max * 8 / 1000 }'
Peak bandwidth out on network device over past 24hrs.

Please note that the recommendations based on your submitted data are general guidelines reflecting your server's current usage. These may not always align with the optimal configuration, as software settings can affect actual resource needs. Treat these recommendations as a starting point only.

Text copied to clipboard