KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Folder/File Size in BYTES

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list
View previous topic :: View next topic  
Author Message
seelye



Joined: 17 Sep 2005
Posts: 40
Location: USA

PostPosted: Sat Mar 02, 2013 10:35 pm    Post subject: Folder/File Size in BYTES Reply with quote

As HM get's more and more capable there are so many ways to accomplish things. However sometimes they are not as obvious as one might think. Below is what I found while developing what seems like a fairly easy test. Maybe there is some room for a tweak in the Folder/File Size Method.

The test overview: I'm trying to setup a test that will check the size of a file and notify if the file remains the same size or shrinks in between tests. I can't use a File Integrity(CRC) because the file is re-written each day and isn't always exactly the same sequence. The only real thing I can check is if it shrinks/grows. So I've tried to use the folder/file size test. At the moment, the file I'm checking has a real size of 11,781,540 Bytes.

However the test returns "11 Mb" (The MegaByte size of the file).

On a side note: There is a nomenclature issue. I've always understood Mb = Megabits and MB = MegaBytes. Doesn't 11,781,540 actually equal 11 MB with a capital B? Or is this Mb coming from the host OS and Host Monitor is simply inheriting the wrong unit suffix?

Regardless of the Mb/MB units, I need to convert this to an integer so I'm using the following Tune up Reply value:

%SuggestedReply_Integer%

The problem is that it seems HM is really pulling the integer 11 x 1024 X 1024. Therefore until my file changes by a full MB, the %Reply_Interger% and %SuggestedReply_Integer% remain the same 11534336. My file however only changes my approx 60 KB each day. That means I'll have false notifications for approximately 17 days.

Shouldn't the Folder/File Size report the actual size in bytes and allow us to select the units we want to display/log? Could the Folder/File Size test parameters be modified to allow us to select the reply value of Byte, KB, MB, GB etc..? Then again, can this test method even be modified without breaking backward compatibility for people's existing tests? I'll leave that to you!

Assuming I could get the value to be in the real Byte size of the file I will then use the following Action Profile. I've used this for other methods such as SNMP GET values etc and it's worked great.

Action Profile Sends an Email when "GOOD" Status and uses Advanced Condition: %Reply%-%LastReply% <= 0. The test never reports BAD but that's not our goal. Our goal is to simply get an email notification of the file size and not have an failed test stay in Host Monitor.

For the moment I did find a solution, though I still think the folder/file size method appears to unnecessarily return an inaccurate result.

My workaround, is to used a Folder/File Availability Test and set it to go BAD when the file doesn't exist. Then apply the following Tune up Reply value:

%FileSize%

Then I use the same ACTION profile from above.

This method returns the BYTE value I need.

Is it just me or is this a strange way to get a size value? What are your thoughts on tweaking the parameters in the Folder/File Size method to return Bytes by default and convert it to KB, MB, GB, Etc?

Thanks again for a great product. As shown above, the flexibility of HM has made it possible to build the test I needed. I'm just looking for a more logical way to do it.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Mon Mar 04, 2013 7:46 am    Post subject: Reply with quote

Quote:
On a side note: There is a nomenclature issue. I've always understood Mb = Megabits and MB = MegaBytes. Doesn't 11,781,540 actually equal 11 MB with a capital B? Or is this Mb coming from the host OS and Host Monitor is simply inheriting the wrong unit suffix?

Yes, Mb is actually MB. Its heritage related - we can change suffix but some customers use custom applications to analyze log files so we keep reply format intact.

Quote:
The problem is that it seems HM is really pulling the integer 11 x 1024 X 1024. Therefore until my file changes by a full MB, the %Reply_Interger% and %SuggestedReply_Integer% remain the same 11534336.

You are right.
Actually there is option that can change this behavior but it will effect ALL tests (Disk Free Space tests, UNC, File/Folder Size).

So I would recommend to use Folder/File Availability test method with 2 options
- Use Warning status if '%Reply%'<>'%FileSize%' (or '%Reply%'>'%FileSize%' - if you want to start alerts when file becomes smaller)
- Tuenup Reply value: [%FileSize%]

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index