Five steps to monitoring your server log on IBM i

本文介绍了一种名为WebLogMonitor的工具,它可以帮助用户监控Web服务器的日志文件,设置规则以发送通知到指定渠道,如QSYSOPR系统消息队列、电子邮件等,确保重要信息不会被遗漏。

In today’s Web application environment, notices and error messages that appear in the Web servers logging files can be easily lost or missed. This exposes you to missing important information that you may need to know.

 

The Web Log Monitor gives users the capability to monitor the contents of log files for any Web-related server, such as Integrated Web Application Server, Integrated Web Services Server, WebSphere Application Server, WebSphere Portal Server and IBM HTTP Server.

 

Users can set rules for the Web Log Monitor. If a situation matches the rules parameters, the monitor sends a notification to:

·        The *QSYSOPR system message queue

·        One or more e-mail addresses

·        Both the *QSYSOPR system message queue and e-mail addresses

 

In this way, the Web Log Monitor can help ensure that important messages are seen.

Web Log Monitor is included as a part of the IBM Web Administration for i GUI interface. It inspects the log files as long as IBM Web Administration for i is started. Minimum OS supported is IBM i 6.1 PTF SF99115 level 12 or higher.

 

Activating Web Log Monitor

You can configure and activate Web Log Monitor using following five steps:

 

Step 1—Open the Web Log Monitor main page

Bring up the IBM Web Administration for i by accessing URL http://<your_system>:2001/HTTPAdmin. Click tab Manage, then click subtab Application Servers. You’ll see the link Web Log Monitor under the Problem Determination link in the left navigation panel. Click it and you’ll see Web Log Monitor introduction page, as shown in Figure 1.

 

Figure1. Web Log Monitor Intro Page

Step 2—Specify the log that you need to monitor

Click on the Enable Web Log Monitor link. Then browse to find and select the log file. Only log files that you’re authorized to use will be shown in the pop-up browser window. Once you’ve selected the log file, click Next. Now you’ll see the Configure Rule page.

 

Step 3—Define the filter rule for your log file

You can either use the Basic tab (Figure 2) to define basic filter rules like matching keywords, or the Advanced tab (Figure 3) to define some complex rules like regular expression.

 

Figure2. Web Log Monitor Rule Configuration Page – Basic Tab

In the Basic tab, three modes of keywords rule filter the content of specified log file. To specify more than one keyword, use comma or semicolon to separate them.

 

·        Match any keyword. For example: If the monitored file contains a line like JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait.” and the keyword specified here are “Dump, Failed, Error” then the line is considered a match.

·        Match all keywords. For example: If the monitored file contains a line like "JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait." and if the keywords specified here are "Dump,Event, Wait" then this line is not considered a match since the white space or blank character in front of " Wait" is also treated as part of the keyword. If the specified keywords are "Dump,Event,Wait" then this line is considered a match as all three specified keys are in the line.

·        Keyword A + any string + Keyword B. For example: If the monitored file contains a line like "JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait." and the keywords specified here are "Dump" and "detail" then this line is considered a match.

 

 

 

Figure3. Web Log Monitor Rule Configuration Page – Advanced Tab

The Advanced tab specifies complex patterns to be used in the rule:

 

·        Exclude the following keywords: specifies whether or not to ignore a line that contains any of the following keywords.

·        Configure regular expression: Gives users the capability to customize the rule by a regular expression.

If you have multiple log files to monitor, click on the Add button in the File and Rule tab as shown in Figure 4. Then repeat step 3.

  

Figure4. Add multiple log files

Step 4—Define where the notification text is sent when a match is found

The next step is to tell Web Log Monitor what to do when it finds a match in your rules. You can do this by clicking on the Notification tab (Figure 5). Your choices are:

 

 

Figure5. Notification tab

·        Send message to *QSYSOPR message queue. When selected, the notification text is sent to the *QSYSOPR system message queue when a match is found for a specified log file.

·        Send e-mail to a specific address. When selected, notification is sent to the specified e-mail address. More than one e-mail address can be specified; use commas to separate multiple addresses.

·        Sender’s e-mail address. Specifies the e-mail address used to send the notification.

·        SMTP server. Specifies the Simple Mail Transfer Protocol (SMTP) server used to send the mail notification.

