Now that you have an application published, there are a few more things you can do from the command line to manage the application. A more in-depth list of command line options will be discussed in Chapter 5, Command-line Reference.
To see a list of all the uploaded files:
$ af files insideaf4 app/ - logs/ -
You can navigate inside of the directories using a command like the following:
$ af files insideaf4 app/ insideaf4.rb 52B views/ - $ af files insideaf4 app/views/ index.erb 600B
To restart, stop, or start the application use the following command:
$ af restart insideaf4 Stopping Application 'insideaf4': OK Staging Application 'insideaf4': OK Starting Application 'insideaf4': OK $ af stop insideaf4 Stopping Application 'insideaf4': OK $ af start insideaf4 Staging Application 'insideaf4': OK Starting Application 'insideaf4': OK
If you want to view the logs for your application, you can see the last few lines of the stderr.log
and stdout.log
files using this command:
$ af logs insideaf4 ====> /logs/stderr.log <==== == Sinatra/1.3.2 has taken the stage on 50566 for production with backup from Th in 76.113.232.68, 127.0.0.1 - - [16/Oct/2013 02:05:00] "GET / HTTP/1.1" 200 497 0.0 075 ====> /logs/stdout.log <==== >> Thin web server (v1.3.1 codename Triple Espresso) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:50566, CTRL+C to stop
If you want to see details like uptime, CPU utilization, memory use, and disk space used, you can use the stats
command. This will display the statistics for each instance of the application you have running:
$ af stats insideaf4 +--------+-----------+--------------+------------+------------+ |Instance|CPU (Cores)|Memory (limit)|Disk (limit)|Uptime | +--------+-----------+--------------+------------+------------+ |0 |0.3% (2) |22.2M (128M) |0B (1G) |0d:0h:5m:20s| +--------+-----------+--------------+------------+------------+
Finally, if you want to delete the application you can use the following command. However, be cautious because there is no confirmation asking if you are sure, and this will permanently delete your application.
$af delete insideaf4 Deleting application [insideaf4]: OK
3.144.113.55