Page 1 SpaceMap - Tutorial =================== How to Use This Tutorial ------------------------ This tutorial is composed of several lessons. Each lesson starts by describing a specific problem (or situation) you might encounter in your day-to-day work and then shows how SpaceMap can be used to solve that problem. Whenever you see the 'þ' symbol this indicates something you should do such as select a menu choice, push a button, or type information. Each lesson is self-contained. You exit the tutorial after each lesson and restart it to continue with the next lesson. Each lesson is designed to take about ten minutes to complete. There are three lessons, so the total time is about 30 minutes. Lesson 1 - Early Space Exploration ---------------------------------- Situation: You've just purchased this nifty new OS/2 utility called SpaceMap and you'd like to use it to explore space usage on your C: drive. Solution: þ Start Spacemap (Press the "Start" button) First, let's explore the contents of SpaceMap's main window. Just below the Menu Bar is an Information Area in which SpaceMap will keep you informed about its activities and the results of its work. Right now, this area contains the greeting "Welcome to SpaceMap!". Below the information area is a box labeled "Parent directory". In this box you type the full path name of a directory you would like SpaceMap to analyze. Right now, this box contains the "C:\" directory path. Below the Parent Directory box is a list box in which SpaceMap displays the results of its most recent scan of the parent directory. Each row in this list box represents an immediate sub-directory (or child directory) of the parent directory. For each child directory, three pieces of information are available: the number of bytes in that directory, the directory name, and the relative size of the directory. Right now, this list box is empty. þ Press the "Scan" button SpaceMap scans the parent directory and displays the results. Notice that the Information Area now informs you about the number of items and total bytes found in the parent directory. In this case, an item can be either a file or a directory pointer (e.g. ".", "..", or a sub-directory name). These two numbers (items and bytes) don't just describe the contents of the parent directory. They represent a grand Page 2 total of all items and all space used by the parent directory itself AND all of its descedent directories and their contents. You might have noticed that while SpaceMap was scanning, it was displaying the name of each of the descendent directories in the Information Area. The second line of the Information Area informs you about the total capacity of the disk drive containing the parent directory and about the amount of space available for use on that drive. Incidentally, SpaceMap determines space usage for a file based on the number of disk sectors "allocated" for that file not just the number of bytes of data contained in the file. For this reason, SpaceMap is a more accurate measure of space usage on a disk drive than is the OS/2 system command "DIR". Note however, that space used by file pointers and extended attributes IS measured by SpaceMap in bytes used, not sectors allocated. Well, let's get back to the display screen. The "scan results" list box now contains several rows of information. For example, the first row tells you that the parent directory has a child directory called "OS2". That child directory is currently using 42,167,584 bytes of space on the disk drive. Again this number represents not only the space in the OS2 directory, but also the grand total of all space used by OS2's descendent directories. Also, you can see that relative to the total space scanned in the parent directory, the OS2 directory is using 59.9% of that space. The "Relative size" column also gives you a bar chart which visually compares the space used by each child directory in the list box. You might have noticed that one row in the list box is for a directory called "". This row represents the space used by the contents of the parent directory NOT counting any space used by its descendents. Thus, the list box shows you how the total space used by the parent directory is divided up among the parent and its immediate child directories. Notice that some directories in the list box have "" in front of their name. This indicates that a child directory has children itself. You can see that the OS2 directory apparently has its own descendents. Let's see what they are. þ Make sure the OS2 directory is selected (highlighted) þ Press the "Open" button When the scan is finished notice that the parent directory is now "C:\OS2" - the full path name of the OS2 directory. The child directory we "opened" is now considered the Page 3 "parent" at this level in the directory tree. Let's continue digging into this part of the directory tree and see what we can find. þ Click on the MDOS directory þ Press the Open button Now we can see the contents of the MDOS directory. þ Double-click on the WINOS2 directory Double-clicking is a short-cut for the "Open" button. You can now see that we are at the bottom of this part of the directory tree since no directories have a "" by their name. Let's go back to the previous level. þ Press the "Back" button Notice that the list box and the Information Area look just the way we left them before we opened the WINOS2 child directory. þ Press the "Back" button þ Press the "Back" button again The parent directory should now be "C:\". So far, we have examined the immediate child directories of a selected directory by using the "Open" button. Suppose, however, that you now wanted to look at a list of the actual files in a directory, not just its child directories. þ Make sure the OS2 directory is selected (highlighted) þ Press the "Files" button SpaceMap now displays a second window which lists the files contained in the "C:\OS2" directory. This list contains just the files in OS2 and NOT any of the files in OS2's descendent directories. That is why the "total bytes" number in the Information Area of the "Files" window is smaller than OS2's "bytes" number in the old "Directories" window. Each row in this new list box has a column showing the number of bytes used by that file, the file's name, the date of the last "write" operation on that file, and the file's attributes. File attributes can be S - System, H - Hidden, R - Read Only, and A - Archive. See your OS/2 system manuals for further information on file attributes. Page 4 Let's modify the way the contents of the list box are displayed. þ Select the "View" menu bar choice þ Select "Date" þ Select "Creation" Now the list box shows us the date on which each file was created. By default the files are listed in descending order by the "Bytes" column so that the largest files are at the top of the list. Let's change that sort order. þ Select the "View" menu bar choice þ Select "Sort by" þ Select "Name" The list is now sorted by the "File" column. Notice that some of the files in the list have "<>" around their names. This indicates that these items are not real data files, but rather "directory pointers". Let's go back to our old friend, the "Directory List" window. þ Press the "Close" button Just as we could modify the display of the list box in the "Files" window, we can do the same thing in the "Directories" window. þ Select the "View" menu bar choice þ Select "Size relative to" þ Select "Total bytes on disk" Now the "Relative size" column represents the percent of space on the disk drive used by each directory. You can see that the OS2 directory (including its descendents) is currently using 57.5% of the disk drive's capacity. þ Select the "View" menu bar choice þ Select "Sort by" þ Select "Name" This concludes the lesson. þ Select the "File" menu bar choice þ Select "Exit" þ Press the "Yes" button Lesson 2 - Running Outer Space ------------------------------ Situation: You're installing some new software on your C: drive. But you find yourself running out of space. You know there are probably some files already on the C: drive which you could erase or move to another disk drive. This would free Page 5 up enough space to install your new software. The question is "What files?" and "Where are they located?". Let's assume your new software requires 6,000,000 bytes of free space before it will install itself. Solution: þ Start Spacemap (Press the "Start" button) First, let's find out exactly how much free space you have on the C: drive right now. þ Press the "Scan" button When the scan is finished you can see that the C: drive has 3,044,352 bytes available. So you know that you must free up about 3,000,000 more bytes in order to install your software. Right now, SpaceMap is displaying the contents of the root directory (C:\) on the C: drive. You can see that almost 60% of the occupied space under the root directory is located in the OS2 directory. But, you know that most of the files under the OS2 directory are probably necessary to operate the system, so you decide to look elsewhere for potential files to erase or move. Let's examine the PMTAPE directory. This directory is used by the PMTAPE program which backups your data to a tape cartridge. þ Double-click on the PMTAPE directory Looks like most of the space is in the LIB directory. Let's see what files are in LIB. þ Make sure LIB is selected þ Press the "Files" button Now you remember that the \PMTAPE\LIB directory contains files which hold information about the contents of previous tape backups you have done. Perhaps we could erase some of the older files. þ Select the "View" menu bar choice þ Select "Sort by" þ Select "Date (ascending)" You can see that several files where last written to in the month of June (this tutorial edition considers today's date to be August 10, 1993). You decide that these files can be safely erased. Before we can erase these files, we need to mark them. Marking a file places a "Û" symbol by a file's name. Note that a file can only be marked if it already has a "" by its name. In the "Files" window, the "" indicates that the item is a data file and not a directory pointer. Data files can be marked and/or edited. Page 6 Let's mark all files with a June date. For each file with a June date, follow this procedure: þ Select the file using the up and down arrow keys þ Press the "M" key If you marked any non-June file by mistake, simply select that file and press the "M" key again. Now that we have our candidate files marked, let's see just how much total space they are using. þ Select the "Marked" menu bar choice þ Select "Sum" You can now see that the marked files are using 1,511,424 bytes of space. þ Press the "OK" button You decide to erase the marked files. þ Select the "Marked" menu bar choice þ Select "Erase..." A pop-up window appears allowing you to set various parameters for the erase operation. Since the "erase file" function is disabled in this tutorial edition: þ Press the "Cancel" button þ Press the "Close" button þ Press the "Back" button Looking over the other contents of the root directory, you do not see any more likely candidates. Suddenly, you remember that there might be several files on this disk drive which contain the OS/2 online manuals. Perhaps you could survive with just the written manuals for now. You know that these manual files have a name of the form *.INF. The question is "Where are the *.INF files?" and "How much space are they using?". þ Select the "View" menu bar choice þ Select "Criteria..." SpaceMap displays a notebook window which allows you to specify the filter criteria used in scanning for files. þ Select the "Masks" notebook tab SpaceMap displays the "File Masks" notebook page. This page lets you specify which files are (or are not) included in the scan results based on their file name. There are two parts to this notebook page. On the left is a section Page 7 labeled "Include". This section lets you create a list of file name masks which define files to be "included" in the scan results. On the right is a secton labled "Exclude" which, as you might have guessed, lets you create a list of file name masks for files to "exclude" from the scan results. Each section is composed of a list box containing a list of file masks. Above the list box is a "File mask" box in which you can edit a file mask using the keyboard. Between the "File mask" box and the list box are three buttons which let you (1) add the contents of the "File mask" box to the list box, (2) change the selected row in the list box to match the text in the "File mask" box, or (3) delete the selected row from the list. þ Click on the Include File Mask Box (the one with *.*) þ Press the Backspace key þ Type "INF" þ Press the "Change" button The Include list box should now contain one row, namely "*.INF". Since you know that you are looking just for files that are online manuals and not for directory pointers, let's exclude directory pointers from the scan results. þ Select the "Attributes" notebook tab. þ Click on the "Directory Pointers" check box Now let's save the current state of the "Criteria" notebook. þ Press the "OK" button at the bottom of the window Since you have changed the scan criteria, the old scan results are no longer valid. Therefore, SpaceMap automatically runs a new scan. The results indicate that there are 3,162,688 bytes used by the online manual files. þ Double-click on the OS2 directory þ Make sure the BOOK directory is selected þ Press the "Files" button SpaceMap displays the files in the BOOK directory which match your search criteria. You decide that all of these files could be moved to another disk drive on your computer. þ Press the "Close" button You decide to move all matching files in the BOOK directory to another disk drive. At this point, SpaceMap will give you the option of moving a directory and just its matching files or a directory and all of its files (matching or Page 8 not). þ Select the "Selected" menu bar choice þ Select "Move..." A pop-up window appears allowing you to set various parameters for the move operation. Since the "move directory" function is disabled in this tutorial edition: þ Press the "Cancel" button As a result of erasing some files in the \PMTAPE\LIB directory and moving all matching files in the \OS2\BOOK directory to another disk drive, you have now freed up a total of 3,218,496 additional bytes. That means the C: drive now has a grand total of 6,262,848 bytes available. As you may recall we were going for a total of at least 6,000,000 free bytes. You are ready to try installing your original software package again. Thanks to SpaceMap you were able to quickly and easily locate the best files to move or erase without having to look at every directory on the disk drive with the old system "DIR" command! By the way, think what SpaceMap could do for an overworked LAN Administrator trying to manage multiple shared disk drives and lots of unpredictable users at the same time. SpaceMap lets an adminstrator see exactly how much space is being used by each user (under the user's high-level directory), by each LAN application, and by system overhead functions. If a high-level directory looks suspiciously large, the administrator can dig down into that directory's contents level by level uncovering a precise picture of space usage. Let's say the Information Systems Department wants to add a new client/server application to your LAN. They give you an estimate of their required space. Unfortunately, none of your LAN disk drives has enough free space to hold the application. Using SpaceMap you can quickly determine how to re-balance the load between your disk drives and free up enough space for the new application. This concludes the lesson. þ Select the "File" menu bar choice þ Select "Exit" þ Press the "Yes" button Lesson 3 - A Brief History of Space ----------------------------------- Situation: You're sound sleep in bed at night. Suddenly, you wake up in a panic wondering about your LAN disk drives. How much space will need to be archived next time? Do I have enough Page 9 tape cartridges for the backup? How many files were actually accessed in the last week? Can we justify all that space to the Boss? How much space is tucked away in extended attributes? Where are all the .CMD files? What's in them? The list goes on and on. Finally, you remember that you just bought SpaceMap last week. You're back to catching Z's again. Solution: þ Start Spacemap (Press the "Start" button) Let's find out how much space needs to be archived the next time you run an incremental backup of your disk drive. þ Select the "View" menu bar choice þ Select "Criteria" þ Select the "Attributes" notebook tab þ Click on the "On" radio button for "Archive" þ Press the "OK" button at the bottom of the window þ Press the "Scan" button You will need enough diskettes to backup 3,576,836 bytes. Let's find out how many files have been accessed within the last seven days. þ Select the "View" menu bar choice þ Select "Criteria" þ Press the "Defaults" button at the bottom of the window þ Select the "Last access" notebook tab þ Click on the "Accept any date" check box þ Click on the "From" section "Today minus" radio button þ Set the "From" section "Today minus" spin button to "7". þ Press the "OK" button at the bottom of the window Looks like 384 files and/or directory pointers were touched in the last week. Let's see how much space is taken up by extended attributes. þ Select the "View" menu bar choice þ Select "Criteria" þ Press the "Defaults" button at the bottom of the window þ Select the "Sum" notebook tab þ Click on the "Data" check box þ Press the "OK" button at the bottom of the window SpaceMap says 698,233 bytes are in extended attributes. Of that figure, how much is just for extended attributes attached to directory pointers? Page 10 þ Select the "View" menu bar choice þ Select "Criteria" þ DO NOT press the "Defaults" button this time þ Select the "Attributes" notebook tab þ Click on the "Files" check box þ Press the "OK" button at the bottom of the window It would appear that most of the extended attributes on directory pointers are located in the "OS!2 2.0 Desktop" directory. This make sense because that is where OS/2 stores much of the configuration data about your Workplace Shell desktop. þ Make sure the OS!2 2.0 Desktop directory is selected þ Press the "Files" button You can see that some directory pointers use up to 9,000 bytes of extended attribute space. þ Press the "Close" button Now, let's find out how many .CMD files we have on this disk drive. þ Select the "View" menu bar choice þ Select "Criteria" þ Press the "Defaults" button at the bottom of the window þ Select the "Masks" notebook tab þ Click on the Include File Mask Box (the one with *.*) þ Press the Backspace key þ Type "CMD" þ Press the "Change" button þ Press the "OK" button at the bottom of the window Hmmm, looks like lots of .CMD space is used in the SQLLIB directory. þ Double-click on the SQLLIB directory þ Make sure the directory is selected þ Press the "Files" button Wow! The "DBME.CMD" file is really big for a .CMD file. Let's see what's in it. Note: the "edit file" function is disabled in this tutorial edition. In the actual SpaceMap product you would now press the "Edit" button to invoke your favorite editor program, passing it the name of the "DBME.CMD" file. After viewing the contents of the file (and possibly changing them), you would close the editor and return to the SpaceMap "File" window. þ Press the "Close" button þ Press the "Back" button SpaceMap provides you with numerous other functions we have not covered in this brief tutorial. Page 11 For example: - You can save a result list to a named file. - You can print a result list. - You can cut and paste between the Parent Directory box and the OS/2 Clipboard. - You can save a set of "view parameters" (i.e. criteria, sizing, sorting, etc.) to a named file and later reload it again. This is useful for creating many specialized "views" of your disk drives which can be loaded and scanned at the touch of a button. - You can print a list of marked files. - You can even... (Well, that's in the next release!). Finally, let's take a look at life without SpaceMap. þ Select the "View" menu bar choice þ Select "Criteria" þ Press the "Defaults" button at the bottom of the window þ Select the "Include" notebook tab þ In the "Child Directories" section: Click on the "Include size" check box þ Press the "OK" button at the bottom of the window The result list now contains a row for each child directory in the root directory. But since SpaceMap is no longer summarizing ALL space under each directory (just the space in the directory itself), you're back to wondering "Exactly where IS all that space on my disk drive?". Is most of it really in CMLIB? Or is it in OS2? Or is it maybe even in SPOOL? Who knows? SpaceMap - the professional space management tool! This concludes the lesson. þ Select the "File" menu bar choice þ Select "Exit" þ Press the "Yes" button þ Press the "Cancel" button