Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


March 2002

Event Log Query Tool


RSS
Subscribe to Windows IT Pro | See More Resource Kit Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Access an event-log summary from the command line

Windows 2000 and Windows NT administrators quickly learn the value of the event logs. If you don't look over the event logs every day or two, you might miss some important warnings or errors. But starting up the Microsoft Management Console (MMC) Computer Management snap-in is a pain—you're more likely to scan event logs regularly if you have a command-line tool.

Event Log Query Tool, an automated tool for examining event logs, is available in the Microsoft Windows 2000 Server Resource Kit Supplement One. Elogdmp.exe is a bit limited, but with some work on your part, it can be quite useful. The tool dumps an event-log summary to the screen. You can then search the output for particular keywords or pipe it into a batch file for processing.

Elogdmp's syntax is

elogdmp <computername> <logname>

Computername is the name of the computer whose log you want to dump—Elogdmp takes NetBIOS names, IP addresses, and some (but not all) DNS names (preceding backslashes aren't required). Logname is the name of the log that you want to see (e.g., Security, Application, Directory Service). Case doesn't seem to matter, but if the log name contains a space, enclose the name in quotation marks.

So, for example, to dump the System log on a machine named \\mypc, you'd type

elogdmp mypc system

If \\mypc is a DNS server, you can type

elogdmp mypc "dns server"

to view the DNS Server log. The output is a comma-delimited dump of the log's contents: the date, time, source, type, category, event ID, user, and machine information. Most of the fields are self-explanatory, but the source, type, and category fields need some explanation.

The source field identifies the program (e.g., w32time, DNS) that created the log entry, and the type field contains the severity level (i.e., INFO, WARN, or ERROR). In a log file you view using the Computer Management snap-in, the category field provides more specific information about the system than the source field does—for example, an Active Directory (AD)­related message announcing that the OS has begun defragmenting AD might display NTDS ISAM as the source and the more helpful Online Defragmentation as the category. Unfortunately, Elogdmp's category field is singularly unhelpful: It contains only the word None or Something.

Although Elogdmp doesn't display the actual message that triggered the log entry, the tool still can be useful from the command line or in a batch file. For example

elogdmp mypc system | find "ERROR"

will show all System event-log entries of type ERROR (the Find command is case sensitive, so ERROR must be in capital letters). The entries appear from the oldest to the most recent, so you'll see today's errors even if the bulk of the output scrolls off the screen.

Elogdmp is terse in its error reporting. If it can't satisfy your request (e.g., if you query an event log on a machine that you don't have permissions to), you'll get a decidedly unhelpful error such as

elogdmp: cannot open the 'system' event log (5)

To determine the reason for the error, you need to know that the number in parentheses is the number of the error. Error 5 happens to be an access-denied error. To see what an error means, you can use the Net Helpmsg command. For example, typing

net helpmsg 5

at a command prompt produces the response access is denied.

End of Article



Reader Comments
thanks, for this info.
but please tell me from where i can get the file "elogdump" please tell me.



sunel February 16, 2004


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

10 Reasons to Deploy Windows Vista

The decision to upgrade your XP systems to Vista is simple when you consider features such as easier backup, a great desktop search, and vastly improved security options. ...

10 Reasons Not to Deploy Windows Vista

The decision to upgrade to Vista has to make business sense, but many companies find the costs in training and application compatibility problems outweigh any benefits Vista brings. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing