How to quickly judge whether the AnQiCMS process is running normally through the `check.log` file?

Calendar 👁️ 69

As a senior person who has been deeply engaged in CMS content operation for many years, I am well aware of the importance of website stability to business.AnQi CMS provides a solid foundation for our content management with its efficiency, lightweight nature, and the high concurrency features brought by the Go language.However, any system may face unexpected situations, at this time, it is particularly important to quickly judge whether the core process is running normally.Today, I will explain in detail how to usecheck.logFile, this AnQiCMS built-in "heartbeat monitor" is used to quickly diagnose system status.

check.log: The "health record" of AnQiCMS process.

In the deployment of AnQiCMS, we usually make use ofstart.shandstop.shThis watchdog script is used to manage the lifecycle of the main program. These scripts do not just start or stop AnQiCMS; they also perform a routine check on the running status of the AnQiCMS core process and record the check results in the form of timestamps.check.logthe file.

check.logThe file is actually the snapshot of the current state of the AnQiCMS process when these management scripts are executed.Snapshot recordIt records the system's answer to the question of whether the AnQiCMS process is running every time the startup script or stop script is triggered. This makescheck.logIt became the first-hand information for us to judge whether AnQiCMS is running healthily.

How to viewcheck.logFile

check.logFiles are usually located in the root directory of your AnQiCMS installation, withanqicmsand the executable filestart.sh/stop.shThe script is at the same level.

To view the content of this file, you can log in to the server and access it through the command line tool. Here are two common ways to view it:

One method is to usetailUse the command to view in real timecheck.logThe latest content of the file. This is very useful for observing the dynamic changes of the AnQiCMS process. For example:

tail -f /www/wwwroot/anqicms/check.log

Here/www/wwwroot/anqicms/Please replace it with the actual installation path of AnQiCMS.After executing this command, you will see several lines at the end of the log file, and they will be displayed on the screen immediately when new log records are generated.

Another method is to usecatcommand to view the entire content of the file, usually combinedgreporlessfor filtering or pagination to make reading easier. For example, to view all records:

cat /www/wwwroot/anqicms/check.log

Or if you only want to view the most recent records, you can use:

tail -n 20 /www/wwwroot/anqicms/check.log

This command will displaycheck.logThe last 20 lines of the file.

Interpretcheck.logLog content, judge process status

check.logEach log line has a similar structure, usually containing a timestamp, process name (default asanqicms), and the most important "PID check" result.

When you viewcheck.logWhen dealing with files, pay attention to the following situations to judge the running status of the AnQiCMS process:

1. The process is running normally

Ifcheck.logRegularly appear logs in the following format, andPID check:The number following is1(When starting the scriptstart.shwhen checking the process count), or it is a specific process ID (when stopping the scriptstop.shWhen trying to get PID), it usually means that the AnQiCMS core process is active during script checking.

20231027 10:30:01 anqicms PID check: 1
20231027 10:31:01 anqicms PID check: 1
...

Or, if it is to stop script getting PID:

20231027 10:45:01 anqicms PID check: 12345

This indicates that the AnQiCMS process is present when the script is executed. In most cases, as long ascheck.logThe system continuously displays these records, and your website is accessing normally, which means AnQiCMS is running stably.

2. The process has stopped or tried to start.

If you manually stop AnQiCMS or the system exits the AnQiCMS process unexpectedly due to some reason, ifstart.shThe script (usually configured in a scheduled task) is triggered, you may see the following types of records incheck.logthe following types of records:

20231027 10:40:01 anqicms PID check: 0
20231027 10:40:01 anqicms NOT running

Immediately thereafter, if the startup is successful,start.shThe system will try to restart AnQiCMS. At this time, althoughcheck.logit will not directly display "Startup successful", but it will stop recordingPID check: 0And will recover the record `PID check:

Related articles

Which AnQiCMS process information are recorded in the `running.log` and `check.log` files, and how can they be used for troubleshooting?

As an experienced CMS website operation personnel, I am well aware of the importance of website stability for content publication and user experience.In daily work, log files are an indispensable tool for diagnosing system health and quickly locating problems.AnQi CMS provides the `running.log` and `check.log` log files, which record different process information and together provide valuable clues for troubleshooting system failures.

2025-11-06

What is the specific function and advantage of the `nohup` command in the AnQiCMS startup script?

In the daily operation of AnQiCMS, system stability and reliability are the core.As a high-performance content management system built with Go language, AnQiCMS needs to ensure that its core services can run continuously and without interruption.In the Linux server environment, the `nohup` command plays a crucial role in the startup script of AnQiCMS, ensuring this and providing many conveniences.

2025-11-06

How to configure independent `start.sh` and `stop.sh` scripts for each AnQiCMS multi-site instance?

As an expert deeply familiar with AnQiCMS (AnQiCMS) operation, I understand that you want to implement independent management for each AnQiCMS site instance. In multi-site operations, although AnQiCMS provides powerful built-in multi-site management features, sometimes in order to achieve finer-grained resource isolation, independent process management, or personalized optimization for specific sites, we may need to run each site on an independent AnQiCMS application instance.

2025-11-06

How to avoid PID conflicts between different instances when deploying AnQiCMS across multiple sites?

As an experienced security CMS operation personnel, I am well aware that the stability and efficiency of the system are crucial when managing multiple websites.The AnQi CMS provides strong support for us with its high concurrency characteristics of the Go language and multi-site management features.However, when deploying multiple security CMS instances on the same server, how to properly handle process ID (PID) conflicts to ensure that each instance runs independently and stably is a core issue that needs to be addressed in operations.

2025-11-06

What are the potential risks or practices of the AnQiCMS auto-start task configured with `crontab -e`?

As an experienced CMS website operation personnel in the security industry, I am well aware of the importance of the stable operation and continuous availability of content for user experience and business goals.Aqin CMS, with its high concurrency features of the Go language and concise and efficient architecture, provides a solid foundation for content management.However, even such a high-performance system needs a comprehensive operation and maintenance strategy to ensure uninterrupted service.Among them, using `crontab -e` to configure automatic startup tasks is a common method for many AnQiCMS operators to ensure that the application remains online.

2025-11-06

If AnQiCMS fails to start due to configuration errors, will the `start.sh` script try to start it indefinitely?

AnQiCMS (AnQiCMS) as an efficient and stable content management system, its design of the startup mechanism is aimed at ensuring the continuous operation of the service.Regarding your question about whether the `start.sh` script will keep trying to start indefinitely when it fails to start due to configuration errors, my answer is: it will not try indefinitely, but will keep trying to start repeatedly at set intervals until the service runs successfully or manual intervention occurs.

2025-11-06

How to manually check if the PID of AnQiCMS process exists on a Linux server?

As an experienced AnQi CMS operation personnel, I am well aware of the importance of ensuring the stable operation of the core service of the website - the AnQiCMS application itself.In a Linux server environment, it is often necessary to manually check the process ID (PID) to verify that the AnQiCMS process is working normally.This operation is not only a key link in daily maintenance, but also an effective means for preliminary investigation when we encounter website access exceptions.

2025-11-06

When the default port of AnQiCMS is occupied, can the `start.sh` script automatically switch ports or provide a prompt?

As a long-term operator of the AnQiCMS website, I am well aware of the importance of system stability and efficient deployment for website operations.In daily work, server port occupation is a common but often overlooked problem.Today, we will delve into how the core startup script `start.sh` of AnQiCMS responds when its default port is occupied, as well as how we, as operations personnel, should understand and handle such situations.

2025-11-06