4. Free space and loads.
Make sure your server has free space and is not overloaded.
1) To see the current load, type the following commands in the console:
top
top - 16:12:39 up 5 days, 22:10, 3 users, load average: 2.27, 2.13, 2.19
Tasks: 225 total, 1 running, 213 sleeping, 11 stopped, 0 zombie
Cpu (s): 50.7% us, 10.5% sy, 0.0% ni, 34.5% id, 1.3% wa, 0.7% hi, 2.3% si, 0.0% st
Mem: 2009636k total, 1819172k used, 190464k free, 224128k buffers
Swap: 2040244k total, 104k used, 2040140k free, 925516k cached
PID USER PR VIRT RES SHR S% CPU% MEM TIME + COMMAND
4424 nobody 15 0 35532 16m 4416 S 5.6 0.8 0: 03.49 httpd
3211 nobody 15 0 35312 16m 4508 S 3.6 0.8 0: 04.61 httpd
3440 mysql 15 0 159m 49m 3692 S 2.3 2.5 106: 08.62 mysqld
You can see many interesting things here, but most importantly:
load averages: load average: 2.27, 2.13, 2.19 - number of processes in run order over 1.5 and 15 minutes respectively. Values less than 1 indicate a low server load, but it is a fairly rough and general indicator. More precisely, the CPU utilization can be seen in the% CPU line. Busy memory in general terms can be controlled by the Swap parameter. If Swap: Used uses a significant amount of memory installed on the server, then you should consider reducing the load or increasing the amount of memory.
2) To see the network channel load.
On Centos: yum install ifstat (after connecting with the dag repository).
On Debian, Ubuntu: apt-get install ifstat
3) Free disk space.
df -h
Special attention should be paid to the home and userness sections - usually containing content and var - where logs and MySQL databases are stored. See what occupies a lot of space, for example in the / home directory, as follows:
du -h -max-depth = 1 / home /
4) Search for a process, for example, find all PHP processes (often multiplying with a kronometer)
ps aux | grep php
5) Finish the process. If you see that a process uses too many resources and you want to finish it (only if you are sure you know exactly what you are doing)
kill PID
where the PID is the process ID (the first command output column and the second column of the command ps)
killall processname
where processname is the name of the process
If the process does not want to volunteer to end up, then we send a signal of forced quenching
kill -9 PID
killall -9 processname
6) Locate the file
To find the filename file in the / home / user directory and in all subdirectories:
find / home / user / -name filename
To find a file that contains the name "filename" in the / home / user folder and in all subdirectories:
find / home / user / -name "* filename *"
Find in the / home folder and all subfascals all the PHP scripts that contain the text "string for search"
find / home / -name "* .php" -exec grep -l 'string for search' {} \;
7) Find where PROGRAM program is
whereis PROGRAM
8) Check who you are
whoami
9) See who else is connected to the server
w
10) See the last 20 connections to the server
last -n20
11) Easy (without loss of compound) restart Apache
apachectl graceful
12) See the PHP version
php -v
13) See the modules connected to php
php -m
14) Change the admin crown
crontab -e-uadmin
if the midnight commander (usually installed) is installed, it's even easier
EDITOR = mcedit; crontab -e-uadmin
V-ar mai putea interesa și
5. Reboot the server
If none of the above has helped solve the problem, restart the server or open a ticket, where you...
3. Check the DNS record.
Check the nameserver in the registry where you registered the domain. Nameservers 1 and 2 are...