月度归档:2021年01月

Log Parser Rocks! More than 50 Examples!

Log Parser is a tool that has been around for quite some time (almost six years, in fact).  I can’t really do any better than the description on the official download page, so here it is: “Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory”.  

Log Parser is a command line (yes, command line!) tool that uses a SQL dialect to extract information from data sources.  In particular, I have found it to be invaluable for extracting information from the web server logs of the sites that I manage and develop.

First, about that SQL syntax Log Parser uses to query the data sources… many developers seem to have a natural aversion to SQL.  In addition, many new data access frameworks attempt to abstract SQL away from the developer.  However, I have always found SQL easy to work with and believe it to be an essential tool that every developer should at least have a working knowledge of.   For Log Parser, all that is necessary is a basic understanding of the core SQL SELECT statement, as implemented within Microsoft’s SQL Server (that is, T-SQL).  That means you should be familiar with the following elements of a SELECT statement: TOP, FROM, INTO, WHERE, ORDER BY, GROUP BY.  That’s all you need to perform most Log Parser operations.

Curiously, Log Parser has never received the amount of attention that I think it deserves.  Beyond a flurry of attention when it was first released, it seems to be mentioned rarely in official Microsoft communications or blogs.  Despite that, it remains a viable and valuable tool for parsing not just web server log files, but all types of structured text-based data.

In this post, rather than explaining how to use Log Parser. I’ll give a number of examples of its use.  In addition, I’ll document some useful locations where Log Parser information can be found on the web.

继续阅读

How to allocate a large memory space for Informix shared memory segments on Red Hat Linux 3 (RHEL3)

Troubleshooting

Problem

How to allocate a large memory space for Informix shared memory segments on Red Hat Linux 3 (RHEL3).

Resolving The Problem


PROBLEM


You are using IBM® Informix® Dynamic server (IDS) on on Red Hat Linux 3. When you try to allocate more that 1.8 GB (Gigabytes) of shared memory, the following error message appears in the message log file.

13:52:26  shmat: [ENOMEM][12]: out of available data space, check system memory parameters (e.g. MAXMEM).

继续阅读

Using the nsradmin command to enable or disable an Informix Storage Manager (ISM) storage device

Troubleshooting

Problem

This article explains how to enable or disable an Informix Storage Manager (ISM) storage device using the nsradmin command.
Resolving The Problem

INTRODUCTION

Before the ISM server can use a storage device for backup or restore operations, it must be enabled. There may be times when a storage device becomes disabled due to an error; for example, an I/O error on a file system storage device. You can use the nsradmin -c command to either re-enable the storage device once the problem has been corrected, or disable the storage device to prevent it from being used.

BEFORE YOU BEGIN

You need to be root or be listed as an ISM administrator in the output from the command:

ism_show -admins

You cannot enable or disable a storage device that has an ISM storage volume mounted on it. To view the status of the devices, run the command:

ism_show -devices

If needed, unmount the storage volume using the command:

ism_op -unmount <device_name>

STEPS

  1. Login as user root or one of the users listed as an ISM administrator.
  2. Run the command: nsradmin -c
  3. Choose the command Select.
  4. Under type, choose NSR device.
  5. Choose the command Next until you locate the storage device you want to enable or disable.
  6. Choose the command Edit, and then press RETURN.
  7. Under enabled, select Yes or No.
  8. Press ESC to leave the menu.
  9. Press RETURN to save changes.

The ism_show -devices command will show the new enabled/disabled status of the device.