WINHOGFALSEWinHog Helpyesyesyesyes


Table of Contents

Introduction

What is WinHog?

Installing WinHog.

Unregistered shareware version installation

Registered version installation

Uninstalling WinHog.

Uninstalling WinHog

Using WinHog

Determining your disk's partition and cluster size

Selecting a drive & directory

Setting options

Running WinHog to gather information

Analyzing WinHog results

Printing results

Stacker and DriveSpace users

Registering WinHog

How to register WinHog

Getting Help With WinHog

How to get help with WinHog

Other

Known Problems and Avoidences

Change History

Special Acknowledgements

DISCLAIMER: The files distributed with this demonstration package are provided As-Is, without warranty as to the merchantability or performance, and without any express or implied warranties whatsoever. Because of the diversity of conditions and hardware under which this program may be used, no warranty of fitness for a particular purpose is offered.  The user must assume the entire risk of using the program.  Any liability of sell or manufactureer will be limited exclusively to product replacement or refund of the registration fee.  Michael D. Price, CSP shall not be liable for errors contained herein, for incidental or consequential damages in connection with furnishing, performance or use of this material.  WinHog is Copyright (c) 1993,1994, 1994 by Michael D. Price.  All Rights Reserved.


How to get help with WinHog

I have done my best to test WinHog under a variety of system configurations to minimize the chance of problems once it has been distributed.  I recognize that I cannot test WinHog under every scenario.  Therefore, I will do my best to work with registered users to resolve problems that come to my attention.  To this end, I ask that you supply the following information when reporting problems:

A general description of your system's configuration (hardware, software, OS versions, etc.)

A description of the problem and if possible, a screen print of the problem or erroneous WinHog display.

A print-out of the results of a CHKDSK on the drive in question.

Steps to reproduce the problem.  The better these are, the faster I can fix the problem!

Send this information to me by either of the below methods:

Michael D. Price, CSP

P.O Box 149

Pickerington, OH 43147-0149

U.S.A

- or -

CompuServe 722022,22

Internet - 72202.22@compuserve.com

I will do my best to correct the problem.  Depending on the extent of the problem, I will send upgrades to registered users or include the fix in the next release.  If I cannot correct the problem, I will happily refund the registration fee.


Special Acknowledgements

Frank Haggar of Boca Raton, Florida (CompuServe 75672,1206) deserves a special acknowledgement (and a big THANK YOU) for taking the time to discuss the progress of WinHog 4.0 in addition to his ability to explain the DOS FAT allocation and slack values.  Frank was recognized as the 1994 fourth quarter MVP award winner in the Microsoft Windows SDK Forum (GO WINSDK).  It was thanks to Frank's idea of combining the DOS FAT information with the existing WinHog engine that WinHog 4.0 came to be.  In reviewing WinHog requests from days past, I have found several users who asked if WinHog displayed the slack information, but I did not understand what they were asking for at the time (and WinHog had not evolved far enough to take advantage of it anyways).  So, if you see any stuff out there (shareware or commercial) that has Frank's name on it, check it out, he knows his stuff!


Change History

Version 1.0 - September, 1992

Initial release

Version 1.1 - October, 1992

Changed Text boxes to Label boxes for directory listing and other displays.  This prevents user from performing CUT/COPY/PASTE operations on results.

Changed screen object refresh order for subsequent executions of WinHog.  This was cosmetic and made the chart clearing and refresh process appear neater.

Implemented the registered user mechanism.  This allows me to only change two constants in the GLOBAL module in order to create a registered  version for someone.

Added the exploding look to the startup of the form.

Version 1.2 - October, 1992

OOPS!!!!! During final revisions of version 1.1, I missed a subscript naming change.  This caused the text displayed in the color coded legend on the right side of the screen to not scroll properly.  This has been corrected and I have been flogged brutally to atone for my testing oversight.  THANKS TO JOE COOK OF CEDAR RAPIDS IOWA FOR FINDING THE PROBLEM AND E-MAILING A MESSAGE! THANKS!!!

Version 1.2a - November, 1992  (Registered Owners Only)

The text trunction problem noted in the earlier release notes has been solved!  When running some PS/2 and OS/2 2.0 systems, the text of some fields appeared to be slightly different in characteristics than my development machine.  This caused some "tight fitting" text fields to word wrap where I didn't expect them to.  By enlarging each field slightly, I gave each character/sentence a little room to grow.

