Reader small image

You're reading from  Raspberry Pi Android Projects

Product typeBook
Published inSep 2015
Reading LevelBeginner
Publisher
ISBN-139781785887024
Edition1st Edition
Languages
Right arrow
Author (1)
Gökhan Kurt
Gökhan Kurt
author image
Gökhan Kurt

Gkhan Kurt has been trying to keep up with the the latest developments in technology and IT in his 15-year-long development career. For the past 4 years, he has been working at IFS Labs, one of the top innovation departments of the Swedish software industry. Currently, he is involved in the Internet of Things and has been developing prototype IoT implementations using Raspberry Pi. He has a master's of science degree from Chalmers University of Technology and a bachelors degree from the Middle East Technical University. You can connect with him on Twitter and on LinkedIn.
Read more about Gökhan Kurt

Right arrow

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;

Or, as an alternative, you can check...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Android Projects
Published in: Sep 2015Publisher: ISBN-13: 9781785887024

Author (1)

author image
Gökhan Kurt

Gkhan Kurt has been trying to keep up with the the latest developments in technology and IT in his 15-year-long development career. For the past 4 years, he has been working at IFS Labs, one of the top innovation departments of the Swedish software industry. Currently, he is involved in the Internet of Things and has been developing prototype IoT implementations using Raspberry Pi. He has a master's of science degree from Chalmers University of Technology and a bachelors degree from the Middle East Technical University. You can connect with him on&nbsp;Twitter and on&nbsp;LinkedIn.
Read more about Gökhan Kurt