Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jeroen_wagner
Partner - Creator
Partner - Creator

Sense: 5Gig of logs in: ProgramData\Qlik\Sense\Log

Hello,

I have a customer who has %Gig of log files in ProgramData\Qlik\Sense\Log

I've adviced to delete it for now, as I don't see any problems doing so, but some questions remain.

  • Why does Sense create so many log files (keeping them all)
  • How can I limit this

thanx

Attached a log file from my own laptop... not showing much shcoking....

1 Solution

Accepted Solutions
jeroen_wagner
Partner - Creator
Partner - Creator
Author

Thanx Egbert,

The best solution though remains clearing out the old logs every once in a while...
Hopefully the QMC will come with an option to keep logs for a certain period that you can set...

View solution in original post

14 Replies
jeroen_wagner
Partner - Creator
Partner - Creator
Author

And here one of the customers log files...

As you can see, nothing more than te script execution.

But why keep all those log files

Tyler_Waterfall
Employee
Employee

Jeroen, this is an open question for Sense - something I've asked about in terms of at least setting the script log verbosity by app or globally. I am not aware of any way  presently to stop those time-stamped script logs from being created.

For now, I just manually delete those script log files in Qlik\Sense\Log\Script.

In a later version 2.x I believe those logs get archived to the Qlik\Sense\Repository\Archived Logs\[SERVERNAME]\Script folder.

awqvuserneo
Creator
Creator

Hi Tyler,

Instead of manually deleting the logs in C:\PRogramData\Qlik\Sense\Repository\Archived Logs\[SERVERNAME]\Script folder, I created a similar folder structure in a different drive (D:\ProgramData\Qlik\...).

To have the log files being tracked accordingly by Qlik Engine, I modified the "Connection String" value within QMC, to point to Drive D with the same folder structure.

BEFORE:

ArchivedLogs.PNG

AFTER

ArchivedLogs_New.PNG

I would expect the new logs will now being created in Drive D, however, that is not the case (New logs are still being generated within "Script" folder of drive C). Is there something that I miss? (I've already restarted all the Qlik Sense Services upon changing the value above).

I appreciate your feedback on this,

Cheers,

Anton

Tyler_Waterfall
Employee
Employee

Hello Anton,

The data connections "ServerLogFolder" and "ArchivedLogsFolder" in the QMC are only used by the Monitoring Apps - the Operations Monitor and License Monitor - and do not impact where any Qlik Sense services write their logs but where these apps look for log files.

I am not aware of any way in the QMC to change where these logs are written. As I understand it, that path is set during Sense Server installation.

awqvuserneo
Creator
Creator

Hi Tyler,

Thank you for your respond. I guess you're right, because this setting is only located at "Data Connection", of which you usually use to connect to your data sources. I'm hoping the Archived Logs is a bit different because it's automatically created when Qlik Sense is being installed, I guess I'm wrong.

Probably what I should do in the first place, is to have the Qlik Sense installed on Drive D, therefore all the Archived Logs will be installed on Drive D as well. OR, maybe I can re-install the Qlik Sense on Drive D now, even though I'm a bit hesitant doing so (Last time I did it with Qlik Sense 1.0, something stop working).

Anyway, thank you for your input, I appreciate it.

Best regards,

Anton

Anonymous
Not applicable

Hi Jeroen,

What I've done to prevent the C-drive filling up is:

  1. Create a new directory on your D-drive, e.g. D:\QlikSenseArchivedLogs
  2. Stop your Qlik Sense services
  3. Move C:\ProgramData\Qlik\Sense\Repository\Archived Logs\YOURHOSTNAME to D:\QlikSenseArchivedLogs\YOURHOSTNAME. This might be a good moment for a coffee break .
  4. Open a command prompt (elevated, which is default in Windows Server 2012 R2)
  5. Go to C:\ProgramData\Qlik\Sense\Repository\Archived Logs\:
    cd "C:\ProgramData\Qlik\Sense\Repository\Archived Logs\"
  6. Create a directory junction:
    mklink /J YOURHOSTNAME D:\QlikSenseArchivedLogs\YOURHOSTNAME
  7. Try to navigate in Explorer from C:\ProgramData\Qlik\Sense\Repository\Archived Logs\ to YOURHOSTNAME, just to be sure.
  8. Start your Qlik Sense services

#TryThisOnYourTestServerFirstOfCourse

Best regards,

Egbert

jeroen_wagner
Partner - Creator
Partner - Creator
Author

Thanx Egbert,

The best solution though remains clearing out the old logs every once in a while...
Hopefully the QMC will come with an option to keep logs for a certain period that you can set...

RSvebeck
Specialist
Specialist

I solved this problem with creating an app that runs once per day and clears out old log files :

---------------

Sub DeleteOldFiles (vPath,vNoOfDaysToKeep)
  LET command = 'forfiles /P $(vPath) /S /M *.* /D -$(vDaysToKeep) /C "cmd /c del @PATH"';
  execute cmd.exe /c "$(command)" ;
End Sub;

Call DeleteOldFiles ('"C:\ProgramData\Qlik\Sense\Repository\Archived Logs\.....\Script\"',30);

------------

This solution requires the EXECTUE command to be allowed on your Sense server. If you do not want that, then just create a scheduled task with windows scheduler that runs this as a batch-command for auto delete of logfiles 30 Days or older:

forfiles /P "C:\ProgramData\Qlik\Sense\Repository\Archived Logs\.....\Script\" /S /M *.* /D -30 /C "cmd /c del @PATH"

brg Robert

Svebeck Consulting AB
awqvuserneo
Creator
Creator

Robert,

Thank you for sharing the "workaround".

Cheers,

Anton