Version 2.0 - March, 1993

Upgraded to Visual Basic Version 2.0.

Corrected the missing or garbled directory pathname.  The problem occurred on systems who had a volume label for their hard disk.  This caused a line wrap within a single line text box which in turn caused the second line to contain the path but only show the top few pixels.  My most sincere apologies to those who had this problem and thought WinHog was junk.

Added ability to use the mouse and select a color coded box corresponding to a slice of the pie and have the full path name and the total bytes for that directory display in a small pop-up.

Fixed two scrolling problems that caused up to two of the smallest directories to not be displayed.  Also, corrected problem when scrolling with many directories, every 16 directory is skipped in the scroll process.

Fixed problem where disproportionate directories (e.g. a 4 Megabyte directory and a 34 byte directory under same root) would not graph properly.  There may still be random instances of this since it is difficult for me to test it but I hope I got the worst of it.

Code clean-up, performance enhancements and internal documentation.

Addition of a feature for registered users that shows the free diskspace in addition to the space used by the selected directory(s).

Version 3.0 - November, 1994

Upgraded to Visual Basic Version 3.0.

Added report to print results of WinHog analysis.

Added automated generation of shareware registration form.

Fixed a few bugs.  Attempted to streamline performance.

Version 4.0 - February, 1995

Implemented DOS FAT allocation and DOS FAT slack calculation feature.

Fixed a few bugs.  Attempted to streamline performance.


Known Problems and Avoidences

PROBLEM:  WinHog repeats the same color key after 15 directories.

SOLUTION:  Visual Basic supports the 16 QuickBasic colors very easily without getting into shading and other gyrations for color.  I focused on functionality of the utility and avoided the difficulty of managing the large color palet available in VB.  The reason only 15 of the colors are supported is that and grey just wouldn't work with what I was trying to display.  Future release will incorporate in the 256 color palatte that Visual Basic supports.

PROBLEM:  I click on a directory in the directory box but the display I get is always for the root directory.

SOLUTION:  You must double click on the desired directory.  A double click will change how the directory box looks by presenting you with a list of the sub directories in the selected directory.

PROBLEM:  The percentage value in the colored boxes adds up to more or less than 100% and/or it appears that some of the smaller pie slices overlap into the largest pie slice.

SOLUTION:  Don't be so picky!  Seriously though, I have rounded off the percentage calculation at two decimal places and this situation can occur when one directory has many megabytes and another directory has only a few bytes.  It can also occur when there are a lot of small directories in relation to the average size of the other directories.

PROBLEM:  Hidden directories.  If there are hidden directories that are not off of the root directory, WinHog 4.0 will not find those directories nor include any of their contents in the calculations.  I will be working to correct this in the future but would currently require a major re-write of the recusive directory handling code.

SOLUTION: None.  Just be aware of this.  If possible, move the hidden directory to the root directory where the current code will find it.

PROBLEM:  There is a 9 cluster discrepancy between WinHog 4.0 and CHKDSK.  CHKDSK shows an additional 9 clusters allocated than what WinHog can find.

SOLUTION: None at this time.  I am trying to find where those clusters are being used.  In the mean time, be aware of the small difference.


Where to send registration requests
How to register WinHog

You can print this page, fill it out and send it in or use the automatic registration form in the unregistered version of WinHog.

WinHog 4.0 Registration Request

Please send me:

Registered WinHog (latest version)

I have enclosed Ten ($10) Dollars (U.S.) for the registration fee.

Cash, check or money order welcome.  Sorry, no credit cards.

I would like WinHog delivered on (choose one):

____  3 1/2 inch diskette

____  5 1/4 inch diskette

Please send WinHog to:

Name:

Address:

City:	State:	ZIP:

Country:

Please tell me how/where you found WinHog so that I can keep an updated shareware version available there.

Send registration requests to:

Michael D. Price, CSP

P.O. Box 149

Pickerington, OH 43147-0149

     U.S.A.


Analyzing WinHog results

OK, so WinHog has completed gathering information.  Now what?

Much of the interpretation of WinHog information is seat-of-the-pants.  However, there are a few guidelines that can be followed to get you started on the right path.

