Showing posts with label Files. Show all posts
Showing posts with label Files. Show all posts

Thursday, March 24, 2011

Linux Log Monitoring and Watcher - About Watching UNIX Log Files

Linux Log Monitoring and Watching - How can you monitor your Linux log files without having to spend hours writing a script for the task or searching the internet endlessly for a log monitoring solution?

Linux log file monitoring and watching is a duty that is in a different dimension all by itself. It is unique. The reason why I say this is that, log files in Linux often vary in format which makes it difficult for many users/admins to accomplish the task of monitoring their various logs. This is why it is impossible to find one good monitor that can be set up to watch custom log files, which by the way, are very common in UNIX environments.

But what exactly do I mean by "format"? By format, I'm referring solely to the format of the dates on the lines in the logs which is usually at the beginning of each line.

For instance, a typical /var/log/messages file on a Linux server, will look something like this:

[nagios.kedy0:501]
[nagios.kedy0:501] tail -6 /var/log/messages
Sep 18 08:23:51 nagios snmpd[4539]: Received SNMP packet(s) from UDP: [10.10.*.*]:47725
Sep 18 08:23:54 nagios snmpd[4539]: Connection from UDP: [10.10.*.*]:47725
Sep 18 08:24:11 nagios sshd[13078]: Authorized to root, krb5 principal dadmin/root@NETNET
Sep 18 08:24:11 nagios sshd[13078]: permit_root_login: PERMIT_GSSAPI_ONLY method: gssapi-with-mic
Sep 18 08:24:11 nagios sshd[13078]: GSSAPIII authenticated jbowman login accepted
Sep 18 08:24:11 nagios sshd[13078]: Accepted gssapi-with-mic for root from 10.10.*.* port 5345 ssh2
[nagios.kedy0:502]
[nagios.kedy0:502]

Notice the first three columns of each line of the above output. They represent the date and time.

Another log file, usually an application log file (not a system log like the one above), can look like this:

[nagios.kedy0:516] tail -3 /prod/app.log
2011/01/20 14:26:35 UTC [SMTPProper,48088609,69.*.*.*] Receiving message for delivery: from=17777551333@vim.blah.com to=['17777551333@vim.blah.com']
2011/01/20 14:26:35 UTC [-] Attempting 'attach' (promo is False) delivery for 17777551333
2011/01/20 14:26:35 UTC [-] Starting factory
[nagios.kedy0:517]

Again, focus on the columns; in this case, it is the first 2 columns that matter.

The day, month and year are separated with forward slashes and they're numerical. Notice the order they're in. The year comes first, then the month, then the day. Other log files may have the order reversed; with the Day coming first, followed by the month, then followed by the year. Other logs may have the fields separated by hyphens instead of slashes. The scenarios here are endless.

Do you now see how trying to monitor a UNIX linux log can be a hellish task for a UNIX user to take on without the proper efficient tool?

Thursday, February 17, 2011

Corrupt Docx File - Repairing Corrupt Word 2007 Files

Like other files word documents can be corrupted due to virus attack or improper system shutdown. This situation become worse when you have some important information in word files, these files could not be open by any other method until you repair it. There are two methods to word repair.

1) MS word In-build method
2) Use word repair software.

Both can repair your files in to original form. But first try MS word In-build method to repair if it didn't work then go with second method.

Steps to repair corrupted doc files: Fortunately MS word 2003, 2007 and 2010 have option to repair your corrupted doc and docx files. You need to follow few simple steps to repair your corrupt files.

1) Start MS word
2) Click on Office button and click on Open.
3) Select Corrupt files from open dialog box
4) Click down arrow which is next to open button. Open menu will pop up.
5) From Open menu select "Open and Repair"

Wait for a while word will repair your corrupt doc/docx files. You will able to see you file if word successfully repairs it otherwise a failure message will pop up. If MS word not able to repair your files then don't worry you can still access your valuable files with the use of word repair software.

These software uses highly sophisticated algorithm to scan your word file. These recovery tools recovers everything of your files like tables, bulleted lists, embedded images, charts, drawings etc. These are read-only software, it means that didn't alter your original file. It is advisable that first use demo version, when you are satisfied with the result in demo version then use full version of software.

Stellar Phoenix word recovery software is one of the most advance tool which repairs doc, docx files into its original form. You can see preview of your document in demo version. It supports MS office 2010, 2007, 2003, 2002, and 2000 and compatible with Windows 7, Vista, Server 2003, XP, 2000, and NT