Service Now - Test/validate a mid server

Thursday Jan 28, 2021

If we have a mid server that is up and online, it’s helpful for us to have a quick and dirty way to validate that it’s up and running.

The easist way to do this is to run a simple command on the mid server and check the output

Run command on MID server

For a linux server, we can run the following with either the “background script” tool or eXplore. This will go to the server and run the w command, which gives output like this:

13:24  up 18:10, 2 users, load averages: 3.95 3.77 3.50
USER     TTY      FROM              LOGIN@  IDLE WHAT
mike     console  -                Thu19   18:09 -
mike     s000     -                Thu19      48 -bash         ��    /bin/bash  

NOTE: For Windows MID servers, we should pick a simple command that will always succeed and give us some output to look at. I don’t know what that is for a Windows server, so good luck.

Here’s how to run w on a Linux mid server:

var probe = SncProbe.get("Command");

Then, we can check the ecc_queue table to see what the command returned. To do this, go to the File navigator and type ecc_queue.list to display a list of mid server queue records.

Setup a filter so that Agent = mid.server.MID_SERVER_NAME:


Open the input entry and check out the XML payload and it should contain some xml with the raw output of the command in there.