A
A
Alion02022-03-04 21:54:50
Nginx
Alion0, 2022-03-04 21:54:50

A few Linux questions from a newbie?

1. Есть ноутбук на Линукс с подключением через SSH протокол и фаерволл (его нельзя трогать) на терминальный сервер, с него есть доступ на 80 порт nginx где запущено Веб приложение и в его админке нужно поставить 1 галочку - как?
2. На линукс программа пишет постоянно лог и нет возможности ее остановить и перенастроить, лог скоро забьет все место, что делать?
3. Остановилась машина с тем что закончилось место(ext-4), после df -h еще занята половина места, почему?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vindicar, 2022-03-04
@Vindicar

As for the logs - logrotate setting, it is probably already installed, just figure out how to set it on the log of your program. But then again, some programs go crazy with this. Need to try.

D
Dr. Bacon, 2022-03-05
@bacon

3. see df -i maybe you have a lot of small files and run out of inodes

R
rPman, 2022-03-04
@rPman

who said that the place is over if df -h says that it is?
if the log file is not permanently open for writing (by the way, it depends on how the program writes data there, it may work out) it can be cut with a regular utility
truncate -s 0 logfile
, but for the future, you need to configure the logs to be written not to the same file, but to a new one at intervals (for example, a file name with the current date, divides the logs by day), the easiest way to clean such logs is by cron

D
Dmitriy Loginov, 2022-03-05
@caramingo

1. it is not clear what is needed, write in more detail what and where.
2. Disable logging in the settings, redirect logging to /dev/null , delete everything in the log file with the command > /var/log/logfile.log
3. Maybe the space has run out on the section with logs? Stop the service, delete old logs or clean up existing ones, see point 2 It was not bad to see the output of the df -h command

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question