Compare files

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
jea
Posts: 7
Joined: Mon Nov 22, 2004 5:08 am

Compare files

Post by jea »

Hi,

I have 2 files that I would like to compare.

Test method: Alert when files are different
File 1
Filename: log.chk
Content:
000-OK
001-OK
002-OK
003-OK
004-OK
005-OK
006-OK
007-OK
008-OK
009-OK
010-OK
011-OK

File 2
Filename: log.chk
Content:
000-OK
001-OK
002-OK
003-OK
004-OK
005-OK
006-OK
007-OK
008-OK
009-OK
010-OK

Files are not in same dir, but on same server/drive.

Problem is that Hostmon says OK, even if the files are different.

The files has been identical before, but now they are different, but hostmon doesn't change status.

Best regards

Jesper
Munk IT Denmark
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1) What version of HostMonitor do you use?
2) What compare options do you use? Compare Time / Size / Contents? May be you check just timestamp?

Regards
Alex
jea
Posts: 7
Joined: Mon Nov 22, 2004 5:08 am

Post by jea »

1) 5.38
2) I monitor on content!

If I rename log.chk to log.log and refreshes, then the test goes BAD, if i then edit files, so that they are identical the tests goes GOOD, but if i then edit back to different files, the test is still GOOD!

/Jesper
Munk IT Denmark
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

So, you have not enabled "compare size" option?
Quote from the manual:
If you set "compare contents" option but don't set "compare size" option, HostMonitor will consider two files are identical when one file includes another one at offset 0 (one file can be smaller then another one).
Regards
Alex
jea
Posts: 7
Joined: Mon Nov 22, 2004 5:08 am

Post by jea »

Yes, that made the test go bad, but if I then make the files have the same content, then its still bad.

/Jesper
Munk IT Denmark
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

No, they do not go "bad" unless size or content are different.
Probably one file contains non printable characters, e.g. "end of file". Please check the size

Regards
Alex
Post Reply