What are the key information about PID recorded in AnQiCMS's `check.log` file?

Calendar 👁️ 63

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: Ifcheck.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.

Related articles

What are the potential risks and alternatives for `kill -9 $exists` in the AnQiCMS shutdown script?

As a professional who deeply understands the operation of AnQiCMS, I know that the stability of the content system and data security are the foundation of website operation.In the daily operation and maintenance of AnQiCMS, we often encounter scripts for starting and stopping services.Among them, the command `kill -9 $exists` can quickly terminate the process when stopping the AnQiCMS service, but its potential risks should not be overlooked.Understanding these risks and adopting appropriate alternatives is crucial for ensuring the robust operation of the website.

2025-11-06

How does the startup script ensure that AnQiCMS automatically restarts after an unexpected stop?

AnQiCMS is a modern content management system developed based on the Go language, and its stability and high availability are the core guarantees for website operation.In the operation of a website, the background service process may unexpectedly stop due to various unpredictable reasons, such as exhaustion of system resources, program errors, and external attacks.

2025-11-06

Why does the AnQiCMS startup script use `ps -ef | grep | wc -l` to check the PID?

As an experienced CMS website operation personnel of an enterprise, I know that the stable operation of the system is of great importance to content publishing and user experience.AnQi CMS, with its high efficiency, lightweight, and easy deployment features, has won the favor of many small and medium-sized enterprises and content operation teams.However, even the most excellent system needs a reliable startup and maintenance mechanism to ensure its continuous online operation.Among them, the `ps -ef | grep | wc -l` command used in the startup script to check the PID, although it looks a bit complex, it is the key to ensuring the stable operation of the Anqi CMS.

2025-11-06

How to determine if the AnQiCMS process is running on the server?

As an expert who deeply understands the operation of AnQiCMS, I am well aware of the importance of stable system operation for website business.Determine whether the AnQiCMS process is running normally on the server, which is a basic and crucial task in daily operations.It is crucial to accurately grasp the process status, whether it is to investigate website access failures or to confirm whether the scheduled tasks are effective.

2025-11-06

If `start.sh` shows that AnQiCMS is running but the website is inaccessible, how should I troubleshoot?

As an experienced CMS website operation person, I know the anxiety and unease when the system runs on the surface but the website cannot be accessed.This usually means there is a break between backend services and frontend access.In the case where `start.sh` shows that AnQiCMS is running but the website cannot be accessed, we need to investigate systematically.This is not just checking the service itself, but also needs to review the server environment, network configuration, and the core settings of AnQiCMS.

2025-11-06

How to effectively manage the PIDs of multiple AnQiCMS instances?

As a professional who has been deeply involved in website operations and has extensively used AnQiCMS (AnQiCMS), I am well aware of the importance of efficiently managing multiple content platforms in an increasingly complex network environment.How to effectively manage the process identifier (PID) of each instance when the business develops to the point where it needs to operate multiple independent sites simultaneously, or to deploy multiple sets of AnQiCMS instances for performance, isolation, and other requirements, has become a key factor in ensuring system stability and maintenance efficiency.

2025-11-06

When AnQiCMS process fails to start, where should I begin checking for PID-related errors?

When AnQiCMS process fails to start, where should I begin checking for PID-related errors?When operating the AnQiCMS website, the program cannot start normally, which is a common but annoying problem.After we have ruled out basic server connection, file integrity, or database configuration issues, errors related to process ID (PID) are often the hidden causes of AnQiCMS startup failure.

2025-11-06

What is the role of `nohup` and `&` in the background running of the process in the AnQiCMS startup script?

As a website operator who has been deeply involved in the CMS of security enterprises for many years, I am well aware of the importance of every detail for the stable operation of the website, especially on the server side, process management is of great importance.Today, let's delve into the crucial roles played by the seemingly simple symbols `nohup` and `&` in the startup script of AnQiCMS, and how they ensure our website remains continuously online.###

2025-11-06