如何收集 HP ProLiant 系列服务器iLo日志,iLO出厂默认配置。不可以重启机器

如何收集 HP ProLiant 系列服务器iLo日志,iLO出厂默认配置。不可以重启机器,第1张

接路由上 可以看到ILO的ip

否则需要自己开DHCP服务

访问可以直接用IP 或者是ILO的名字

比如一般是 ILO //部分是你的序列号

用户名一般是administrator

密码是附带的吊牌上的

忘记密码需要拨机箱里面的那一组小开关。具体需要看说明书。能重置ILO的密码

ILO4实测没问题。

利用Windows 2003服务器的远程维护功能,并通过IE浏览界面,就能对服务器的日志文件进行远程查看了,不过默认状态下,Windows 2003服务器的远程维护功能并没有开通,需要手工启动。

查看服务器日志文件的作用

  网站服务器日志记录了web服务器接收处理请求以及运行时错误等各种原始信息。通 过对日志进行统计、分析、综合,就能有效地掌握服务器的运行状况,发现和排除错误原 因、了解客户访问分布等,更好的加强系统的维护和管理。

  对于自己有服务器的朋友或是有条件可以看到服务器日志文件的朋友来说,无疑是了 解搜索引擎工作原理和搜索引擎对网页抓取频率的最佳途径。

  通过这个文件,您可以了解什么搜索引擎、什么时间、抓取了哪些页面,以及可以知 道是主搜索蜘蛛还是从搜索蜘蛛抓取了您的网站等的信息。

  访问原理

  1、客户端(浏览器)和Web服务器建立TCP连接,连接建立以后,向Web服务器发出 访问请求(如:Get),根据HTTP协议该请求中包含了客户端的IP地址、浏览器类型、 请求的URL等一系列信息。

  2、Web服务器收到请求后,将客户端要求的页面内容返回到客户端。如果出现错误,那么返回错误代码。

  3、服务器端将访问信息和错误信息纪录到日志文件里。

  下面我们就对本公司自己服务器其中的一个日志文件进行分析。由于文件比较长,所以我们只拿出典型的几种情况来说明。

  #Software: Microsoft Internet Information Services 60

  #Version: 10

  #Date: 2006-05-12 03:56:30

  #Fields:

date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port

cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status

  2006-05-12

03:56:30 三圆三圆三圆 2182592169 GET / - 80 - 2201811898

Baiduspider+(+http://wwwbaiducom/search/spiderhtm) 403 14 5

  / 说明 /

  上面定义了在2006年5月12日的3点56分30秒的时候,IP为2201811898的百度蜘蛛通过80端口(HTTP)访问了IP为2182592169的服务器的根目录,但被拒绝。

  #Software: Microsoft Internet Information Services 60

  #Version: 10

  #Date: 2006-05-12 10:18:39

  #Fields:

date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port

cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status

  2006-05-12

10:33:36 三圆三圆三圆 2182592169 GET //indexhtm - 80 - 102576

Mozilla/40+(compatible;+MSIE+60;+Windows+NT+51;+SV1) 200 0 0

  2006-05-12

10:33:36 三圆三圆三圆 2182592169 GET ///gif - 80 - 102576

Mozilla/40+(compatible;+MSIE+60;+Windows+NT+51;+SV1) 200 0 0

  / 说明 /

  上面定义了在2006年5月12日的10点33分36秒的时候,IP为102576的用户正常访问了网站三圆三圆三圆中目录下的indexhtm页和/下的。gif。

  #Software: Microsoft Internet Information Services 60

  #Version: 10

  #Date: 2006-05-12 13:17:46

  #Fields:

date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port

cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status

  2006-05-12

13:17:46 三圆三圆三圆 2182592169 GET /robotstxt - 80 - 662496672

Mozilla/50+(compatible;+Googlebot/21;++http://wwwgooglecom/bothtml)

404 0 2

  2006-05-12 13:17:46 三圆三圆三圆 2182592169 GET / - 80 -

662496672

Mozilla/50+(compatible;+Googlebot/21;++http://wwwgooglecom/bothtml)

403 14 5

  / 说明 /

  上面定义了在2006年5月12日的13点17分46秒的时候,IP为662496672的Google蜘蛛访问了robotstxt文件,但没有找到此文件,有访问了此网站的根目 录,但被拒绝。

  现在也有很多日志分析工具,如果您的服务器流量很大的话,作者推荐使用分析工具来分析服务器日志。

你好,查看服务器日志以Linux举例的话可通过以下方式查看:

1进入日志文件所在的文件目录,比如:cd /opt/tomcat7/logs

2通过命令打开日志,分析需求场景打开需要的日志。比如:tail -f catalinaout

3常用命令一:tail比如:tail -f testlog (循环查看文件内容)

4按照行号查询:cat(过滤出关键字附近的日志)cat -n testlog |grep "订单号" 然后使用 head -n 20 查看查询结果里的向前20条记录。

5按照时间日期查询,(查询出一段时间内的记录)sed -n '/2014-12-17 16:17:20/,/2014-12-17 16:17:36/p' testlog

如何收集Domino服务器日志

在论坛已久,发现用户提交问题,太过于简单,很多就是说明现象,不太便于分析和理解。

来论坛发帖大部分都是Domino管理员和开发者,希望更加细致和专业,同时提高自己分析能力。

以下来自ibm的邮件或者帮助:

1 当Windows平台上服务器挂起(非HTTP)时,收集数据的流程:

1 在服务器的控制台上输入

set config CONSOLE_LOG_ENABLED=1

set config DEBUG_THREADID=1

set config DEBUG_CAPTURE_TIMEOUT=1

set config DEBUG_SHOW_TIMEOUT=1

2 当服务器挂起,在Domino控制台上执行如下命令:

sh server

sh task debug

sh task time

sh user

sh stat

3 用Dos命令手工收集nsd日志,当nsd完成收集后,请在五分钟内执行'dump'命令对所有Domino服务器线程做另一个快照。

下面是如何收集nsd的提示:

I 打开一个dos命令窗口

II 进入domino data目录,例如"cd c:\lotus\domino\"

III 在Domino程序目录下执行nsd,例如"c:\lotus\domino\nsd"

当nsd运行结束,命令行中的提示符会更改为:

nsd>

IV 五分钟后执行dump命令,用来dump线程堆栈。在问题期内至少收集两次dump

V 退出Domino服务器,如果可以,可在Domino控制台输入'q'或者'quit'命令来退出Domino,如果服务器不能正常退出,就需要在"nsd>"提示符下用'kill'这个命令来杀掉所有Domino进程。

4 需要收集的数据有:

- nsd log, 文件名: nsd_<plaftform>_<ServerName>_date@timelog, date/time 应是nsd运行的时刻

- console log, 文件名: console_name_yyyy_mm_dd@hh_mm_sslog,the date/time 应是服务器最后一次启动的时刻

- SEMDEBUG txt, 文件名: SEMDEBUG_name_yyyy_mm_dd@hh_mm_ssTXT, the date/time 应是服务器最后一次启动的时刻

上面的文件位于Domino Data目录,IBM_TECHNICAL_SUPPORT 子目录

2 Lotus Traveller服务器日志收集

收集服务器日志

本主题包含有关收集日志文件和信息以协助 Lotus Notes® Traveler 支持人员解决服务器安装、启动和运行时问题的指示信息。

提高记录级别

执行以下操作,为 Lotus Notes Traveler 服务器任务提高记录级别、增加日志文件大小和最大活动日志文件数。请注意,可能不必增加日志文件大小或最大活动文件数。

在 IBM® Lotus® Domino® Administrator 中,打开 Lotus Notes Traveler 服务器的服务器配置文档。

在文档中单击 Lotus Traveler 选项卡,然后单击编辑服务器。

将记录级别更改为最详细。

将活动日志的最大文件大小更改为所需的最大文件大小。

将最大活动日志文件数更改为所需的最大活动日志数。

保存并关闭服务器文档。

等几分钟让更改生效,然后重现问题。

注: 还可以为每个用户逐个设置记录以节约输入/输出空间和带宽。有关记录命令的详细信息,请参阅控制台命令。

收集日志

以下文件和目录包含记录或配置信息,这些信息在对服务器启动/运行时问题进行故障诊断时很有用。以 Zip 或 tar 格式压缩下面指定的所有文件和目录。当指示目录时,包括整个目录。

\Lotus\Domino\notesini

\Lotus\Domino\data\servletsproperties

\Lotus\Domino\data\traveler\cfg\

\Lotus\Domino\data\traveler\logs\

如果问题涉及在创建 \traveler 目录前安装失败,请提供以下临时日志(如果存在):%TEMP%\Idatetime\Windows\NTSInstalllog(例如 C:\Documents and Settings\Administrator\Local Settings\Temp\I1206535899\Windows\NTSInstalllog)。

如果问题涉及 Domino 服务器崩溃,另请提供以下日志:

用于捕获崩溃的 NSD 日志,位于 \Lotus\Domino\data\IBM_TECHNICAL_SUPPORT\NSDdatetimelog 中

Javacore 文件,根据具体安装情况,其位置可能会有不同,但或许能在 \Lotus\Domino\javacoredatetimetxt 中找到

注: 为了不影响性能,在收集日志并解决问题后,建议您将日志级别恢复到原来的设置。

二 以上主要收集的是服务器日志,Notes客户端也是类似

本地存在lognsf,同时在数据目录下也存在:

data\IBM_TECHNICAL_SUPPORT\

和服务器类似,同样用来分析Notes客户端问题。

tar -zxvf settings-v071-1tgz 先安装"settings"插件

tar -zxvf syslog-v122-2tgz 再安装"syslog"插件

解压后要将以上两个目录放到cacti的"plugins"目录下

vi /var/www/html/cacti/plugins/syslog/configphp 配置syslog配置文件

if (!$use_cacti_db) {

$syslogdb_type = 'mysql';

$syslogdb_default = 'syslog';

$syslogdb_hostname = 'localhost';

$syslogdb_username = 'syslog'; 用户名自定义

$syslogdb_password = 'syslog'; 密码自定义

$syslogdb_port = 3306;

创建syslog数据库,使用syslogsql建表

mysql -u root -p 登陆Mysql数据库

show databases;

create database syslog;

insert into mysqluser(Host,User,Password) values("localhost","syslog",password("syslog")); 创建syslog账号、密码

flush privileges;

grant all on syslog to [email=cacti@localhost]cacti@localhost[/email] identified by 'syslog'; 将syslog数据库授权给上述syslog用户

flush privileges;

exit

 系统日志是记录系统中硬件、软件和系统问题的信息,同时还可以监视系统中发生的事件。用户可以通过它来检查错误发生的原因,或者寻找受到攻击时攻击者留下的痕迹。下面是我收集的如何查看电脑里的系统日志,希望对您有帮助。

 查看系统日志方法:开始→设置→控制面板→管理工具 中找到的“事件查看器”,

 或者在开始→运行→输入 eventvwrmsc 也可以直接进入“事件查看器”

 在“事件查看器”当中的系统日志中包含了windows XP 系统组建记录的事件,在启动过程中加载驱动程序和其他一些系统组建的成功与否都记录在系统日志当中。

 具体信息

 本段例如可以利用eventlog事件来查看计算机开关机的记录:

 在事件查看器窗口,在左侧的窗格当中选择系统选项,单击右键属性菜单项

 之后在弹出来的属性对话框当中切换到筛选选项卡,在事件来源下拉列表框中找到“evenlog之后确定,此时就可以看见该事件的'日志信息了!

 其中事件ID 6006 ID6005、 ID 6009就表示不同状态的机器的情况(开关机)。

 6005 信息 EventLog 事件日志服务已启动。(开机)

 6006 信息 EventLog 事件日志服务已停止。(关机)

 6009 信息 EventLog 按ctrl、alt、键(非正常)关机

 如何查看系统日志(以windows2003server为例)

 查看Windows2003系统日志的办法

 Windows日志文件记录着Windows系统运行的每一个细节, 对Windows的稳定运行起着至关重要的作用。通过查看服务器中的Windows日志,管理员可以及时找出服务器出现故障的原因。

 一般情况下,网管都是在本地查看日志记录,由于目前的局域网规模都比较大,因此网管不可能每天都呆在服务器旁。一旦远离服务器,网管

 就很难及时了解到服务器系统的运行状况,维护工作便会受到影响。现在,利用Windows Server 2003(简称Windows 2003)提供的Web访问接口功能就可解决这个问题,让网管能够远程查看Windows 2003服务器的日志记录。

 远程查看Windows 2003服务器的日志记录非常简单。在远程客户端(可采用Windows 98/2000/XP/2003系统),运行IE浏览器, 在地址栏中输入“https://Win2003服务器IP地址:8098”,如“https://19216801:8098”。在弹出的登录对话框中输入管理员的用户名和密码,点击“确定”按钮即可登录Web访问接口管理界面。接着在“欢迎使用”界面中点击“维护”链接,切换到“维护”管理页面,然后点击“日志”链接,进入到日志管理页面。在日志管理页面中,管理员可以查看、下载或清除Windows 2003服务器日志。

 在日志管理页面中可列出Windows 2003服务器的所有日志分类,如应用程序日志、安全日志、系统日志、Web管理日志等。

 查看某类日志记录非常简单,笔者以查看Web管理志为例,点击“Web管理日志”链接,进入日志查看页面,在日志文件列表框中选中要查

 看的日志文件,然后点击右侧的“查看日志”按钮,就能浏览Web管理日志记录中的详细内容了。

 清除某个日志文件也很简单,选中该日志文件后,点击“清除”按钮即可。如果你觉得远程查看日志不方便,想在本 地机器中进行查看,这时你 可以将日志文件下载到本地硬盘。选中某个日志文件,然后点击“下载日志”按钮,在弹出的“文件下载”对话框中点击“保存”按钮并指定存放路径即可。

log4jrootLogger=INFO,A1,R

# ConsoleAppender out

log4jappenderA1= org apachelog4jConsoleAppender

log4jappenderA1layout= org apachelog4jPatternLayout

log4jappenderA1layoutConversionPattern=%d{ yyyy/MM/ ddHH:mm:ss}%-5p%-10C {1} %m%n

# File out

//日志Appender修改为flume提供的Log4jAppender

log4jappenderR= org apache flumeclientslog4jappenderLog4jAppender

log4jappenderRFile=${ catalinahome}/logs/ ultraIDCPServerlog

//日志需要发送到的端口号,该端口要有ARVO类型的source在监听

log4jappenderRPort =44444

//日志需要发送到的主机ip,该主机运行着ARVO类型的source

log4jappenderRHostname = localhost

log4jappenderRMaxFileSize=102400KB

# log4jappenderRMaxBackupIndex=5

log4jappenderRlayout= org apachelog4jPatternLayout

log4jappenderRlayoutConversionPattern=%d{ yyyy/MM/ ddHH\: mm\: ss}%-5p%-10C {1} %m%n

log4jappenderRencoding=UTF-8

log4jloggercomultrapowerultracollectorwebserviceMessageIntercommunionInterfaceImpl=INFO, webservice

log4jappenderwebservice= org apachelog4jFileAppender

log4jappenderwebserviceFile=${ catalinahome}/logs/logsMsgIntercommunionInterfacelog

log4jappenderwebservicelayout= org apachelog4jPatternLayout

log4jappenderwebservicelayoutConversionPattern=%d{ yyyy/MM/ ddHH\: mm\: ss}%-5p[%t]%l%X-%m%n

log4jappenderwebserviceencoding=UTF-8

注:Log4jAppender继承自AppenderSkeleton,没有日志文件达到特定大小,转换到新的文件的功能

113 flume agent配置

agent1sources = source1

agent1sinks = sink1

agent1channels = channel1

# Describe/configure source1

agent1sourcessource1type = avro

agent1sourcessource1bind = 1921680141

agent1sourcessource1port = 44444

# Describe sink1

agent1sinkssink1type = FILE_ROLL

agent1sinkssink1sinkdirectory = /home/yubojie/flume/apache-flume-120/flume-out

# Use a channel which buffers events in memory

agent1channelschannel1type = memory

agent1channelschannel1capacity = 1000

agent1channelschannel1transactionCapactiy = 100

# Bind the source and sink to the channel

agent1sourcessource1channels = channel1

agent1sinkssink1channel = channel1

注:生成的文件的规则为每隔固定时间间隔生成一个新的文件,文件里面保存该时间段agent接收到的信息

12 分析

1 使用简便,工作量小。

2 用户应用程序使用log4j作为日志记录jar包,而且项目中使用的jar包要在log4j-1215版本以上,

3 应用系统必须将flume所需jar包引入到项目中。如下所示为所有必须jar包:可能会存在jar冲突,影响应用运行

4 能够提供可靠的数据传输,使用flume log4jAppender采集日志可以不在客户机上启动进程,而只通过修改logapppender直接把日志信息发送到采集机(参见图一),此种情况可以保证采集机接受到数据之后的数据可靠性,但是客户机与采集机连接失败时候数据会丢失。改进方案是在客户机上启动一个agent,这样可以保证客户机和采集机不能连通时,当能连通是日志也被采集上来,不会发送数据的丢失(参见图二),为了可靠性,需在客户机上启动进程

13 日志代码

Loginfo(“this message has DEBUG in it”);

14 采集到的数据样例

this message has DEBUG in it

this message has DEBUG in it

2 Exec source(放弃)

The problem with ExecSource and other asynchronous sources is that thesource can not guarantee that if there is a failure to put the event into theChannel the client knows about it In such cases, the data will be lost As afor instance, one of the most commonly requested features is thetail -F [file]-like use casewhere an application writes to a log file on disk and Flume tails the file,sending each line as an event While this is possible, there’s an obviousproblem; what happens if the channel fills up and Flume can’t send an eventFlume has no way of indicating to the application writing the log file that itneeds to retain the log or that the event hasn’t been sent, for some reason Ifthis doesn’t make sense, you need only know this: Your application can neverguarantee data has been received when using a unidirectional asynchronousinterface such as ExecSource! As an extension of this warning - and to becompletely clear - there is absolutely zero guarantee of event delivery whenusing this source You have been warned

注:即使是agent内部的可靠性都不能保证

21 使用说明

211 flume agent配置

# The configuration file needs to define the sources,

# the channels and the sinks

# Sources, channels and sinks are defined per agent,

# in this case called 'agent'

# exampleconf: A single-node Flume configuration

# Name the components on this agent

agent1sources = source1

agent1sinks = sink1

agent1channels = channel1

# Describe/configure source1

#agent1sourcessource1type = avro

agent1sourcessource1type = exec

agent1sourcessource1command = tail -f /home/yubojie/logs/ultraIDCPServerlog

#agent1sourcessource1bind = 1921680146

#agent1sourcessource1port = 44444

agent1sourcessource1interceptors = a

agent1sourcessource1interceptorsatype = orgapacheflumeinterceptorHostInterceptor$Builder

agent1sourcessource1interceptorsapreserveExisting = false

agent1sourcessource1interceptorsahostHeader = hostname

# Describe sink1

#agent1sinkssink1type = FILE_ROLL

#agent1sinkssink1sinkdirectory = /home/yubojie/flume/apache-flume-120/flume-out

agent1sinkssink1type = hdfs

agent1sinkssink1hdfspath = hdfs://localhost:9000/user/

agent1sinkssink1hdfsfileType = DataStream

# Use a channel which buffers events in memory

agent1channelschannel1type = memory

agent1channelschannel1capacity = 1000

agent1channelschannel1transactionCapactiy = 100

# Bind the source and sink to the channel

agent1sourcessource1channels = channel1

agent1sinkssink1channel = channel1

22 分析

1 tail方式采集日志需要宿主主机能够执行tail命令,应该是只有linux系统可以执行,不支持window系统日志采集

2 EXEC采用异步方式采集,会发生日志丢失,即使在节点内的数据也不能保证数据的完整

3 tail方式采集需要宿主操作系统支持tail命令,即原始的windows操作系统不支持tail命令采集

23 采集到的数据样例

2012/10/26 02:36:34 INFO LogTest this message has DEBUG 中文 in it

2012/10/26 02:40:12 INFO LogTest this message has DEBUG 中文 in it

24 日志代码

Loginfo(“this message has DEBUG 中文 in it”);

3 Syslog

Passing messages using syslogprotocol doesn't work well for longer messages The syslog appender forLog4j is hardcoded to linewrap around 1024 characters in order to comply withthe RFC I got a sample program logging to syslog, picking it up with asyslogUdp source, with a JSON layout (to avoid new-lines in stack traces) onlyto find that anything but the smallest stack trace line-wrapped anyway Ican't see a way to reliably reconstruct the stack trace once it is wrapped andsent through the flume chain(注:内容不确定是否12版本)

Syslog TCP需要指定eventsize,默认为2500

Syslog UDP为不可靠传输,数据传输过程中可能出现丢失数据的情况。

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
网站模板库 » 如何收集 HP ProLiant 系列服务器iLo日志,iLO出厂默认配置。不可以重启机器

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情