Overview
1 Add New Send Commands to Gateway Template
2 Use Send Command (Broadcast Message)
3 Use Send Command (File Upload)

Add New Send Commands to Gateway Template
1 SSH to your Virtual Gateway (local Ubuntu Virtual Machine using MacOS Terminal or Windows Putty Client)
ssh username@[IP address]

2 su up
sudo su

3 Type the following to use the Linux ‘wall' command to send a Broadcast Message to all users who are currently logged into your Gateway
/usr/bin/wall "Is There Anybody Out There?"

4 Great, now let’s configure Pulse to do the same (and more) via Send Commands.

5 Login to Pulse Console if you are not already (link)
6 Username: [First Name Initial][Last Name]@pulse.local
Password: VMware1!

7A Select Device Templates
7B Set a Search Filter for ‘vGatewayTemplate-[FirstName]-[Number]
7C Edit the Template by Clicking the Pencil Icon

8A Click NEXT until you are on the ‘5 Commands’ screen

9A Click + Add and build out the following:
Type: Custom Command
Name: Broadcast Message
Executable: /usr/bin/wall
Click + Add and build out the Arguments
Arguments Name: Message
Arguments Value: Is Anyone At Home?
9B Run with root privilege: Checkbox Enabled
9C Click DONE (twice)

10A Click + Add and build out the following:
Command Type: File Upload
Name: Custom Upload
Click + Add and build out the Arguments
Arguments Name: Log Directory
Argument Values: /var/log
10B Click DONE (twice)

11A Click NEXT until you get to ‘7 Review
11B Click SAVE


Use Send Command (Broadcast Message)
1A Select Devices
1B Set a Search Filter for ‘vGateway-[FirstName]-[Number]
1C Click (select) your Gateway name

2 Select the ellipsis drop-down and click Commands

3 Click SEND COMMAND

4A Select Broadcast Message
4B (Optional) Modify Message in Arguments Field: Is Anyone At Home?
4C Click SEND COMMAND

5 Return to your SSH Session and observe the Broadcast Message
Press CTRL-C to exit
6 (Optional) If the Broadcast Message has not displayed yet, issue the following command to force your Gateway to phone home
/opt/vmware/iotc-agent/bin/DefaultClient get-commands

7 Press CTRL-C to exit Broadcast Message (if necessary)

Use Send Command (File Upload)
1 Let’s use the File Upload Send Command that you created to grab a log file of our choice off of the Virtual Gateway
2 Return to the Pulse Console and click SEND COMMAND

3A Select Custom Upload
3B Append /auth.log to your existing Argument
3C Click SEND COMMAND

4 Return to your SSH Session and force the Pulse Agent to Phone Home by issuing the following command:
/opt/vmware/iotc-agent/bin/DefaultClient get-commands

5 Return to the Pulse Console and click the Cloud download Icon (you may need to refresh Command History in order to see the icon)

6 Note that the File is downloaded via Chrome. Click the downloaded filename to view it.

7 Now you can inspect the auth.log file remotely without ever having had to actually login (SSH) to the Gateway

(You may need to associate the file with a text editor of your choice on your Laptop in order to launch/view)

<Thank you - this concludes our ’Send Commands' Lesson>