Introduction

System logs are crucial for monitoring, diagnosing, and troubleshooting issues in OpenVMS. They provide a detailed record of system events, errors, and other significant activities. This module will cover the types of logs available in OpenVMS, how to access and interpret them, and best practices for using logs in diagnostics.

Key Concepts

  1. System Logs: Files that record events and messages generated by the operating system and applications.
  2. Diagnostics: The process of identifying and resolving issues based on log data.
  3. Log Management: Techniques for organizing, storing, and analyzing log data.

Types of System Logs

OpenVMS maintains several types of logs, each serving a different purpose:

Log Type Description
Operator Logs Records system messages and operator communications.
Error Logs Captures hardware and software errors.
Accounting Logs Tracks resource usage and user activities.
Security Logs Logs security-related events such as login attempts and access violations.

Accessing System Logs

Operator Logs

Operator logs are stored in the SYS$MANAGER directory. You can view them using the TYPE command.

$ TYPE SYS$MANAGER:OPERATOR.LOG

Error Logs

Error logs are managed by the ERRFMT utility. To display error log entries, use the following command:

$ ANALYZE/ERROR_LOG

Accounting Logs

Accounting logs can be accessed using the ACCOUNTING command.

$ ACCOUNTING SHOW

Security Logs

Security logs are part of the audit system and can be viewed using the ANALYZE/AUDIT command.

$ ANALYZE/AUDIT

Interpreting Log Entries

Operator Log Example

%%%%%%%%%%%  OPCOM  12-DEC-2023 12:34:56.78  %%%%%%%%%%%
Message from user SYSTEM on NODE1
%SHADOW_SERVER-I-SHDCPYMSG, shadow copy operation started on DSA1:
  • Date and Time: 12-DEC-2023 12:34:56.78
  • Source: SYSTEM on NODE1
  • Message: shadow copy operation started on DSA1

Error Log Example

%%%%%%%%%%%  SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=00000000, PC=00000000, PS=00000000
  • Error Code: SYSTEM-F-ACCVIO
  • Description: access violation
  • Details: reason mask=00, virtual address=00000000, PC=00000000, PS=00000000

Accounting Log Example

Username: SYSTEM
Process ID: 20234
Start Time: 12-DEC-2023 12:00:00.00
End Time: 12-DEC-2023 12:30:00.00
CPU Time: 00:00:30.00
  • Username: SYSTEM
  • Process ID: 20234
  • Start Time: 12-DEC-2023 12:00:00.00
  • End Time: 12-DEC-2023 12:30:00.00
  • CPU Time: 00:00:30.00

Security Log Example

%%%%%%%%%%%  AUDIT  12-DEC-2023 12:34:56.78  %%%%%%%%%%%
Login success by user SYSTEM from NODE1
  • Date and Time: 12-DEC-2023 12:34:56.78
  • Event: Login success
  • User: SYSTEM
  • Source: NODE1

Best Practices for Log Management

  1. Regular Monitoring: Regularly check logs to identify and address issues promptly.
  2. Automated Alerts: Set up automated alerts for critical events.
  3. Log Rotation: Implement log rotation to manage log file sizes and ensure older logs are archived.
  4. Centralized Logging: Use centralized logging solutions to aggregate logs from multiple systems.
  5. Security: Ensure logs are protected from unauthorized access and tampering.

Practical Exercise

Task

  1. Access the operator log and identify the last five entries.
  2. Analyze the error log for any recent hardware errors.
  3. Review the accounting log to find the user with the highest CPU usage in the last 24 hours.
  4. Check the security log for any failed login attempts in the past week.

Solution

  1. Accessing Operator Log

    $ TYPE SYS$MANAGER:OPERATOR.LOG
    
    • Scroll to the bottom to find the last five entries.
  2. Analyzing Error Log

    $ ANALYZE/ERROR_LOG
    
    • Look for entries with hardware error codes.
  3. Reviewing Accounting Log

    $ ACCOUNTING SHOW
    
    • Use filters to find entries from the last 24 hours and sort by CPU usage.
  4. Checking Security Log

    $ ANALYZE/AUDIT
    
    • Filter for failed login attempts in the past week.

Conclusion

Understanding and effectively using system logs is essential for maintaining a healthy OpenVMS environment. By regularly monitoring logs, interpreting their entries, and following best practices for log management, you can proactively address issues and ensure system stability and security.

OpenVMS Programming Course

Module 1: Introduction to OpenVMS

Module 2: Basic OpenVMS Commands

Module 3: OpenVMS File System

Module 4: Scripting with DCL

Module 5: OpenVMS System Management

Module 6: Networking on OpenVMS

Module 7: Advanced OpenVMS Programming

Module 8: OpenVMS Clustering

Module 9: OpenVMS Security

Module 10: Troubleshooting and Optimization

© Copyright 2024. All rights reserved