Telegram Group & Telegram Channel
Monitor System Resource Usage (CPU, Memory, Disk) with Shell Scripts

В этой статье показано, как написать простые, но мощные Shell-скрипты для мониторинга использования процессора, памяти и корневого раздела системы. Когда утилизация ресурса превышает предустановленное значение предупреждения, скрипт автоматически отправит оповещение по электронной почте. Некоторые примеры:

Память:
mem=$(free | awk '/Mem:/ {printf "%.2f", $3/$2 * 100.0}')

Диск:
disk=$(df -h / | awk 'NR==2 {print $5}' | sed 's/%//')

Процессор:
cpu=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0–9.]*\)%* id.*/\1/" | awk '{print 100 — $1}')


Подробности в статье

❗️Статья на Медиум



tg-me.com/usr_bin_linux/619
Create:
Last Update:

Monitor System Resource Usage (CPU, Memory, Disk) with Shell Scripts

В этой статье показано, как написать простые, но мощные Shell-скрипты для мониторинга использования процессора, памяти и корневого раздела системы. Когда утилизация ресурса превышает предустановленное значение предупреждения, скрипт автоматически отправит оповещение по электронной почте. Некоторые примеры:

Память:

mem=$(free | awk '/Mem:/ {printf "%.2f", $3/$2 * 100.0}')

Диск:
disk=$(df -h / | awk 'NR==2 {print $5}' | sed 's/%//')

Процессор:
cpu=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0–9.]*\)%* id.*/\1/" | awk '{print 100 — $1}')


Подробности в статье

❗️Статья на Медиум

BY /usr/bin




Share with your friend now:
tg-me.com/usr_bin_linux/619

View MORE
Open in Telegram


usr bin Telegram | DID YOU KNOW?

Date: |

In many cases, the content resembled that of the marketplaces found on the dark web, a group of hidden websites that are popular among hackers and accessed using specific anonymising software.“We have recently been witnessing a 100 per cent-plus rise in Telegram usage by cybercriminals,” said Tal Samra, cyber threat analyst at Cyberint.The rise in nefarious activity comes as users flocked to the encrypted chat app earlier this year after changes to the privacy policy of Facebook-owned rival WhatsApp prompted many to seek out alternatives.

Traders also expressed uncertainty about the situation with China Evergrande, as the indebted property company has not provided clarification about a key interest payment.In economic news, the Commerce Department reported an unexpected increase in U.S. new home sales in August.Crude oil prices climbed Friday and front-month WTI oil futures contracts saw gains for a fifth straight week amid tighter supplies. West Texas Intermediate Crude oil futures for November rose $0.68 or 0.9 percent at 73.98 a barrel. WTI Crude futures gained 2.8 percent for the week.

usr bin from us


Telegram /usr/bin
FROM USA