Simple management of servers
The following command simply checks the status of the FTP server:
service vsftpd status
This command restarts the FTP server if there's any problem with it:
sudo service vstfpd restart
The service
utility that we have used lets you restart the database and web server using these two commands:
sudo service mysql restart sudo service apache2 restart
Use the following command to check the status of the MySQL server:
mysqladmin -u root -p status
If you believe that the database has grown too much in size, you can start the MySQL console and run a SQL query to see the database size:
mysql –u root –p mysql> SELECT table_schema "DB", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "Size in MB" FROM information_schema.tables GROUP BY table_schema;
You can even delete records that are older than three days using the following query:
select measurements; delete from measurements where ttime < NOW() - INTERVAL 3 DAY;...