Article ID: 8665, created on Dec 16, 2011, last review on Aug 12, 2014

  • Applies to:
  • Plesk 10.x for Linux
  • Plesk 9.x for Linux/Unix
  • Plesk 10.x for Windows
  • Plesk 9.x for Windows

信息

Spider 是一个工具,可扫描重要的 Plesk 日志文件,并给您建议哪个 KB 文章会有用。

如何进行:
 - 每个知识库文章都有一个简短的描述,叫做签名。
 - Spider 工具扫描 Plesk 日志并比较日志记录与文章前面。
 - 如果 Spider 在日志文件中找到一个签名,就会显示包含此签名的文章 ID。

请 注意,因为技术不会完美,所以 Spider 可能会找到与您需要的无关的 KB 文章。因此,您应用所提供的方法/修正/解决方案之前应该检查是否与 KB 文章描述的人一样有相同的问题。

所以与 Spider 相关的问题都可查看 Parallels 论坛。请在论坛上分享您的经历与观点。

下载

您可在此处下载合适的 Spider 版本:

For Windows
For Linux

基本应用

在 Plesk 服务器上下载 Spider  存档,解包到任何目的位置,在 Linux 服务器上运行脚本   spider.sh 或在 Windows  服务器上运行脚本 spider.cmd。
从输出您可看出一个 KB 文章对诊断您的问题是否 有用。默认
Spider 只会查看前一天内发生的问题的日志。如果您的问题起源于更早的时间,我们建议您使用高级应用部分的源自选项。

Linux:

# mkdir Spider
# cd Spider/
# wget http://troubleshooting.plesk.parallels.com/resolveissue/troubleshooting/web/spider_linux.tgz
#
# tar -zxf spider_linux.tgz
#
# sh spider/spider.sh
Processing log "mail"...
Processing log "mailman"...
Processing log "sw"...
Processing log "httpd"...
Processing log "httpd-ssl"...
Processing log "named"...
KB Articles, that could be helpful:
112247: http://kb.sp.parallels.com/en/112247
111616: http://kb.sp.parallels.com/en/111616
112737: http://kb.sp.parallels.com/en/112737
Spider log has been saved to /root/Spider/spider/5-02-2012-18-22-10.log
#


Windows:
- 下载 Spider,URL 是:http://troubleshooting.plesk.parallels.com/resolveissue/troubleshooting/web/spider_windows.zip.
- 解包存档到任何目的位置。
- 更改目录为 Spider 目录并运行脚本 spider.cmd。
C:\Users\Administrator\Desktop\spider_windows\spider>spider.cmd
Spider started without parameters
Logs category "cp" loaded. Following logs will be processed: "plesk"
Logs category "mail" loaded. Following logs will be processed: "mailenable", "merak", "smartermail"
Processing log "plesk"...
Processing log "mailenable"...
Processing log "merak"...
Processing log "smartermail"...
KB Articles, that could be helpful:
112536: http://kb.sp.parallels.com/en/112536
Spider log has been saved to C:\Users\Administrator\Desktop\spider_windows\spider\10-11-2011-22-57-12.log
Press any key to continue . . .


核查输出并确认您的问题是否与建议的文章有关。

高级应用

使用帮助选项查看所有可用的脚本选项。
# sh spider/spider.sh --help

Usage: spider.sh [--help]  [--from=date_from]  [--to=date_to]  [--verbose]  [--disable-filtering]  [log_name_1  [log_name_2  [...]]]

  --from=date_from: looks for signatures in log records with date greater than date_from
    if not passed: filtering is performed for the last day (24 hours)
    date_from values are values acceptable by PHP strtotime function
    examples of strtotime valid dates:
       "10 May 2010",  "10 May 2010 14:00",  "yesterday",  "last week",  "last Monday",
       "-3 day" (3 days ago),  "-1 day 2 hours",  "-3 week",  "-2 month"

  --to=date_to: looks for signatures in log records with date less than date_to
    other issues are the same as for --from parameter, except for default value -
    if not passed: no filtering is performed

  --verbose: shows log lines and signatures' IDs in result

  --show-files: shows files (sources) where Spider will look for signatures
    Note that this list of files does not include certain files
    that were filtered in the early stages.

  log_name_1, log_name_2, ... - names of log files to look for signatures in
  valid log names for your OS: mail, mailman, sw, httpd, httpd-ssl, named,
  pmm-logs, pmm-msessions, pmm-rsessions valid log categories for your OS:
  cp, mail, web, pmm
  if no log names are presented search is performed for all known log files


例如:

使用选项源自查看指定日期的日志:
# sh spider/spider.sh --from="11 Nov 2011"
>spider.cmd --from="11 Nov 2011"

或者最近时段的日志:
# sh spider/spider.sh --from="-5 days"
>spider.cmd --from="-5 days"

使用选项源自查看指定时段的日志 :
# sh spider/spider.sh --from="7 July 2010" --to="9 July 2010"

如果您想查看已找到的几行应该使用 Verbose 模式:
>spider.cmd --verbose
# sh spider/spider.sh --verbose

使用选项 show-files 显示文件(源)Spider 将搜索签名:
>spider.cmd --show-files
# sh spider/spider.sh --show-files

指定日志名称或日志目录仅在这些日志中执行搜索:
>spider.cmd pmm-rsessions
# sh spider/spider.sh cp

您可合并这些选项:
# spider/spider.sh --from="25 Oct 2011" --to="-1 hour" --show-files --verbose mail
Spider started with the following parameters: '--from=25 Oct 2011' '--to=-1 hour' '--show-files' '--verbose' 'mail'
Logs category "mail" loaded. The following logs will be processed: "mailman", "maillog"
Spider will look for signatures in the following files (sources):
maillog
/usr/local/psa/var/log/maillog.processed
/usr/local/psa/var/log/maillog
Processing log "mailman"...
Processing log "maillog"...
KB Articles, that could be helpful:
Article #112247
Signature #3224: deferral: cname_lookup_failed_temporarily._(#4.4.3)
maillog:
Found in /usr/local/psa/var/log/maillog:
Nov 11 10:09:07 ce56x64 qmail: 1328440147.269085 delivery 644: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/
Signature #3225: #4.4.3
maillog:
Found in /usr/local/psa/var/log/maillog:
Nov 11 10:09:07 ce56x64 qmail: 1328440147.269085 delivery 644: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/
Article #111616
Signature #3588: cname_lookup_failed_temporarily
maillog:
Found in /usr/local/psa/var/log/maillog:
Nov 11 10:09:07 ce56x64 qmail: 1328440147.269085 delivery 644: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/
Spider log has been saved to /root/Spider/spider/11-11-2011-14-33-10.log

6ef0db7f1685482449634a455d77d3f4 a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 aac4a8fcd879de03758354e15495d69a 85a92ca67f2200d36506862eaa6ed6b8 dd0611b6086474193d9bf78e2b293040 c796c01d6951fa24ed54c7f1111667c6 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article