New server administration commands

4D continues to deliver features to help you create your own applications to monitor your servers. From programmatically retrieving information about sessions, processes, and the application server, to getting information about the web server.

Having already provided you commands to read about statuses, 4D v17 R4 now gives you the ability to change statuses. You can now create your own administration interfaces as dialogs on the server, client, or even as HTML pages for web access. It’s up to you. These commands allow you to perform the same actions as the standard 4D administration interface. For example, you can send a message to your users to notify them of scheduled maintenance, or block new connections to the application server while you perform an operation on it.

User commands 

You can send a message from the server to a remote user with the SEND MESSAGE TO REMOTE USER command. To retrieve a list of user sessions, you can use the Get process activity command.

For example, the server administrator wants to send a message to all connected users.

$message:="A maintenance operation is scheduled and the server will be restarted. Please log out before 10pm."

Or send a message only to John.


// Retrieve the list of sessions with the userName: "John"
$userCol:=Get process activity(Sessions only).sessions.query("userName = :1";"John")

$message:="Hello John."
For each ($element;$userCol)
   SEND MESSAGE TO REMOTE USER($message;$element.ID)
End for each

You can also end a user session with the DROP REMOTE USER command.


// Retrieve the list of sessions
$userCol:=Get process activity(Sessions only).sessions.query("userName = :1";"John")

For each ($element;$userCol)
   DROP REMOTE USER($element.ID)
End for each

Process commands

With the new ABORT PROCESS BY ID command, you can stop a specific process by using its unique process ID. To retrieve the unique process ID, you can use the Get process activity or Process properties commands.

For example, an operation was started on the database but it seems never-ending and is disrupting server performance. The administrator can retrieve the process number and thus abort the process.

// Retrieve the list of processes on the server and display it in a list box
$activity:=Get process activity(Processes only).processes
// The process selected by the administrator is aborted
ABORT PROCESS BY ID($activity.processes[selectedItem].ID)

Client connections

The server administrator can block new remote connections with the REJECT NEW REMOTE CONNECTION command. To tell if the connections have been accepted or refused, use the Get application info command.

// Reject the new connections
// Execute the maintenance operation
// Accept the new connections


To block SOAP requests, you can use the SOAP REJECT NEW REQUESTS command. To know if the requests have been accepted or refused, use the WEB Get server info command.

If (WEB Get server info.SOAPServerStarted)
End if

Refresh license

Your team has grown, so you’ve purchased new client connections for your server. Server administrators are no longer required to physically access the server machine to update a license. The Refresh license command is now available. It calls the same action as if the administrator had clicked the button in 4D Server’s license dialog. Just in case you missed this feature, it automatically installs purchased licenses for clients, 4D Write Pro, or 4D View Pro. Read more about this feature.

$res:=Refresh license
If ($res.success)
End if


Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.