Best Practice Guide – Set ready-to-use BASH commands

This guide goes over the best practice to set a few ready-to-use BASH commands. The best practice guidelines are taught how to have ready BASH commands that we will be able to send to a group of devices or to a specific device in seconds.

Set a list of commands using the Control center approach

It is recommended to pre-configure a set of ready-to-use BASH commands for your project. Those commands may help to achieve better control and remote support in many situations.

Guidelines

Under the Control Center category, we are able to add and save any BASH command and run it on our devices’ fleet. Here are a few examples of common BASH commands you can save in your Control center to have better control over your devices.

Restart your device software application:

service MyApp restart

another method is to kill the process and start it again:

killall -9 MyApp;service MyApp start

Check app service status:

service MyApp status

Reboot the device:

reboot

Checking the currently running processes:

ps -aux

Checking our application process:

ps -aux | grep MyApp

Check network interfaces:

ifconfig

List files in specific path:

ls -la /home/myapp/

Read specific file content:

cat /var/log/MyApp.log

Check device last reboot/uptime:

uptime

JFrog Connect is a modern Linux-first IoT platform designed to efficiently update, control and monitor edge and IoT devices at scale.