1. First, take a look at the different allocation unit settings.  Be realistic though.  Looking at the 16,384 byte allocation unit setting for a 40 megabyte hard drive won't tell you much other than how much your existing data would take up on a 512+ megabyte hard drive.  You might be surprised though to see the results if your single partition 540 megabyte hard drive (with 16,384 byte allocation units) was instead allocated with 2,048 byte allocation units (repartitioned as four 125 megabyte hard drives and a 40 megabyte hard drive).  The graphic below shows how to change the allocation unit analysis size.  Note the current setting is indicated with a check mark.

2. Second, look at the slack sizes.  This can be an indication of a large number of small files that have a lot of slack space.  To get a feel for the effect of repartitioning the hard drive, change the allocation unit sizes under the slack menu similar to #1 above.  After finding a particularly wasteful directory, ask yourself the question: "Do I need immediate access to all of the files in this directory?"  If the answer is "no", consider using PKZip or another compression utility to crunch all the files down into one file and then decompress the file only when you need its contents.

3. The color code for the legend can be clicked to display the exact numbers of DOS file size, allocated space and slack space.  Sorry, the slices of the pie chart is not sensitive to the mouse clicks (yet!).


Setting options

Many users have asked for the ability for a disk's free space to be included in the pie chart.  However, this really only makes sense when running against the root directory.  Because everyone want's things a little different, there is the menu selection Option that has one choice; Include freespace in calculations.  Choose this option if you want to include the freespace in the pie chart and its legend.  Otherwise, leave it un-checked (the default).

This option is only available to registered users.


Printing results

A textual report showing the results of the currently displayed WinHog data and analysis mode can be printed using File then select Print.  This report looks like:

WinHog Disk Usage Report    WinHog Disk Usage Report  WinHog Disk Usage Report    1/23/1995 06:40 PM

UNREGISTERED WINHOG

Analysis Mode: DOS File Size

C:\VB3                                                    4,971,970           17.34%

C:\VB3\REPORT                                     4,519,604           15.76%

C:\VB3\WINAPI                                      3,835,053           13.38%

C:\VB3\DXTALKER                                2,702,400             9.43%

C:\VB3\WINEOM                                    1,234,014             4.30%

C:\VB3\EOM                                           1,161,999             4.05%

C:\VB3\SAMPLES                                    951,804              3.32%

C:\VB3\BRKTMSTR                                  897,085              3.13%

C:\VB3\CTMASTER                                 807,893              2.82%

                                                             .

                                                             .

                                                             .

                                                             .

C:\VB3\FOCUSPRB                                    4,574                0.02%

C:\VB3\REWIN                                            3,415                0.01%

TOTAL BYTES ACCOUNTED FOR = 28,669,076

Total Free Space on Drive = 11,112,448

It can be useful to print this report at various times to show the progressive change in the disk directory usage on your system.


Selecting a drive & directory

By default, WinHog begins at the root directory of the C: drive.  Any hard drive can be used.  In addition, sometimes it is useful to analyze a specific sub-directory.  WinHog is flexible enough to allow the specialized analysis you need to manage large environments.  To change a drive, click on the drive selection box and click on the desired hard drive.  To change directories, navigate through the directory selection box the same way you would navigate through File Manager.  Only one drive / directory combination can be analyzed at a time.


Running WinHog to gather information

Once the desired hard drive and directory has been selected and other options set, WinHog can be started to gather information.  This is done by clicking on the Start command button.

During the data gathering process, WinHog displays a message that information is being gathered.  When it is complete, it removes that message and draws the pie chart.

Once WinHog has gathered the information, it is then possible to perform analysis on the results.

It is not necessary to set the desired analysis mode before running WinHog, it gathers all of the necessary information in one pass for the hard drive / directory combination.

WinHog can be stopped during the data gathering process by clicking on the Cancel command button.


Determining your disk's partition and cluster size

One of the fundamental philosophies in WinHog's design was avoiding the need for any third-party custom controls or DLLs.  Because of this though, WinHog cannot automatically determine the size of your hard drive nor can it determine the cluster size (also known as Allocation Units).

This information is readily available to you though and in fact you probably have been looking at it for years and didn't realize it.  From Windows, open a DOS prompt and perform a CHKDSK on each of the hard drive partitions you have (C:. D:. E:, F:, etc.) and write down the allocation unit size for each partition.  Look at the sample CHKDSK results below:

