×

Useful Commands

The following commands are useful when working with the PLC Shift runtime. Almost all systems will use the Systemd init system. Opto 22 PR1 and PR2 devices use SysV init. These commands require root access (super user credentials) and cannot be used with containerized solutions like on the Sensia HCC2.
 

Stop the Runtime    

systemd: sudo systemctl stop plc-shift-app.service
sysV: sudo /etc/init.d/plc-shift-app stop
 

Start the Runtime

systemd: sudo systemctl start plc-shift-app.service
sysV:  sudo /etc/init.d/plc-shift-app start
 

Restart the runtime

systemd: sudo systemctl restart plc-shift-app.service
sysV: sudo /etc/init.d/plc-shift-app restart
Stopping the runtime only stops it until the computer is rebooted. When the computer starts, the application will also be started.
 

View Live Log Files

This can only be done on systems that use Systemd. Additional details are in the Log Files section.
 
sudo journalctl -f -u plc-shift-app.service
 

Check the Installed Version

The PLC Shift runtime installation has a text file in it that has the details of the currently installed executable, including the version and compile time (UTC). To view this file, type:
 
sudo cat /usr/share/plc-shift/version.txt