# Turbostack CLI

The TurboStack Command Line Interface (later referred to as TSCLI) is available on all TurboStack nodes to provide you with an easy-to-use tool to manage the services on your environment, even ones you would normally need root access for. Below is a short description of the various features.

# TSCLI Commands

The TSCLI tool uses levels of arguments to categorize functions. Every command starts with 'tscli' followed by the service you're managing, followed by the parameters for the function you're using as documented below.

# NGINX Webserver

tscli nginx reload - Verifies the NGINX configuration and reloads it if valid. If it isn't valid you'll get an error with the issue reported.

tscli nginx restart - Verifies the NGINX configuration and restarts it if valid. If it isn't valid you'll get an error with the issue reported.

# Apache Webserver

tscli apache reload - Verifies the Apache configuration and reloads it if it valid. If it isn't valid you'll get an error with the issue reported.

# BlackFire php Profiler

tscli blackfire enable - Installs the Blackfire Profiler and restarts the PHP-FPM service(s).

tscli blackfire disable - Uninstalls the Blackfire Profiler and restarts the PHP-FPM service(s).

tscli blackfire configure - Asks the user for Blackfire tokens.

tscli blackfire reload - Restarts the Blackfire Profiler service, to apply changes to the configuration.

# Firewall

tscli firewall check - Returns info on whether or not the IP parameter is listed in the iptables. Please make sure to only use valid IP addresses.

tscli firewall flush - Flushes all automatic firewall IP blocks from the blocklist.

tscli firewall block - Adds a firewall rule to block a specific IP address as specified in the IP parameter.

tscli firewall unblock - Removes the provided IP address from the firewall's deny list.

tscli firewall whitelist - Add the provided IP to both allow and ignore lists.

tscli firewall unlist - Remove the provided IP from both allow and ignore lists.

# PHP

tscli php kill - Kills all the server's php-FPM processes.

# OPcache

tscli opcache clear - Resets php's OpCache.

# MySQL

tscli mysql restart - Restart MySQL. Use sparingly as this can add load to the server when restarting. Only works if MySQL is configured in turbostack.app

# PostgresQL

tscli postgresql restart - Restart PostgresQL. Use sparingly as this can add load to the server when restarting. Only works if PostgresQL is configured in turbostack.app

# MongoDB

tscli mongo restart - Restart MongoDB. Use sparingly as this can add load to the server when restarting. Only works if MongoDB is configured in turbostack.app

# Varnish Cache

tscli varnish clear - Clears everything from Varnish Cache's memory.

tscli varnish reload - Reloads the Varnish Cache configuration.

# Redis Cache

tscli redis clear - Clears everything from Redis Cache's memory.

# Docker

tscli docker restart - Restarts the docker service. Only use this when docker cli is no longer working or sufficient.

# DKIM

tscli dkim records - Show the required TXT records for DKIM.

tscli dkim validate - Verify if the correct TXT records are active for DKIM to function correctly.

# RabbitMQ

tscli rabbitmq queue list - List RabbitMQ queues.

# Tools

# Botload

This tool allows you to analyze incoming traffic and get insights in the amount of bots connecting per website tscli tools botload list - Get a list of log files, select which one you want to analyze. Takes the optional --time parameter followed by two timestamps in "%H:%M:%S" format (e.g. tscli tools botload list --time 07:15:00 08:15:00)

tscli tools botload shared - Perform the analysis on all available log files, showing the top 10 results. Takes the optional --top-results, -n parameter to show more/less results

tscli tools botload ip - Get the percentage of entries in all logs that come from the provided IP address. Takes the optional --cidr parameter to do the analysis for an IP range

tscli tools botload live - Pick a log file to get a live analysis of all current incoming traffic.