Categories
Linux Servers Useful

How long a process has been running on linux server ? by PID or Name

If you want to see how long a process has been running on linux, all you have to do is find on its PID and use the following command: @ ps -o etime= -p “530” 9-18:53:38 but if you want the result in seconds, not in D-H:M:S / timestamp format, use the command like this: […]

Categories
Linux PHP Servers Useful

Get PHP MAJOR,MINOR and RELEASE Version Number – Linux Server

To find out the current version of php active on the server, there are basically two simple solutions and both use the php command with additional parameters. 1. php + grep + cut @ php -v | grep ^PHP | cut -d’ ‘ -f2 7.4.13 2. php +  internal constant from php itself @ php […]

Categories
Linux PHP Servers Useful

PHP-FPM Service – How to start,stop,reload – Ubuntu Linux Severs

Used with many web servers like Apache, Nginx, and other, PHP-FPM is a FastCGI process manager for PHP. Sometimes we need to restart the server for various reasons: changing settings for example, and depending on what linux we have on the server there are some variations in the commands used. Ubuntu/Debian Linux (Ubuntu Linux 16.04+; 18.04; […]

Categories
Linux Servers Useful

Solved! WARNING: [pool ***] server reached max_children, consider raising it

If you encounter such an error in the php logs, then it is time to modify max_children. The php logs are usually located in /var/log/,  and in my case they are in /var/log/php7.4-fpm.log WARNING: [pool ********] server reached max_children setting (8), consider raising it Search for the file where the max_children variable is located, in my case […]

Categories
Linux Servers Useful Wordpress

Automatically Kill php-fpm or apache2 process with the High CPU in Linux

Once again I needed a solution to kill php-fpm or apache2 process with the high CPU usage and considering that I am not at the first similar problem I said that it is good to write it again somewhere, not to forget it. And this time the problem appeared with sites in Wordpress, it is a […]

Categories
Linux Servers Tools Useful

Disk Partitions Commands in Ubuntu/Debian Server – LINUX Tools

1. fdisk The fdisk command can display the partitions and details like file system type, model, zise. In Ubuntu 20.04 report the size of each partitions, but not in all Linux distributions! @ sudo fdisk -l Disk /dev/nvme0n1: 232.91 GiB, 250059350016 bytes, 488397168 sectors Disk model: Samsung SSD 970 EVO 250GB Units: sectors of 1 […]

Categories
Linux PHP Servers

Where is the php.ini configuration and enabled PHP modules? – Ubuntu Server

PHP configuration folders is usually in /etc/php/ and the installed version, in my case is in /etc/php/7.4/ The active version can be found with the following command in Ubuntu (ubuntu 20.04 for my case): @ php -version PHP 7.4.13 (cli) (built: Dec 10 2020 08:08:23) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) […]

Categories
Linux Security Servers Useful

Delete UFW Firewall Rules on Ubuntu & Debian Server – Linux

If you want to delete active rules (filters) from UFW – Uncomplicated Firewall – , find out that it is very simple and there are two methods to do this, but first of all you have to make sure that UFW is installed and active (enabled): @ sudo ufw status If the displayed result is […]

Categories
Linux Security Useful

How to Change default SSH Port 22 to Increase Security

By default, the SSH service runs on port 22, but to prevent automated robots and malicious users from brute-forcing into your server, you should consider changing the default 22 SSH port with another randomly selected one.. To prevent incorrect server configuration, you should choose a port from the range of dynamic / private ports (i.e., […]

Categories
Linux Useful

Convert Subtitles SRT from ISO-8859-16 to UTF-8 – iconv – Linux

On the current personal NAS server, which is more like a Media Server for a Home Theater, I installed Jellyfin instead of more “popular” but not one of the most suitable for Home Media Center, such as Open Media Vault, or Amahi. The current configuration replaced an older server for which I used OMV (Open Media […]