Call CopyMemory (puActivityEntryExtended, StructureOffset, Len(puActivityEntryExtended))
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( hpvDest As Any, ByVal hpvSource As Any, ByVal cbCopy As Long)
Call CopyMemoryString(spUsername, UsernameOffset, strlenLP(UsernameOffset))
Declare Sub CopyMemoryString Lib "kernel32" Alias "RtlMoveMemory" ( ByVal hpvDest As String, ByVal hpvSource As Any, ByVal cbCopy As Long)
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( hpvDest As Any, ByVal hpvSource As Any, ByVal cbCopy As Long)
I have further worked on this issue and found that there is no issue with Domino 10.0.1 Server with out any Fix Pack.
Please let me know whether it is OK to currently use with Domino 10.0.1 with out any fix packs.
Hi Ulrich,
I have further tested on 10.0.1 FP2 as well and the server did not crash at all. I followed the below steps : Please correct me if I am wrong.
0. put the database (ua.nsf) on the server and sign it with the server ID; Open the appl using Notes Client.
1. Click Retrieve User Activity
2. Click For all databases on a server
3. Select Run on server
4. Click OK
Could you please check by installing Domino 10.0.1 FP2 server on a new test machine and see whether it crashes?
Looking forward to your reply.
Regards
Sudhakar
Hi Ulrich,
I have tested the same with the given template, however no issue. I am testing on Windows 2008 64 bit server and that does make any difference with 2016.
In your test case, is the Domino Server upgraded from 9.0.1 or fresh installation of 10.0.1?
Also please let me know during which point of code, the server is crashing? (Note : please keep print statements in between the code and check at what point, it is crashing).
Please provide me the latest NSD files for further investigation along with console.log during the time of the crash.
Regards
Sudhakar
Hi Ulrich,
Issue is reproducible with Win2016 10.0.1 & Win2016 10.0.1 FP1 & FP2.
I will further collaborate this issue with our product development team and update you the
findings as soon as possible.
Regards
puActivity = W32_OSLockObject(Me.rethUserInfo)
Me.rethUserInfo: 85
puActivity: -532537288
Me.rethUserInfo: 87
puActivity: -1553004888
StatusResult = W32_NSFDbGetUserActivityExtended(Me.hDb, &h0, Me.pDbActivityExtended, Me.rethUserInfo, Me.retUserCount)
/*
* copyright (c) 2019 Ulrich Krause www.eknori.de
*/
#pragma warning(disable:4005)
#include "main.h"
STATUS LNPUBLIC AddInMain (HMODULE hModule, int argc, char *argv[]) {
STATUS error = NOERROR;
HANDLE hStatusLine;
HANDLE hStatusLineDesc;
HMODULE hMod;
AddInQueryDefaults (&hMod, &hStatusLine);
AddInDeleteStatusLine (hStatusLine);
hStatusLineDesc = AddInCreateStatusLine(ADDIN_STATUS_LINE);
AddInSetDefaults (hMod, hStatusLineDesc);
AddInSetStatusText("Initialising");
CmdLine *cmdline = new CmdLine();
cmdline->addUsage(" user activity, V1.0.0.0, (c) 2019, Ulrich Krause\n");
cmdline->addUsage("Usage: lo ua [options] [flags]\n");
cmdline->addUsage( "Options:\n" );
cmdline->addUsage( "-d --db\t\tdatabase path" );
cmdline->addUsage( "" );
cmdline->addUsage( "Flags:\n" );
cmdline->addUsage( "-h --help\t\tPrints this help" );
cmdline->setOption( "db", 'd' );
cmdline->setFlag ( "help", 'h' );
cmdline->processCommandArgs( argc, argv );
if( ! cmdline->hasOptions()) {
cmdline->printUsage2();
delete cmdline;
return ERROR;
}
if( cmdline->getFlag( "help" )
|| cmdline->getFlag( 'h' ) ) {
cmdline->printUsage2();
return NOERROR;
}
string file_path;
if( cmdline->getValue( 'd' ) != NULL
|| cmdline->getValue( "db" ) != NULL ){
file_path = cmdline->getValue( 'd' );
}
DBACTIVITY DbSummaryActivity;
DBACTIVITY_ENTRY *pDbUserActivity, DbUserActivity;
DHANDLE hDbUserActivity;
WORD wUserCount;
char *szUserName;
char far szTimedate[1000];
LONG lRptPeriod;
WORD far wLen;
int i;
cNotesDatabase _NotesDatabase;
try{
_NotesDatabase.open(file_path.c_str());
AddInLogMessageText(MSG("DbTitle: %s\n"),
NOERROR, _NotesDatabase.title().c_str());
error = NSFDbGetUserActivity (_NotesDatabase.h, 0L, &DbSummaryActivity,
&hDbUserActivity, &wUserCount);
if (error)
{
delete cmdline;
_NotesDatabase.close();
LAPI_RETURN (ERR(error));
}
pDbUserActivity = OSLock (DBACTIVITY_ENTRY, hDbUserActivity);
for (i = 0; i < wUserCount; i++)
{
DbUserActivity = pDbUserActivity[i];
error = ConvertTIMEDATEToText (NULL, NULL, &(DbUserActivity.Time),
szTimedate, MAXALPHATIMEDATE, &wLen);
if (error)
{
OSUnlock (hDbUserActivity);
OSMemFree (hDbUserActivity);
delete cmdline;
_NotesDatabase.close();
LAPI_RETURN (ERR(error));
}
szTimedate[wLen] = '\0';
szUserName = NSFDbGetActivityUserNamePtr (pDbUserActivity, i);
if (DbUserActivity.Reads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate, szUserName, DbUserActivity.Reads);
if (DbUserActivity.Writes)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate, szUserName,
DbUserActivity.Writes);
}
OSUnlock (hDbUserActivity);
OSMemFree (hDbUserActivity);
AddInLogMessageText(" Uses Reads Writes\n", NOERROR);
AddInLogMessageText(
MSG("Last Day %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevDayUses,DbSummaryActivity.PrevDayReads,
DbSummaryActivity.PrevDayWrites);
AddInLogMessageText(
MSG("Last Week %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevWeekUses,DbSummaryActivity.PrevWeekReads,
DbSummaryActivity.PrevWeekWrites);
AddInLogMessageText(
MSG("Last Month %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevMonthUses,DbSummaryActivity.PrevMonthReads,
DbSummaryActivity.PrevMonthWrites);
lRptPeriod = TimeDateDifference (&(DbSummaryActivity.Last),
&(DbSummaryActivity.First));
if (lRptPeriod % (60*60*24))
lRptPeriod = lRptPeriod / (60*60*24) + 1;
else
lRptPeriod = lRptPeriod / (60*60*24);
AddInLogMessageText(
MSG("Last %lu days %5d %5d %5d\n"),
NOERROR, lRptPeriod,
DbSummaryActivity.Uses,DbSummaryActivity.Reads,
DbSummaryActivity.Writes);
} catch (cNotesErr& err) {
delete cmdline;
_NotesDatabase.close();
return ERROR;
} catch (...) {
delete cmdline;
_NotesDatabase.close();
AddInLogMessageText("Unexpected Error\n", NOERROR);
return ERROR;
}
delete cmdline;
_NotesDatabase.close();
return error;
}
/*
* copyright (c) 2019 Ulrich Krause www.eknori.de
*/
#pragma warning(disable:4005)
#include "main.h"
STATUS LNPUBLIC AddInMain (HMODULE hModule, int argc, char *argv[]) {
STATUS error = NOERROR;
HANDLE hStatusLine;
HANDLE hStatusLineDesc;
HMODULE hMod;
AddInQueryDefaults (&hMod, &hStatusLine);
AddInDeleteStatusLine (hStatusLine);
hStatusLineDesc = AddInCreateStatusLine(ADDIN_STATUS_LINE);
AddInSetDefaults (hMod, hStatusLineDesc);
AddInSetStatusText("Initialising");
CmdLine *cmdline = new CmdLine();
cmdline->addUsage(" user activity, V1.0.0.0, (c) 2019, Ulrich Krause\n");
cmdline->addUsage("Usage: lo ua [options] [flags]\n");
cmdline->addUsage( "Options:\n" );
cmdline->addUsage( "-d --db\t\tdatabase path" );
cmdline->addUsage( "" );
cmdline->addUsage( "Flags:\n" );
cmdline->addUsage( "-h --help\t\tPrints this help" );
cmdline->setOption( "db", 'd' );
cmdline->setFlag ( "help", 'h' );
cmdline->processCommandArgs( argc, argv );
if( ! cmdline->hasOptions()) {
cmdline->printUsage2();
delete cmdline;
return ERROR;
}
if( cmdline->getFlag( "help" )
|| cmdline->getFlag( 'h' ) ) {
cmdline->printUsage2();
return NOERROR;
}
string file_path;
if( cmdline->getValue( 'd' ) != NULL
|| cmdline->getValue( "db" ) != NULL ){
file_path = cmdline->getValue( 'd' );
}
DBACTIVITYEXTENDED DbSummaryActivityExt;
DBACTIVITY_ENTRY_EXTENDED *pDbUserActivityExt, DbUserActivityExt;
DHANDLE hDbUserActivityExt;
WORD wUserCount;
char *szUserName;
char far szTimedate[1000];
LONG lRptPeriod;
WORD far wLen;
int i;
cNotesDatabase db;
try{
db.open(file_path.c_str());
AddInLogMessageText(
MSG("DbTitle: %s\n"),
NOERROR, db.title().c_str());
error = NSFDbGetUserActivityExtended (
db.h, 0L,
&DbSummaryActivityExt,
&hDbUserActivityExt, &wUserCount);
if (error)
{
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
}
pDbUserActivityExt = OSLock (DBACTIVITY_ENTRY_EXTENDED, hDbUserActivityExt);
for (i = 0; i < wUserCount; i++)
{
DbUserActivityExt = pDbUserActivityExt[i];
error = ConvertTIMEDATEToText (NULL, NULL, &(DbUserActivityExt.Time),
szTimedate, MAXALPHATIMEDATE, &wLen);
if (error)
{
OSUnlock (hDbUserActivityExt);
OSMemFree (hDbUserActivityExt);
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
}
szTimedate[wLen] = '\0';
szUserName = NSFDbGetActivityUserNamePtr (pDbUserActivityExt, i);
if (DbUserActivityExt.AEDetails.DataAdds)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataAdds);
if (DbUserActivityExt.AEDetails.DataDeletes)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataDeletes);
if (DbUserActivityExt.AEDetails.DataReads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataReads);
if (DbUserActivityExt.AEDetails.DataUpdates)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataUpdates);
// NON-DATA
if (DbUserActivityExt.AEDetails.NonDataAdds)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataAdds);
if (DbUserActivityExt.AEDetails.NonDataDeletes)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataDeletes);
if (DbUserActivityExt.AEDetails.NonDataReads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataReads);
if (DbUserActivityExt.AEDetails.NonDataUpdates)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataUpdates);
}
OSUnlock (hDbUserActivityExt);
OSMemFree (hDbUserActivityExt);
AddInLogMessageText(" Uses Reads Writes Adds\n", NOERROR);
AddInLogMessageText(
MSG("Last Day %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevDayUses,
DbSummaryActivityExt.PrevDayReads,
DbSummaryActivityExt.PrevDayUpdates,
DbSummaryActivityExt.PrevDayAdds);
AddInLogMessageText(
MSG("Last Week %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevWeekUses,
DbSummaryActivityExt.PrevWeekReads,
DbSummaryActivityExt.PrevWeekUpdates,
DbSummaryActivityExt.PrevWeekAdds);
AddInLogMessageText(
MSG("Last Month %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevMonthUses,
DbSummaryActivityExt.PrevMonthReads,
DbSummaryActivityExt.PrevMonthUpdates,
DbSummaryActivityExt.PrevMonthAdds);
lRptPeriod = TimeDateDifference (&(DbSummaryActivityExt.Last),
&(DbSummaryActivityExt.First));
if (lRptPeriod % (60*60*24))
lRptPeriod = lRptPeriod / (60*60*24) + 1;
else
lRptPeriod = lRptPeriod / (60*60*24);
AddInLogMessageText(
MSG("Last %lu days %5d %5d %5d %5d\n"),
NOERROR,
lRptPeriod,
DbSummaryActivityExt.Uses,
DbSummaryActivityExt.Reads,
DbSummaryActivityExt.Writes,
DbSummaryActivityExt.Adds);
} catch (cNotesErr& err) {
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
} catch (...) {
delete cmdline;
db.close();
AddInLogMessageText(
"Unexpected Error\n", NOERROR);
LAPI_RETURN (ERR(error));
}
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
}
#ifndef _MAIN_H_
#define _MAIN_H_
#include <string>
#if defined (_MSC_VER) && !defined(ND64)
#pragma pack(push, 1)
#endif
#include <global.h>
#include <miscerr.h>
#include <addin.h>
#if defined (_MSC_VER) && !defined (ND64)
#pragma pack(pop)
#endif
#include "cNotesFramework.h"
#include "cmdline.h"
#if defined (W64)
#define HANDLE DHANDLE
#undef NOTEHANDLE
#define NOTEHANDLE DHANDLE
#else
#define DHANDLE HANDLE
#undef NOTEHANDLE
#define NOTEHANDLE HANDLE
#endif
#define ADDIN_STATUS_LINE "UA"
#define APP_NAME "UA: "
#undef MSG
#define MSG(fmt) APP_NAME fmt
#define ERROR -1
using namespace std;
STATUS error = NOERROR;
DBACTIVITY DbSummaryActivity;
DBACTIVITYEXTENDED DbSummaryActivityExt;
DBACTIVITY_ENTRY *pDbUserActivity, DbUserActivity;
DBACTIVITY_ENTRY_EXTENDED *pDbUserActivityExt, DbUserActivityExt;
DHANDLE hDbUserActivity;
DHANDLE hDbUserActivityExt;
WORD wUserCount;
char *szUserName;
char far szTimedate[1000];
LONG lRptPeriod;
WORD far wLen;
int i;
WORD minor = 0;
WORD major = 0;
// prototypes
STATUS get_user_activity(DHANDLE hDb);
STATUS get_user_activity_extended(DHANDLE hDb);
#endif
/*
* copyright (c) 2019 Ulrich Krause www.eknori.de
*/
#pragma warning(disable:4005)
#include "main.h"
STATUS LNPUBLIC AddInMain (HMODULE hModule, int argc, char *argv[]) {
HANDLE hStatusLine;
HANDLE hStatusLineDesc;
HMODULE hMod;
AddInQueryDefaults (&hMod, &hStatusLine);
AddInDeleteStatusLine (hStatusLine);
hStatusLineDesc = AddInCreateStatusLine(ADDIN_STATUS_LINE);
AddInSetDefaults (hMod, hStatusLineDesc);
AddInSetStatusText("Initialising");
CmdLine *cmdline = new CmdLine();
cmdline->addUsage(" user activity, V1.0.0.0, (c) 2019, Ulrich Krause\n");
cmdline->addUsage("Usage: lo ua [options] [flags]\n");
cmdline->addUsage( "Options:\n" );
cmdline->addUsage( "-d --db\t\tdatabase path" );
cmdline->addUsage( "" );
cmdline->addUsage( "Flags:\n" );
cmdline->addUsage( "-h --help\t\tPrints this help" );
cmdline->setOption( "db", 'd' );
cmdline->setFlag ( "help", 'h' );
cmdline->processCommandArgs( argc, argv );
if( ! cmdline->hasOptions()) {
cmdline->printUsage2();
delete cmdline;
return ERROR;
}
if( cmdline->getFlag( "help" )
|| cmdline->getFlag( 'h' ) ) {
cmdline->printUsage2();
return NOERROR;
}
string file_path;
if( cmdline->getValue( 'd' ) != NULL
|| cmdline->getValue( "db" ) != NULL ){
file_path = cmdline->getValue( 'd' );
}
cNotesDatabase db;
try{
db.open(file_path.c_str());
AddInLogMessageText(
MSG("DbTitle: %s\n"),
NOERROR, db.title().c_str());
// get ODS
NSFDbMajorMinorVersionGet(db.h, &major, &minor);
AddInLogMessageText(MSG("ODS: %d\n"), NOERROR, major);
if(major < 43) {
error = get_user_activity(db.h);
}
else {
error = get_user_activity_extended(db.h);
}
} catch (cNotesErr& err) {
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
} catch (...) {
delete cmdline;
db.close();
AddInLogMessageText(
"Unexpected Error\n", NOERROR);
LAPI_RETURN (ERR(error));
}
delete cmdline;
db.close();
LAPI_RETURN (ERR(error));
}
STATUS get_user_activity(DHANDLE hDb){
error = NSFDbGetUserActivity (hDb, 0L, &DbSummaryActivity,
&hDbUserActivity, &wUserCount);
if (error)
{
return error;
}
pDbUserActivity = OSLock (DBACTIVITY_ENTRY, hDbUserActivity);
for (i = 0; i < wUserCount; i++)
{
DbUserActivity = pDbUserActivity[i];
error = ConvertTIMEDATEToText (NULL, NULL, &(DbUserActivity.Time),
szTimedate, MAXALPHATIMEDATE, &wLen);
if (error)
{
OSUnlock (hDbUserActivity);
OSMemFree (hDbUserActivity);
return error;
}
szTimedate[wLen] = '\0';
szUserName = NSFDbGetActivityUserNamePtr (pDbUserActivity, i);
if (DbUserActivity.Reads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate, szUserName, DbUserActivity.Reads);
if (DbUserActivity.Writes)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate, szUserName,
DbUserActivity.Writes);
}
OSUnlock (hDbUserActivity);
OSMemFree (hDbUserActivity);
AddInLogMessageText(" Uses Reads Writes\n", NOERROR);
AddInLogMessageText(
MSG("Last Day %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevDayUses,DbSummaryActivity.PrevDayReads,
DbSummaryActivity.PrevDayWrites);
AddInLogMessageText(
MSG("Last Week %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevWeekUses,DbSummaryActivity.PrevWeekReads,
DbSummaryActivity.PrevWeekWrites);
AddInLogMessageText(
MSG("Last Month %5d %5d %5d\n"),
NOERROR,
DbSummaryActivity.PrevMonthUses,DbSummaryActivity.PrevMonthReads,
DbSummaryActivity.PrevMonthWrites);
lRptPeriod = TimeDateDifference (&(DbSummaryActivity.Last),
&(DbSummaryActivity.First));
if (lRptPeriod % (60*60*24))
lRptPeriod = lRptPeriod / (60*60*24) + 1;
else
lRptPeriod = lRptPeriod / (60*60*24);
AddInLogMessageText(
MSG("Last %lu days %5d %5d %5d\n"),
NOERROR, lRptPeriod,
DbSummaryActivity.Uses,DbSummaryActivity.Reads,
DbSummaryActivity.Writes);
return error;
}
STATUS get_user_activity_extended(DHANDLE hDb){
error = NSFDbGetUserActivityExtended (
hDb, 0L,
&DbSummaryActivityExt,
&hDbUserActivityExt, &wUserCount);
if (error)
{
return error;
}
pDbUserActivityExt = OSLock (DBACTIVITY_ENTRY_EXTENDED, hDbUserActivityExt);
for (i = 0; i < wUserCount; i++)
{
DbUserActivityExt = pDbUserActivityExt[i];
error = ConvertTIMEDATEToText (NULL, NULL, &(DbUserActivityExt.Time),
szTimedate, MAXALPHATIMEDATE, &wLen);
if (error)
{
OSUnlock (hDbUserActivityExt);
OSMemFree (hDbUserActivityExt);
return error;
}
szTimedate[wLen] = '\0';
szUserName = NSFDbGetActivityUserNamePtr (pDbUserActivityExt, i);
if (DbUserActivityExt.AEDetails.DataAdds)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataAdds);
if (DbUserActivityExt.AEDetails.DataDeletes)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataDeletes);
if (DbUserActivityExt.AEDetails.DataReads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataReads);
if (DbUserActivityExt.AEDetails.DataUpdates)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.DataUpdates);
// NON-DATA
if (DbUserActivityExt.AEDetails.NonDataAdds)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataAdds);
if (DbUserActivityExt.AEDetails.NonDataDeletes)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataDeletes);
if (DbUserActivityExt.AEDetails.NonDataReads)
AddInLogMessageText(
MSG("%s %s read %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataReads);
if (DbUserActivityExt.AEDetails.NonDataUpdates)
AddInLogMessageText(
MSG("%s %s wrote %d\n"),
NOERROR, szTimedate,
szUserName, DbUserActivityExt.AEDetails.NonDataUpdates);
}
OSUnlock (hDbUserActivityExt);
OSMemFree (hDbUserActivityExt);
AddInLogMessageText(" Uses Reads Writes Adds\n", NOERROR);
AddInLogMessageText(
MSG("Last Day %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevDayUses,
DbSummaryActivityExt.PrevDayReads,
DbSummaryActivityExt.PrevDayUpdates,
DbSummaryActivityExt.PrevDayAdds);
AddInLogMessageText(
MSG("Last Week %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevWeekUses,
DbSummaryActivityExt.PrevWeekReads,
DbSummaryActivityExt.PrevWeekUpdates,
DbSummaryActivityExt.PrevWeekAdds);
AddInLogMessageText(
MSG("Last Month %5d %5d %5d %5d\n"),
NOERROR,
DbSummaryActivityExt.PrevMonthUses,
DbSummaryActivityExt.PrevMonthReads,
DbSummaryActivityExt.PrevMonthUpdates,
DbSummaryActivityExt.PrevMonthAdds);
lRptPeriod = TimeDateDifference (&(DbSummaryActivityExt.Last),
&(DbSummaryActivityExt.First));
if (lRptPeriod % (60*60*24))
lRptPeriod = lRptPeriod / (60*60*24) + 1;
else
lRptPeriod = lRptPeriod / (60*60*24);
AddInLogMessageText(
MSG("Last %lu days %5d %5d %5d %5d\n"),
NOERROR,
lRptPeriod,
DbSummaryActivityExt.Uses,
DbSummaryActivityExt.Reads,
DbSummaryActivityExt.Writes,
DbSummaryActivityExt.Adds);
return error;
}