Wiki 4D

You will find on this site some technical documents.

View project on GitHub
en fr

Tool `4D_Info_Report`

info_report

About this component?

(version 4.9rZF)

The component 4D_Info_Report provides a large number of information:

  • about the operating system, the computer and the 4D Application

  • on the database: description of the structure, data file, size, settings, etc.

  • while the server is running, variation of memory, cache usage, connected users, processes, etc.


How to use this component?

Procedure n°1:

Create a folder Components next to the structure or application file (if it does not already exist), copy the unarchived component, and restart your 4D or 4D Server.

Then you can directly execute the shared method: aa4D_NP_Report_Manage_Display from 4D Remote.

A dialog from the component will let you start the Stored procedure to create reports every N minutes on the Server.

You can also implement in your Host database, this small code in your On Server startup method to execute any of the shared methods (they all begins with aa4D_):

  
 ARRAY TEXT($at_Components;0)
 COMPONENT LIST($at_Components)
 If(Find in array($at_Components;`4D_Info_Report@`)>0)
  // to start the stored procedure creating report every 5 minutes
    EXECUTE METHOD(`aa4D_NP_Schedule_Reports_Server`;*;5;0)
 End if
   

Procedure n°2:

You can just create one report using the shared method aa4D_NP_Util_CreateReport_Serv.

The created reports (text files) are stored in a created folder Folder_Reports next to the data file.

In both cases, you should create a new shared method aa4D_Host_GetDBParam with the code below:

  
  // Method name: aa4D_Host_GetDBParam (must be shared with components)
 C_LONGINT($1) // selector
 C_REAL($0)
 $0:=-1 // Error, no parameter
 If(Count parameters>0)
    $0:=Get database parameter($1)
 End if
   


How to analyze reports?

You can analyze these reports:

  • from a remote 4D by executing the aa4D_NP_Report_Manage_Display method,

  • from a single-user 4D by opening the component and clicking on the File / Local reports compare menu.


Download


Archives