Volume Serial Number is 3371-0AEF

212213760 bytes total disk space

    3227648 bytes in 13 hidden files

    1146880 bytes in 273 directories

196689920 bytes in 4371 user files

  11149312 bytes available on disk

      4096 bytes in each allocation unit

     51810 total allocation units on disk

       2722 available allocation units on disk

    655360 total bytes memory

    586288 bytes free

The line highlighted above can only have values of 2048, 4096, 8192, 16384 and 32768.  This represents the number of bytes ALLOCATED each time space is requested for a file.  For example, a 1 byte file would actually take up 4096 in the above example.  A 4097 byte file would take up 8192 bytes (2 times 4096 bytes) and so on.

Another way to determine you cluster size is to determine the size of your disk partition.  The size of the partition determines the allocation unit size used.  The following table can be a guide to the allocation unit size of your partition.

Hard drive size	Allocation unit size(bytes)

0 - 15Mb	4096 bytes

16 - 127Mb	2048 bytes

128 - 255Mb	4096 bytes

256 - 511Mb	8192 bytes

512 - 1023Mb	16384 bytes

1024 - 2048Mb	32768 bytes

Simple right!  With the trend toward putting 500+ megabyte hard drives in new systems, it is clear that a cluster size of 16,384 bytes will chew up a lot of space if you have a large number of predominately small files.  See Analyzing WinHog results for more information on evaluating WinHog information


What is WinHog
What is WinHog?

WinHog provides a graphical pie chart showing the relative to the sizes of the directories on a disk. Available displays included DOS file size, DOS FAT allocation usage and DOS FAT slack space -- really useful information for managing limited disk resources as today's applications grow in size.  Did you know that if your C: drive was a 540MB hard drive and you had a directory of 1000 icons in it, you would be taking up about 8,192,000 bytes of real disk space as opposed to the 762,000 bytes that the DIR command would show you?!

WinHog lets you look at your hard drive in a whole new way.  Several users have taken the effort to repartition their hard drives and get back many megabytes of disk space previously tied-up in useless slack space induced by the 16-bit DOS FAT structure.  Your results may vary.

A printed report can be created showing the results of the WinHog analysis - useful to see the changes on you system over time.

This program requires VBRUN300.DLL.

The shareware version of WinHog is distributed with an introduction form outlining the purpose of WinHog as well as the shareware registration requirements.  Once the OK box has been selected, WinHog displays a red message in the lower right corner saying "Unregistered WinHog".  The registered version of WinHog does not have the introduction form at startup and the message in the lower corner will have the registered owner's name displayed.  The registered version a displays available freespace byte count of in addition to the number of bytes used by the directories graphed.  Also, the allocation unit size for the selected drive is displayed in the upper right-hand corner.  These additional features are not left out to "cripple" WinHog but rather, the registered version uses a Setup program which installs the file SETUPKIT.DLL, a DLL used by the Setup program that WinHog can tap into to get free space information and allocation unit size.

A $10 registration fee is requested in order to get the latest registered version on diskette with all features enabled.  Registration information as well as comments, suggestions, bug reports and snide remarks can be sent to:

Michael D. Price, CSP

P.O. Box 149

Pickerington, Ohio   43147-0149

E-mail is always welcome at:

CompuServe 72202,22


Unregistered shareware version installation

If you are installing a version of WinHog downloaded from CompuServe, America Online, a local BBS or included on a shareware compendium CD-ROM, there are only a few simple steps you need to follow:

1. Create a directory on your hard drive to load WinHog into.

2. Expand the distribution file WINHOGxx.EXE (where xx is the release number like 40 for 4.0).  Typically, executing WINHOGxx.EXE will create all of the necessary files.  If the distribution file has been repackaged into a single file with an extension of .ZIP, .ZOO, .LZH, you must use the special decompression programs for those formats.

3. Create a Windows icon to execute WinHog.  Refer to the Microsoft Windows Users Guide for procedures on how to create program groups and icons.

That's it!  There are no special VBX or DLL files required for the shareware version.


Registered version installation

If you are installing a registered version of WinHog from a distribution diskette, follow these simple steps:

1. Insert the diskette into the appropriate drive.

