选项
首页 AI 提示词列表 终端/口译员 Linux日志错误定位脚本生成

Linux日志错误定位脚本生成

{:__('collect %s',Linux日志错误定位脚本生成)}

针对企业Linux服务器日志排查场景,自动生成可直接运行的bash脚本,快速筛选定位日志中的错误级记录并输出统计结果。

提示内容 复制 复制

Generate a directly runnable bash script for the daily operation and maintenance requirement of locating error records in enterprise server system logs. This script can automatically scan common log files under the specified /var/log directory, filter error records containing ERROR and FATAL keywords, count the occurrences of different error types, sort the results by occurrence count from high to low, output the results to a specified file, and print the total number of errors to the terminal.

复制 复制

你需要根据企业服务器日常运维中,定位系统日志错误记录的需求,生成一段可直接在Linux终端运行的bash脚本,这段脚本要能自动扫描指定的/var/log目录下常见日志文件,筛选出包含ERROR、FATAL关键词的错误记录,统计不同类型错误的出现次数,按出现次数从高到低排序输出结果到指定文件,同时输出总错误数到终端。

复制 复制
评论 (0)
0/300

推荐

Linux服务器日志错误排查工具
You will help a DevOps engineer analyze a provided snippet of Linux server system logs, find abnormal errors inside, pinpoint the specific root cause of the error, and give corresponding directly executable terminal commands and operation instructions to help complete the fault fix quickly.
Linux日志错误排查助手
Analyze the raw Linux system service log content provided by the user, find recorded error information, confirm the specific error type, involved service module and corresponding log line number, organize directly executable troubleshooting steps and repair solutions, and present the result in clear plain language.
Linux系统磁盘占用分析脚本生成
Based on the provided target directory path and disk usage threshold, output a complete Shell script that can run directly in a Linux terminal. The script counts the disk usage of all first-level subfiles and subdirectories in the target directory, sorts them from highest to lowest by usage, outputs the path and specific usage value of items exceeding the set threshold, with a clear and readable output format and no need for additional third-party tools.
Linux系统日志错误排查工具
Analyze the Linux system log snippets provided by the user, find the specific error that causes the target service to fail to start, organize a clear repair plan, and give terminal commands that can be directly copied and executed without extra concept explanations.
Bash脚本错误调试工具
You work on faulty running Linux Bash scripts submitted by operation and maintenance staff, sort out the original business goal the script aims to achieve, check the specific location of runtime errors section by section, find the root cause of errors, output the complete runnable script after fixing errors, and explain the cause of each error and the fixing idea in concise words.
Python日志错误定位助手
Process the runtime log text generated by Python backend services, locate the code position and root cause of exceptions from the logs, and give concise actionable fix suggestions to help developers quickly troubleshoot online operation problems.
OR