Follow

Get status info from multiple Raspberry Pis using remote.it

This script returns the following info into status columns A through E:

  • OS Name
  • Linux Version
  • Uptime
  • Number of installed remot3.it services
  • Amount of free memory

Download the attached file to your system, then upload it to remote.it:

If you are on Windows, editing this file in Notepad will cause issues because the line feeds are not compatible with your Pi Linux OS. We suggest you use a Linux compatible text editor for Windows such as Notepad++.

Make sure EOL encoding is set to UNIX (LF):

 

Watch the video at the link below to see how it works.

 
In the script, the task_notify.sh script is used to report various interesting bits of info about your systems. For example, the OS Name is reported in Status column A.
 
# Update status column A (StatusA) in remote.it portal
#-------------------------------------------------
# retrieve the os ID as reported by the command “cat /etc/os-release”
os=$(cat /etc/os-release | grep -w ID | awk -F "=" '{print $2 }')
# send to status column a in remot3.it portal
ret=$(${TOOL_DIR}/task_notify.sh a $1 $2 $os)
#-------------------------------------------------
 
 You MUST use the final line:

ret=$(${TOOL_DIR}/task_notify.sh 1 $1 $2 "Job complete")
 
This tells the Job Server that your script has completed its task.
 
It may take several minutes for the Job Status to fully update and clear, even after running a script which by itself completes rapidly.
 
 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.