·        Account. Specifies the account used to log on to the SMTP server.

·        Password. Specifies the password of the account used to log on to the SMTP server.

 

Step 5—Specify monitor interval and maximum number of notifications

The Miscellaneous tab (Figure 6) lets you specify interval in minutes and maximum number of notifications to be sent per hour to prevent notification flood.

   

Figure6. Miscellaneous tab

·        Monitor interval. Specifies the frequency of checking the log file. Set the interval to a small value when log files are updated frequently and a large value when the specified log files are updated infrequently.

·        Notification flood prevention. Specifies the maximum permitted number of notifications to be sent per hour to prevent notification flood. If the specified maximum number is exceeded no notification will be sent even when a match is found.

Note: Only users who are developer or higher authority can configure Web Log Monitor.

 

Sample Notifications

Now you’ve successfully enabled your Web Log Monitor and it will begin to send notifications according to your specifications. Figure 7 shows a sample of a *QSYSOPR message queue notification. The *QSYSOPR message queue notification contains related information such as target the selected Web server’s instance name, time when this report is generated, full path of the monitored log file, etc.

 

 

Figure7. *QSYSOPR message queue notification 

The following shows a sample notification via an e-mail message. This e-mail contains related information such as the target server host name, target selected Web server’s instance name, time when this report is generated, full path of the monitored log file, rule configured, content quoted from log file, etc. The key word specified in the example is “unknown” and all the lines containing the key word are marked.

This mail is a notification generated by Web Log Monitor. Please do not reply this mail.
Web Log Monitor on server [d60b85ae.cn.ibm.com] has detected the following problems:

Web Log Monitor on server [d60b85ae.cn.ibm.com] has detected the following problems:
******** Web Log Monitor Report ********
* Server instance = stopIAS
* Time = Mon Aug 17
16:58:58 CST 2009
======== Log File ========
* File    :           /www/stopIAS/lwi/logs/lwistderr.txt
* Rule    :          .*(unknown).*
* Message :          File /www/stopIAS/lwi/logs/lwistderr.txt has something to be aware of.
-------- Message 0 --------
      > 2009/08/14 13:53:10.834 CONFIG eclipse.buildId=@buildId@
      > java.fullversion=J2RE 1.6.0 IBM J9 2.4 OS400 ppc-32 jvmap3260sr3-20081105 (JIT enabled, AOT enabled)
      > J9VM - 20081105_025433_bHdSMr
      > JIT  - r9_20081031_1330
      > GC   - 20081027_AB
 X -- > BootLoader constants: OS=unknown
      > , ARCH=PowerPC
 X -- > , WS=unknown
      > , NL=en_US
      > Framework arguments:  -pluginCustomization rcp/plugin_customization.ini -application com.ibm.lwi.application.LWIApplication
      > Command-line arguments:  -pluginCustomization rcp/plugin_customization.ini -data /www/stopIAS/lwi/runtime/core/workspace/ -application com.ibm.lwi.application.LWIApplication -console -clean ::class.method=com.ibm.rcp.core.internal.logger.frameworkhook.writeSession() ::thread=Start Level Event Dispatcher ::loggername=com.ibm.rcp.core.internal.logger.frameworkhook

******** End of Web Log Monitor Report ******** 

