Filesystem reports

Doug asked me to let him know how many Lotus Approach DBF and APR files are present on our file servers at present. He was hoping that the report might be something that he could “save to file”.

After a lot of mucking around with gnuwin32 tools, I decided that the best “quick fix” was to do the following. The Windows Server Recource Kit is required:

  1. As someone with read access to the entire filesystem, run:
    dir /s /t:c \filesshared | qgrep /y -E “.dbf .apr” > dbreport.txt
    alternatively, one could use the gnu “ls” command to get similar output in a slightly ritcher format.
    the /t:c switch forces dir to display the last-changed timestamp rather than the default last-accessed. The /y performs a case insensitive grep. -E parses results on the end of the line only.
    note as a fun side project, I had to disable viewing of the ~snapshot directories on our NetApp filer while the query was running, as the dir command insisted on parsing through all of the snapshot directories. Aargh!
  2. next, I import the txt file into excel. I used the “Data->Filter->Advanced Filter” menu to mask the many duplicate records in the sheet, then past the filtered view into a new sheet.
  3. To get a better grip on the actual number of production Approach databases, I saved the filtered sheet to a new text file then ran the following command:
    type dbreport-filt.txt | qgrep -y -E “.apr” > dbreport-apronly.txt
    this generates a list of only the *.apr records in the file. I then re-import into a new Excel sheet. All three sheets have been shipped off to Doug for digestion.

Doug has asked for a new report. I thought I would try doing it with “POWERSHELL” this time:

gci \filesshared -recurse -include *.apr,*.mdb -exclude ~snap* | Select-Object LastWriteTime,Length,Name | export-csv dbhunt.csv

We are using the “get-childobject” (alias “dir” or “gci”) to get a recursive (-recurse) directory listing of \filesshared. We are excluding those pesky ~snapshot directories (-exclude ~snap*), and filtering for only APR and DBF files (-include *.apr,*.mdb – (NOTE: I got the expression via trial-and-error… I cannot find a good reference on PowerShell regular expressions and wild card matching. I would have thought “$.apr|$.dbf” would work, but it did not.)). We the pipe (|) to select-object and choose only the LastWriteTime, Length, and Name attributes of the listed files. Finally we pipe to “export-csv” to sent the search results to a csv file.

I am using the PowerShell 1.0 RC1 refresh for this report. Note that I am able to catch both APR and MDB file types in a single pass, and also I am able to filter the output to include only the attributes that I want. Finally, I can export directly to a CSV file for import into a spreadsheet. I suppose I could also have used the “sort” features in the pipeline to segregate the APR and MDB files to the top and bottom of the output file, but I will just do that in the spreadsheet. Another sort option would be to “remove duplicates”, but this could result in some data loss as many DBs may have the same name, but with different content. Somthing I could not figure out how to do in the time available how to auto-format the “Length” data in Megabytes… I know I saw this in a PowerShell demo, but I cannot find my notes, and I can’t glean this from the online documentation).

Ooh! Even better:
gci \filesshared -recurse -include *.apr,*.dbf,*.mdb -exclude ~snap* | Select-Object DirectoryName,Name,Extension,Length,CreationTime,LastWriteTime | sort DirectoryName | Export-Csv \filesflex1$qtree-home10ddsvwinhomedbhunt.csv

In this pass, I have added additional properties to the “select-object” command which I want exported to my CSV report. These properties are the “DirectoryPath” to the file, in addition to it’s creation time. Also, I have a separate field for “extension” to ease in reporting later on. I also have added a “sort” command to the pipeline so that the output file will already be sorted by DirectoryName.

I think this will take about 3 hours to run, so I am just going to dump the report straight to Doug’s home directory. Huzzah!

SAV10 migration steps

Starting the SAV10 server infrastructure process…

  1. Download and install LU Admin v1.5.4, required to fetch SAV10 updates for our internal LiveUpdate FTP server. Installed over existing version, purged and re-downloaded alll current SAV/NAV related files, and also updates for Symantec products commonly used at UVM. note: needed to set the LU Admin tool to “download previously retrieved updates” during the initial download… otherwise it refuses to get new definitions!
  2. Uninstall Quarantine, Quarantine Console, and Symantec System Center on Norton1, Norton2.
  3. Attempt to run SAV installer by running setup.exe at the root of the SAV10 CD… setup appears to run, but all it actually does is remove files from the server! Aargh! Attempt to use the “Server Deployment” tool to push updates to Norton1 and Norton2… the wizard forces me to re-create the “UVM Antivirus 1” group, and to specify a username/password for the group… I do this. The wizard then copies installer files to the hosts, and then hangs for half an hour. I am forced to cancel the installation.
  4. reboot both systems, then attempt to run the regualr installer again. This time, the installer works (although SAV is now installed in the default “%systemdrive%program filesSymantec AntiVirus” folder, instead of the original folder from the SAV 9 install. Hmmm….
  5. install Central Quarantine on Norton1. Install system center and quarantine console on norton1 and norton2
  6. Upon launching SSC, there are now two “UVM AntiVirus 1” groups, each with one of the NORTON parent servers. The group with NORTON1 is non-functional, as it reports that NORTON1 is DOWN (even though Norton1 appears to be running all of its Symantec services). Aargh!
  7. Fix hangs when attempting to view NORTON1 history files by archiving old (and probably corrupt log files. To do this, I stop the SAV service, then remove all files from c:documents and settingsall usersapplication datasymantecsymantec antivirus corporate edition7.5logs.
  8. SSC listing of NORTON1 system status as “down” could be the result of server overload… see symantec KB article:

    nope… that did not help at all…
  9. called Symantec tech support. They speculated that the upgrade of the “UVM AntiVirus 1” server group was botched. The workaround was to first move the functioning “Norton2” server to a new, separate server group. Next, we remove the HKLMsoftwareintellandeskvirusprotect6domaindata registry key (after backing up the registry). This effectively lobotomizes Norton1, and makes it forget that it is the primary server in the AV group. After a reboot, the UVM AV 1 group is again accessible via SSC. We re-promote NORTON1 to primary server of the group, and move Norton2 back in. Our AV group policies are totally shot, so I need to rebuild all policies. Joy.
  10. Scheduled tasks on the operating systems have stopped running. Reason is that path to .exe files changed with the upgrade. I have updated all of the executable paths.
  11. Roaming services have been implemented… this will allow SAV 9+ clients to load balance between NORTON1 and NORTON2 parent servers.
  12. Important SAV10 server settings… new feature is “performance tuning”… I needed to activate management of back-level SAV clients. Also, I set options to skip over clients that are not checking in with the parent server. This will allow faster push of updated definitions as they become avialable.