As an experienced AnQi CMS website operations personnel, I am well aware of the importance of system log files for maintaining the stable operation of the website. In the daily operations of AnQiCMS,check.logThe file plays an indispensable role, detailing key information about the application's core process (PID), which provides valuable clues for understanding the system status and troubleshooting.
check.logThe file is mainly composed of the AnQiCMS startup script(start.sh)and shutdown script(stop.shAutomatically generated and updated. These scripts are designed to be executed periodically through scheduled tasks to ensure the continuous availability and proper management of the AnQiCMS application. Therefore,check.logEach record carries a snapshot of the application process state at a specific time point.
Specifically, whenstart.shWhen the script is executed, it will first check if the AnQiCMS main program is running. This check is performed byps -ef | grep '\<anqicms\>' |grep -v grep |wc -lsuch commands to determine how manyanqicmsThe process instance is active in the system.check.logThe file will record the current date and time, as well as the result of this check - a number representing the number of processes. If this number is0This means that the AnQiCMS application is currently not running, and the script will attempt to start it, and the "not running" status and subsequent start attempts will be recorded accordinglycheck.logChinese. This periodic inspection and record, enablescheck.logBe the first line of defense in monitoring the health status of the AnQiCMS application, capable of detecting and automatically recovering processes that stop unexpectedly.
On the other hand, whenstop.shThe script is executed to gracefully close the AnQiCMS application, and it also usescheck.logfiles to record its operations. Unlikestart.shslightly different,stop.shThe script will accurately capture before attempting to stop the processanqicmsThe actual process ID (PID) of the application. This PID is a unique identifier assigned by the operating system to each running process.stop.shRecords the current date and time obtained as well as this specific PIDcheck.logIf the PID corresponding process is found and successfully terminated,check.logAn additional record indicating the termination action of the application with "is stop" will be appended.This recording method is especially critical for confirming whether the application has closed as expected and for distinguishing and managing different instances in a multi-process environment.
Bycheck.logThese PID-related records prefixed with date and time stamps enable website operators to clearly track the lifecycle events of the AnQiCMS main application. Whether it is an unexpected crash of the application caused bystart.shRecorded restart, whether manual or automated shutdown,check.logProvide an unalterable log chain.This information is crucial for analyzing the stability of the application, diagnosing the causes of startup or shutdown failures, and verifying the effectiveness of the system recovery mechanisms.check.logIn a concise and direct manner, it reveals the 'heartbeat' status of the core process of the AnQiCMS application, which is an indispensable reference for daily operation and fault troubleshooting.
FAQ
Q1:
check.logHow often is the file usually updated?A1:check.logThe update frequency of the file mainly depends on the startup script of AnQiCMS (start.sh) set to run every so often. According to the examples in the document,start.shThe script is typically configured as a scheduled task that runs every minute (viacrontab -esetting*/1 * * * *), which meanscheck.logFiles are updated at least once a minute in most cases, recording the process status check information of the application.Q2: If
check.logContinuously displaying the AnQiCMS process is restarting repeatedly (NOT runningAfter starting the record, how should I investigate?A2: Ifcheck.logThe phenomenon of frequent restarts of the AnQiCMS process usually indicates that the application has underlying issues, causing it to run unstablely. At this time, you should check the same directory under.running.logfile.running.logRecorded the detailed standard output and error logs of the AnQiCMS application, this information can help you identify whether it is a database connection problem, configuration error, insufficient memory, or other internal errors in the program that have caused the frequent crashes of the application.At the same time, it is also necessary to check the system resource usage of the server (CPU, memory).Q3:
check.logWhere is the file located? How can I find it?A3:check.logThe file is usually located in the root directory of the AnQiCMS application. Instart.shthe script, the file path is determined byBINPATHVariable definition. For example, if you install AnQiCMS on the Baota panel/www/wwwroot/anqicmsIn the directory, thencheck.logThe file will be located/www/wwwroot/anqicms/check.log. In the Docker deployment environment, it may be located inside the container/appThe directory. You can log in to the server via SSH and enter the AnQiCMS installation directory to find this file.