4D Blog

Home Product Create your own process and user monitoring

Create your own process and user monitoring

July 25, 2017

Product

You need to get the list of processes running on your 4D server, 4D remote or 4D standalone to create your own Administration Window? You want to know which user initiated each process to create a monitoring window of your application or log this information in a database to analyze later your server load? It is now easy to retrieve this information by programming with a new command: Get process activity.

Monitoring of processes and users

Get process activity is a new 4D command that allows you to retrieve the list of running processes and connected users.

Thanks to this command, you can monitor the server activity from processes and user point of view and easily create this type of process viewer, as provided in our database example:

Database example

Please also note that this feature is a first step to provide you all tools to create your own customized server administration window. Processes and users is a beginning, of course more possibilities will arrive with future R-releases.

Code Examples

The Get process activity command includes two selectors (Processes only and Sessions only) to give the option to the developer to retrieve either the information about the processes only or the information related to users (sessions) only. When no parameter is passed, it returns an object containing 2 collections: processes and sessions.

C_OBJECT($activity)
$activity:=Get process activity  // processes + sessions at once

C_COLLECTION($pCol;$sCol)
$pCol:=$activity.processes
$sCol:=$activity.sessions

Example of information returned in the processes collection:

{
	name:Application process,
	sessionID:4E3F3701DA6E4C449513D11FB68AA01C,
	number:4,
	ID:4,
	visible:true,
	type:-18,
	state:2,
	cpuUsage:0.022585061256626,
	cpuTime:8.1486859585647,
	preemptive:false
},
{
	name:DB4D Flush,
	state:0,
	cpuUsage:0,
	cpuTime:0,
	preemptive:true
},
(...)

Example of information returned in the sessions collection:

{
	type:remote,
	userName:Designer,
	machineName:VM10-MAINGUENE,
	systemUserName:fmainguene,
	IPAddress:localhost,
	creationDateTime:2017-04-26T07:59:27Z,
	state:active,
	ID:4E3F3701DA6E4C449513D11FB68AA01C
}
Discuss

Tags Administration, Programming, v16 R4, v17

Latest related posts

  • April 29, 2025

    Discover your AI-powered writing assistant in 4D Write Pro

  • April 28, 2025

    Unlock the Power of AI with 4D AIKit: Automate, Create, and Innovate

  • April 25, 2025

    Formulas in Label Wizard

Fabrice Mainguené
Fabrice Mainguené
• Product Owner •Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D-Analyzer 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R8 20 R9 Administration Authentication Build application CI/CD Class Client/Server Code editor Collections Compatibility settings Formula Listbox Logs Mail Microsoft 365 Network Objects ORDA PDF Pictures Preemptive Programming Qodly Studio REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy