Sponsored Content
Operating Systems HP-UX Script to monitor /var/opt/resmon/log/event.log file Post 302599449 by methyl on Friday 17th of February 2012 06:24:49 AM
Old 02-17-2012
Here's a sample. I've just checked that executing the command suggested produces the same output as in the other log. However if the EMS alert is out of date (i.e. probably repaired) the command produces the message "There is no active monitor request for the resource".

Code:
Feb 15 03:03:00 servername EMS [4044]: ------ EMS Event Notification ------   Value: "SERIOUS (4)" for Resource: "/system/events/core_hw/core_hw"     (Threshold:  >= " 3")    Execute the following command to obtain event details:   /opt/resmon/bin/resdata -R 265029435 -r /system/events/cor_hw/core_hw -n 265027588 -a



There can be a lot of trivia in /var/opt/resmon/log/event.log which would not normally appear in syslog.log. Messages like recovered disc errors and tape changes.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Log monitor script

Hi All, I have a question and hope someone will have an answer to that. I'm looking for a way to monitor log files being generated on a windows machine for some specified string and if its occurrence is found, raise an alarm though email. The log file size keeps on increasing and after a... (2 Replies)
Discussion started by: er_ashu
2 Replies

2. Shell Programming and Scripting

Script to monitor the pattern in the log file

hi All, how to find a pattern in the log file & display the above and below line for example in the log file, i have many lines, whenever i search for "Category" it should display the above line with only few parameter like i want only the location name & department name Thu Jul 02 11:05:23... (2 Replies)
Discussion started by: rithick256
2 Replies

3. Shell Programming and Scripting

Need help for this monitor log script

this is the format of the log file in my system xxxxx_xxx_xxxx_xxxxx_09_10_2009_170457.log xxxx_xxx_2_0_09_10_2009_163834.log xxx_xxxxxxxxx_25_10_2009_045020.log xxx_xxxxxxx_08_11_2009_055728.log the path of this logs file in on for example /dellxmax/application/log what i want to do... (5 Replies)
Discussion started by: coxmanchester
5 Replies

4. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

5. Shell Programming and Scripting

Script to monitor log file

Hi, Have written a script to monitor linux non standard log file based on line numbers, so each check store $otalinenum .. then in next check after 10 minutes it compre the current_total_line_num > last_total_line_num then it will parse the log file from last_total_line_num to... (0 Replies)
Discussion started by: Shirishlnx
0 Replies

6. Shell Programming and Scripting

Monitor log file

Hi, I need to amend an existing ksh script so that it runs a process (stop weblogic) and in parallel needs to monitor a log file (startup.log) in the background for a certain string (e.g. unable to stop weblogic). If the string appears in the log i need to kill the stop weblogic process. ... (5 Replies)
Discussion started by: dholmaster
5 Replies

7. Shell Programming and Scripting

Script to monitor /var/log/messages

Hello All, I want to write a script to monitor my product logs from /var/log/messages and send notifications without using "tail -f" command.Please suggest alternatives and any other tools for monitoring and alerting. Thank You (1 Reply)
Discussion started by: Cva2568
1 Replies

8. Shell Programming and Scripting

Log all the commands input by user at real time in /var/log/messages

Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below. function log2syslog { declare COMMAND COMMAND=$(fc -ln -0) logger -p local1.notice -t bash -i -- "$USER:$COMMAND" } trap... (12 Replies)
Discussion started by: invinzin21
12 Replies

9. Shell Programming and Scripting

Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog

I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog. tail -f /var/log/messages dblogger: msg_to_dbrow: no logtype using missing dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies

10. Shell Programming and Scripting

[bash] script is filling up my /var/log

I am trying to create a script that checks if my VPN connection is up and running... Everything seems to work as except but for some reason, the script fills up my /var/log/auth.log with the below information Dec 13 01:07:44 debian sudo: soichiro : TTY=pts/0 ; PWD=/home/soichiro/Desktop ;... (5 Replies)
Discussion started by: soichiro
5 Replies
uerf(8) 						      System Manager's Manual							   uerf(8)

