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