内容概要:本文围绕六自由度机械臂的人工神经网络(ANN)设计展开,重点研究了正向与逆向运动学求解、正向动力学控制以及基于拉格朗日-欧拉法推导逆向动力学方程,并通过Matlab代码实现相关算法。文章结合理论推导与仿真实践,利用人工神经网络对复杂的非线性关系进行建模与逼近,提升机械臂运动控制的精度与效率。同时涵盖了路径规划中的RRT算法与B样条优化方法,形成从运动学到动力学再到轨迹优化的完整技术链条。; 适合人群:具备一定机器人学、自动控制理论基础,熟悉Matlab编程,从事智能控制、机器人控制、运动学六自由度机械臂ANN人工神经网络设计:正向逆向运动学求解、正向动力学控制、拉格朗日-欧拉法推导逆向动力学方程(Matlab代码实现)建模等相关方向的研究生、科研人员及工程技术人员。; 使用场景及目标:①掌握机械臂正/逆运动学的数学建模与ANN求解方法;②理解拉格朗日-欧拉法在动力学建模中的应用;③实现基于神经网络的动力学补偿与高精度轨迹跟踪控制;④结合RRT与B样条完成平滑路径规划与优化。; 阅读建议:建议读者结合Matlab代码动手实践,先从运动学建模入手,逐步深入动力学分析与神经网络训练,注重理论推导与仿真实验的结合,以充分理解机械臂控制系统的设计流程与优化策略。
<think>嗯,用户想了解Live ServerFive Server之间的差异,这两个都是VS Code的扩展,用于本地服务器开发。我需要先回顾一下这两个工具的基本功能和特点,然后对比它们的区别。 首先,Live Server是我比较熟悉的,它允许用户在VS Code中快速启动一个本地服务器,自动刷新浏览器,适合前端开发。根据引用[3],Live Server支持自动reload,修改文件后浏览器自动刷新,使用起来很方便。用户安装后,右键点击文件就能用Live Server打开,适合简单的项目。 接下来是Five Server,可能是在Live Server基础上发展的分支或增强版?需要查证。根据用户提供的引用中没有直接提到Five Server,可能需要依赖其他知识。通常,Five Server可能支持更多功能,比如多设备同步、更多的自定义选项,或者支持不同的协议如HTTPS。例如,Five Server可能允许多个设备同时访问并实时同步,这在移动端测试时很有用。 需要比较它们的功能差异。比如,Live Server是基础版,而Five Server可能增加了像远程调试、多浏览器同步、自定义端口和路由规则等功能。另外,Five Server可能支持WebSocket,实现更快的实时重载,而Live Server可能只是通过轮询检查文件变化,导致稍有延迟。 还要考虑安装和使用方式。两者都是通过VS Code扩展安装,但Five Server可能需要额外配置,比如设置外部IP访问或HTTPS证书。而Live Server则更简单,适合新手。另外,Five Server可能更适合复杂的项目需求,比如需要同时服务多个项目或更高级的代理设置。 总结下来,Live Server适合简单快速启动服务器,自动刷新;Five Server适合需要更多高级功能,如多设备同步、HTTPS、自定义配置等。用户可能需要根据项目复杂度和需求来选择。 最后,确保回答结构清晰,分点对比,并引用提供的资料中的相关信息,比如引用[3]提到的Live Server的功能。同时,生成相关问题帮助用户进一步探索。</think>### Live ServerFive Server的功能及用途对比 #### 1. **基础功能定位** - **Live Server**:核心功能是快速搭建本地开发服务器,支持**自动刷新浏览器**。适合基础前端开发场景,例如HTML/CSS/JavaScript单文件调试。通过右键菜单直接启动服务器,文件保存后浏览器自动更新[^3]。 - **Five Server**:在Live Server基础上扩展,增加了**多设备同步**、**自定义代理规则**和**HTTPS支持**等进阶功能。适合需要跨设备调试(如手机与电脑同步)或复杂项目配置的场景。 #### 2. **实时刷新机制** - **Live Server**:通过轮询(Polling)检测文件变化,存在轻微延迟(约100ms)[^3]。 - **Five Server**:使用**WebSocket协议**实现实时通信,文件保存后浏览器**立即刷新**,响应更快。 #### 3. **多设备与网络支持** - **Live Server**:默认仅限本地访问(`localhost`),需手动配置才能允许同一局域网设备访问。 - **Five Server**:内置**外部IP暴露**功能,自动生成可访问的URL,方便手机、平板等设备联调。 #### 4. **自定义配置灵活性** - **Live Server**:配置选项较少,主要设置端口和根目录。 - **Five Server**:支持**自定义代理规则**(如API请求转发)、**HTTPS证书加载**,适合需要模拟生产环境或解决跨域问题的场景。 #### 5. **典型应用场景** - **Live Server**:轻量级静态页面开发、教学演示。 - **Five Server**:多端协同调试、混合开发框架(如Electron)、需HTTPS的PWA应用测试。 --- ### 示例配置对比(VS Code) **Live Server启动示例**: ```json // settings.json { "liveServer.settings.port": 5500, "liveServer.settings.root": "/src" } ``` **Five Server代理配置示例**: ```json { "fiveServer.proxy": [{ "route": "/api", "target": "http://localhost:3000" }] } ``` ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值