NAME
uerf - Event report formatter SYNOPSIS
/usr/sbin/uerf [options] OPTIONS
Selects classes of events. Reports all hardware-detected and software-detected events. Reports any event that occurs during system main- tenance (for example, if you run a system exerciser). Reports information on system status, autoconfiguration, device status, device events, time stamps, and system startup and shutdown. Reports events for the specified disk type (for example, rz55) or class (for exam- ple, rz). If you do not specify the disk type, events for all disk types are reported. Outputs event information from the specified file instead of the /usr/adm/binary.errlog default event log file. The filename and location of the default event log file is defined by the *.* entry in the /etc/binlog.conf file. Use the -f option to examine old or backup event log files. You must specify the full path name for the file. Displays a brief help message. If you specify any other option with the -h option, it is ignored. Reports events from the specified system. Use the -H option when you want to forward events from multiple remote systems to the local host. Reports mainframe event types. If you do not specify any parameters, all mainframe events are reported. You can specify the following mainframe event types: Reports CPU-related events, such as machine checks. Reports memory-related events, such as single-bit corrected read data (CRD) and double-bit uncorrectable events. Outputs events as they occur in real time before logging the events in the event log file. This option can be used to monitor events while you are running a disk or tape exerciser. You cannot use the -n option with the -f option. Outputs events in brief, full, or terse format. The default output is brief. You can specify the following formats: Reports event information in a short format. Reports all available information for each entry. Reports event information and displays register values, but does not translate. Reports operating system events such as panics and exceptions and faults. If you do not specify any parameters, all operating system events are reported. You can specify the following events: Arithmetic exception faults Asynchronous trap exception faults Page faults Privileged instruction faults Protection faults Page table faults Reserved address faults Reserved operand faults System call excep- tion faults Segmentation faults Outputs event information in reverse chronological order. Reports events for the specified record code or codes. You can specify the following record codes: CPU machine checks and exceptions Memory events (soft and hard) Disk events Tape events Device controller events Adapter events Bus events Stray interrupts Console events Stack dump CAM (SCSI) events ci ppd events scs events Informational Start up Shutdowns and reboots Panics Diagnostics status Reports events that are included in the specified sequence of num- bers. You also can specify other options to select the event types in the sequence that you want reported. Produces a summary report of the selected events. Reports the events that are included in the specified time range. If you do not specify the -t option, the uerf com- mand processes the event log file from beginning to end. You can specify a starting time and ending time. The default date is the current date, the default starting time is 00:00:00, and the default ending time is 23:59:59. Use the following syntax to specify the time sequence: uerf -t s:dd-mmm-yyyy,hh:mm:ss e:dd-mmm-yyyy,hh:mm:ss The s: parameter specifies the starting time, and the e: parameter specifies the ending time. Reports events for the specified tape type (for example, tz30) or class (for example, tz). If you do not specify any parameters, events for all tape types are reported. Reports events for the specified unit number. This option can be used with -D or -T option. Excludes all the selection options specified in the command line. This option does not affect the -f, -h, -H, -o, -R, and -t options. Produces output in hex format. DESCRIPTION
The uerf command produces a record of system events. These events include event messages relating to the system hardware and the software kernel as well as information about system status, startup, and diagnostics. The event log files are created with 640 mode. The files are owned by root and belong to the system group. If you want to use the uerf command, you must belong to the system group or have superuser privileges. RESTRICTIONS
The uerf command uses the uerf.bin, uerf.hlp, and uerf.err data files. The uerf.bin file is the event information data base. The uerf.hlp file is the help file. The uerf.err file is the event message file. The uerf command expects to find the data files in the /usr/sbin directory. By default, the uerf command outputs the contents of the event log file specified by the *.* entry in the /etc/binlog.conf configuration file. To report on any other event log file or if there is no *.* entry, you must use the uerf command with the -f option. Do not specify any other option with the -h option. Some hardware and system events are logged as ASCII informational messages. Use the logger command with the -b option to log informational messages. Use the uerf command with the -r 250 option to report information messages. Additional event information also is logged by the syslogd daemon in the file specified by the kern.debug and syslog.debug entries in the /etc/syslog.conf file. These log files are in ASCII format; you do not have to use the uerf command to read these files. The uerf command is not compatible with binary event log files produced by ULTRIX or DEC OSF/1 Version 1.0 operating systems. EXAMPLES
The following example produces a report containing all event events, excluding logged operating system events and operator and maintenance class events: uerf -O -x -c oper,maint The following example produces an event report from the /usr/adm/binary.errlog.old file: uerf -f /usr/adm/binary.errlog.old The following examples produce event reports for the specified record codes: uerf -r 100,102 uerf -r 100-109 The following example produces a report of all the events that occurred between 10:47 a.m. on April 13, 1986 and 5:30 p.m. on April 20, 1986: uerf -t s:13-apr-1986,10:47:00 e:20-apr-1986,17:30:00 The following example produces an event report of the events that occurred on the current day and year, starting at 1:20 p.m. and ending at the current time: uerf -t s:13:20 The following example produces a report of all logged events and displays it in reverse chronological order, starting with the current date and time: uerf -R FILES
default event log file binlogd configuration file uerf event message file uerf help file event information data base file SEE ALSO
Commands: logger(1), binlogd(8), syslogd(8) uerf(8)
All times are GMT -4. The time now is 08:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy