groovEpic Restart From Shell Command Line

Can you restart a groovEpic from the shell command line?

If so, is it the equivalent of pressing the “Restart” button in groovManage or turning the power switch off and back on?

Yup.
Use the shutdown command:

 sudo shutdown -h
Usage:    shutdown [-akrhPHfFnc] [-t sec] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **

sudo shutdown -r now

Will do the job.

All three are the same, the groov Manage menu option, the power switch and the shutdown command all do the same thing… well, the power switch does not reboot, its just off.

2 Likes

Is there an equivalent command for node-red? Only restart node-red.

This not an option?

I was hoping to set up a node-red flow to trigger every x days.

We are seeing the memory usage get ~500 MB, CPU usage > 90% and start seeing Status = Busy in groovManage.

When we restart it knocks the memory down to < 100 MB and the CPU usage ~10-15%.

I used to see things like that on a very large personal Node-RED project till I dug into the debug tab and did some other logging, found and fixed the issues in my flows.
Dashboard trends are known for that sort of memory creep as is some of the db nodes.

Anyway, your idea is a doable (ugly?) workaround that will hide the issue beside the bump when it restarts…
The ‘problem’ is, you need to be sudo to do it… but Im sure you will work around that…
So, from the command line…

sudo su
pm2 restart node-red
1 Like