More OOB actions
This commit is contained in:
parent
3c81d6c07f
commit
555358a851
34
src/basic.sh
34
src/basic.sh
@ -53,20 +53,25 @@ echo -e "\n${TEXT_COLOR_GOOD} - Installed panel: ${TEXT_COLOR_OFF}\n"
|
||||
[[ -d /usr/local/mgr5/ ]] && echo "ISPManager!"
|
||||
[[ -d /usr/local/fastpanel2 ]] && echo "Fastpanel 2"
|
||||
|
||||
echo -e "${TEXT_COLOR_GOOD} - Installed packages: ${TEXT_COLOR_OFF}\n"
|
||||
echo -e "${TEXT_COLOR_GOOD} - OOMS: ${TEXT_COLOR_OFF}\n"
|
||||
dmesg -T | grep "Out of memory" | tail -20
|
||||
|
||||
list=$(apt list --installed 2>&1 |egrep 'atop')
|
||||
echo -e "${TEXT_COLOR_GOOD} - Top RAM usage:${TEXT_COLOR_OFF}"
|
||||
|
||||
ps axk-%mem ouser,%cpu,%mem,command | head
|
||||
echo
|
||||
echo -e "${TEXT_COLOR_GOOD} - Top CPU usage:${TEXT_COLOR_OFF}"
|
||||
|
||||
ps axk-%cpu ouser,%cpu,%mem,command | head
|
||||
|
||||
echo $list
|
||||
|
||||
while true
|
||||
do
|
||||
echo -e "
|
||||
---
|
||||
1. Посмотреть жрущие ЦПУ/ОЗУ процессы
|
||||
2. Вывести OOM'ы
|
||||
3. nginx: Посмотреть конфиги и домены в них
|
||||
4. Запустить logs
|
||||
1. Есть ли atop?
|
||||
2. nginx: Посмотреть конфиги и домены в них
|
||||
3. Запустить logs
|
||||
|
||||
0. Выход
|
||||
"
|
||||
@ -77,22 +82,15 @@ echo -e "
|
||||
harakiri
|
||||
;;
|
||||
1)
|
||||
echo -e "${TEXT_COLOR_GOOD}- Top RAM usage:${TEXT_COLOR_OFF}"
|
||||
echo -e "${TEXT_COLOR_GOOD} - Installed packages: ${TEXT_COLOR_OFF}\n"
|
||||
list=$(apt list --installed 2>&1 |egrep 'atop')
|
||||
echo $list
|
||||
|
||||
ps axk-%mem ouser,%cpu,%mem,command | head
|
||||
echo
|
||||
echo -e "${TEXT_COLOR_GOOD}- Top CPU usage:${TEXT_COLOR_OFF}"
|
||||
|
||||
ps axk-%cpu ouser,%cpu,%mem,command | head
|
||||
;;
|
||||
2)
|
||||
echo "- OOMS:"
|
||||
dmesg -T | grep "Out of memory"
|
||||
;;
|
||||
3)
|
||||
nginx -T 2> /dev/null | egrep "configuration file|server_name"
|
||||
;;
|
||||
4)
|
||||
3)
|
||||
wget -O /tmp/nginx.sh 94.228.126.204/nginx.sh
|
||||
bash /tmp/nginx.sh
|
||||
rm /tmp/nginx.sh
|
||||
|
Loading…
Reference in New Issue
Block a user