2. From Program Manager, select File and then Run...

3. In the text box, enter "<drive>:SETUP" where <drive> is the diskette drive to be used (e.g., A, B)

4. Follow the procedures displayed by the SETUP program.


Uninstalling WinHog

WinHog is a simple application that can be easily removed.  Using File Manager, locate the directory where WinHog was installed.  Remove the files WINHOG.EXE. WINHOG.HLP and WINHOGxx.WRI where xx is the current release number.  Change into the WINDOWS\SYSTEM directory and remove the file HOGSETUP.EXE, the WinHog installation program.  Once these files have been deleted, remove the directory where WINHOG.EXE was installed, the Windows icon for WinHog and the Windows program that WinHog was installed into.  That's it.  There are no special VBX or DLL files specific to WinHog.

As with any Visual Basic program, there are several common files installed to the WINDOWS\SYSTEM directory but usually are used by other programs.  These files include VBRUN300.DLL, VER.DLL, SETUPKIT.DLL, DDEML.DLL.  I highly recommend NOT removing these files since other programs you have may require them for proper use.


Stacker and DriveSpace users

WinHog's effectiveness is diminished somewhat for users of Stacker and other popular disk compression programs.  Part of the thing that makes those products work is that they already recognize the slack space problem and have worked around it by creating one BIG compressed file that houses all of your files in it.  Calls to the operating system are intercepted and redirected to the compression software which get the requested data out of its compressed area and presents it to the program as if it had come from a regular disk.

Is WinHog useless?  Not hardly.  While the FAT Allocation and FAT Slack displays are no longer effective on a compressed drive, the DOS File SIze display still allows you to see what directories are the hogs on your system from a relative file size perspective.


Definition - Cluster

A value representing the size of a block of bytes set aside to hold a file on a DOS File Allocation Table (FAT) configured hard drive.  All files are allocated in multiples of the Allocation Unit size which must be 2048 bytes, 4096 bytes, 8192 bytes, 16384 bytes or 32768 bytes in size.  The size of the allocation unit is determined by the size of the disk partition according to the following table:

Hard drive size	Allocation unit size

0 - 15Mb	4096 bytes

16 - 127Mb	2048 bytes

128 - 255Mb	4096 bytes

256 - 511Mb	8192 bytes

512 - 1023Mb	16384 bytes

1024 - 2048Mb	32768 bytes

See Also: Definition - Allocation Unit


Definition - Allocation Unit

A value representing the size of a block of bytes set aside to hold a file on a DOS File Allocation Table (FAT) configured hard drive.  All files are allocated in multiples of the Allocation Unit size which must be 2048 bytes, 4096 bytes, 8192 bytes, 16384 bytes or 32768 bytes in size.  The size of the allocation unit is determined by the size of the disk partition according to the following table:

Hard drive size	Allocation unit size

0 - 15Mb	4096 bytes

16 - 127Mb	2048 bytes

128 - 255Mb	4096 bytes

256 - 511Mb	8192 bytes

512 - 1023Mb	16384 bytes

1024 - 2048Mb	32768 bytes

See Also: Definition - Cluster Size


Definition - Slack

The number of bytes that are unused between the number of size of the file (the actual number of characters/bytes in the file) and the allocated space.  For example, a 10 byte file on a hard drive with 8192 byte allocation units would have a slack of 8181 bytes (8192 - 10 bytes).


Definition - Partition

The area on a hard drive set aside by utilities (such as FDISK) that divides a hard drive into multiple drives usable by DOS.  Each partition can be set to sizes from a few bytes to a maximum of 2 gigabytes.


Definition - DOS File Size

The number of characters/bytes that are contained in a file.  This is usually the number reported by a DIR command from a DOS command prompt or through File Manager.


Help file produced by  HELLLP!, a product of Guy Software, on 02/17/95 for Unregistered User.

The above table of contents will be automatically completed and will also provide an excellent cross-reference for context strings and topic titles.  You may leave it as your main table of contents for your help file, or you may create your own and cause it to be displayed instead by using the I button on the toolbar.  This page will not be displayed as a topic.

HINT:  If you do not wish some of your topics to appear in the table of contents as displayed to your users (you may want them ONLY as PopUps), move the lines with their titles and contexts to below this point.  If you do this remember to move the whole line, not part.