Product:
Planning Analytics 2.0.9.19
Microsoft Windows 2019 server
Problem:
How log memory usage in Tm1?
Solution:
Add below to your tm1s-log.properties file in your TM1 applications config folder.
# memory logging configuration log4j.logger.TM1.Server.Memory=INFO, S_Memory log4j.appender.S_Memory=org.apache.log4j.SharedMemoryAppender log4j.appender.S_Memory.MemorySize=1 MB log4j.appender.S_Memory.MaxFileSize=10 MB log4j.appender.S_Memory.MaxBackupIndex=10 #log4j.appender.S_Memory.Format=TM1Event log4j.appender.S_Memory.TimeZone=Local log4j.appender.S_Memory.File=tm1memory.log
This can give a message like this, when memory is finish on the server.
2024-08-22 13:04:13 local Shared memory reader PID 17780 started, for shmem “tm1s.exe-19096_3”
18512 [] ERROR 2024-08-22 13:04:12.676 TM1.Server.Memory Unable to allocate block from OS: Total Memory Allocated = 26772 Mb, Total Garbage Memory = 3 Mb, Allocating = 8388608 B
18512 [] WARN 2024-08-22 13:04:12.676 TM1.Server.Memory CreateNewGarbageBlocks() outOfMemory Exception <<< MEMORY_FATAL_LEVEL >>> – apifunc# “0”
You will get a separate log file for the memory records in the file tm1memory.log.
In new versions of TM1 you have a log file called TM1event.log, that you also can control from tm1s.cfg by adding this lines:
EnableTIDebugging=T
EventLogging=T
EventThreshold.ThreadRunningTime=3000
EventThreshold.ThreadWaitingTime=50
Set the EventLogging=F to not get the file created.
More Information:
https://www.ykud.com/blog/cognos/tm1-cognos/tm1s-log-properties/
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=monitoring-planning-analytics-tm1-logs
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=logs-ops-logger
https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=cubes-statsbycube
https://www.performanceg2.com/tm1-control-cubes/
Below a suggested setup in tm1s-log.properties file.
# main logging file log4j.logger.TM1=INFO, S1 # S1 is set to be a SharedMemoryAppender log4j.appender.S1=org.apache.log4j.SharedMemoryAppender # Specify the size of the shared memory segment log4j.appender.S1.MemorySize=5 MB # Specify the max filesize log4j.appender.S1.MaxFileSize=20 MB # Specify the max backup index log4j.appender.S1.MaxBackupIndex=40 # Specify GMT or Local timezone log4j.appender.S1.TimeZone=Local # event logging configuration # Meeds EventLogging=T in the tm1s.cfg # https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_inst.2.0.0.doc/c_eventlogging.html #log4j.logger.Event=INFO, S_Event #log4j.appender.S_Event=org.apache.log4j.SharedMemoryAppender #log4j.appender.S_Event.MemorySize=1 MB #log4j.appender.S_Event.MaxFileSize=10 MB #log4j.appender.S_Event.MaxBackupIndex=10 #log4j.appender.S_Event.Format=TM1Event #log4j.appender.S_Event.TimeZone=Local #log4j.appender.S_Event.File=tm1event.log # tm1top logging configuration only in version 2.0.7 and later # Set up TopLogging=T in the tm1s.cfg # https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_op.2.0.0.doc/c_pa_top_logger.html #log4j.logger.Top=INFO, S_Top #log4j.appender.S_Top=org.apache.log4j.SharedMemoryAppender #log4j.appender.S_Top.MemorySize=5 MB #log4j.appender.S_Top.MaxFileSize=10 MB #log4j.appender.S_Top.MaxBackupIndex=20 #log4j.appender.S_Top.TimeZone=Local #log4j.appender.S_Top.Format=TM1Top #log4j.appender.S_Top.File=tm1top.log # Logins file -- records every time a user logins, can be used for license evaluation or just checking user activity log4j.logger.TM1.Login=DEBUG, S_Login log4j.appender.S_Login=org.apache.log4j.SharedMemoryAppender log4j.appender.S_Login.MemorySize=5 MB log4j.appender.S_Login.MaxFileSize=10 MB log4j.appender.S_Login.MaxBackupIndex=20 log4j.appender.S_Login.TimeZone=Local log4j.additivity.TM1.Login=false log4j.appender.S_Login.File=tm1login.log # memory logging configuration log4j.logger.TM1.Server.Memory=INFO, S_Memory log4j.appender.S_Memory=org.apache.log4j.SharedMemoryAppender log4j.appender.S_Memory.MemorySize=5 MB log4j.appender.S_Memory.MaxFileSize=20 MB log4j.appender.S_Memory.MaxBackupIndex=10 log4j.appender.S_Memory.TimeZone=Local log4j.appender.S_Memory.File=tm1memory.log # it's good to have Locks details -- provides the names of the locked objects # putting to a separate file to have a cleaner main log as PaW rollbacks requests a lot log4j.logger.TM1.Lock.Exception=DEBUG, S_Lock log4j.additivity.TM1.Lock.Exception=false log4j.appender.S_Lock=org.apache.log4j.SharedMemoryAppender log4j.appender.S_Lock.MemorySize=5 MB log4j.appender.S_Lock.MaxFileSize=20 MB log4j.appender.S_Lock.MaxBackupIndex=20 log4j.appender.S_Lock.TimeZone=Loca log4j.appender.S_Lock.File=tm1lock.log