Generating Reports


ARD contains a number of very useful reports:

  • System Overview

  • File Search

  • Software Version

  • Software Difference

  • Storage

  • USB Devices

  • FireWire Devices

  • Memory

  • PCI Cards

  • Network Interfaces

  • Network Test

  • Administration Settings

  • Application Usage

  • User History

Each of these reports can be useful for different users at different times. For example, software licensing managers will find the Software Version and Application Usage reports very convenient. They can use these reports to find out how many copies of each version of a package are installed throughout an entire organization, how often they are used, and by whom.

Each of these reports can also be exported into tab- or comma-separated files by clicking the Export button on the report output window. These files can be imported into many popular programs such as Microsoft Excel for further data refinement. The resulting data could be used to generate HTML documents in Pages or iWeb describing features of your network.

Gathering System Information

System Overview Reports can be used by most system administrators to gather information about the physical properties of all of the computers in your network, such as features and serial numbers.

Not only is this useful for inventory control, but it can be used to determine if your computers meet the minimum hardware requirements for a piece of software.

Gathering Software Information

Many reports are available for gathering software information. The most basic of these is a simple Software Version Report. Running this report allows you to compare the versions of up to ten applications between your administrator computer and all of the selected target computers.

The Software Difference Report can provide a quick list of how your target computers differ from your administrator computer or, better yet, how they differ from an image that has been deployed to all client computers. Unlike the Software Version Report, which can only report on applications, the Software Difference Report can report on applications, fonts, packages, and more. Also, the Software Difference Report will list all of the applications that differ, not just the ten you select as in the Software Version Report.

If you're just looking for the presence of one file, you can use the File Search report. This report possesses many of the same options as a local Find File operation.

Lastly, you can use the Application Usage Report to find out how your software is being used. This report is very powerful in that it tells you the following about every use of the software on the target computers:

  • Who ran the software?

  • When was it started?

  • How long was it running?

  • How long was it in the foreground?

Tip

Each computer builds a cache of all of its files and their versions once a day. Unless you need data that is current up to the minute, you should NOT select the option to "Rebuild data for reports" for file and software searches. Leaving this option deselected will result in reports that are nearly instant, while rebuilding the reports will take around 5 minutes on average, depending on the speed of your computers and the number of files on their drives.


Running Spotlight Searches

New in ARD 3 is the ability to carry out Spotlight Searches for files. As you may already know, Spotlight has the ability to search for much more than filenames. Spotlight can search the contents of files along with their metadata. Using Spotlight through ARD behaves the same as it does locally. You have the option to limit your search to the entire computer, the startup disk, the home folder, or a specified folder. While the search is being performed, you'll see a summary of how many hits were found on each of the target computers, and at the bottom you'll see the individual hits. By highlighting files, you also have the option of opening them, copying them to your administrator workstation, or deleting them from the target computers.

Using SQL to Access Report Data

ARD stores all of its report data in a PostgreSQL database on your administrator workstation (or on your central ARD task server, if used). With minor configuration changes, you can access all of your report data in custom ways from external applications or from your Web server. By default, only the ARD administrator utility has access to the PostgreSQL database. To allow others to connect, follow these steps.

1.

Quit the Remote Desktop Admin utility.

2.

In System Preferences > Sharing, deselect the Remote Desktop service if it is selected.

3.

Enter the following command (you should know how to use the command line utility vi. If not, consult the vi man pages):

 sudo vi /var/db/RemoteManagement/RMDB/rmdb.data/pg_hba.conf 


4.

At the bottom of the file, enter the following line:

 host ard ard 127.0.0.1 255.255.255.255 password 


5.

Save the file.

6.

Enter the command:

 sudo vi /var/db/RemoteManagement/RMDB/rmdb.data/postgresql.conf 


7.

Find the line that contains "#tcpip_socket = false". Remove the "#" at the beginning of the line, and change "false" to "true" so the line looks like this:

 tcpip_socket = true 


8.

Save the file.

9.

In System Preferences > Sharing, select the Remote Desktop service, if desired.

10.

Launch the Remote Desktop Admin utility.

11.

Run some reports to populate the database.

12.

Find your local PostgreSQL database password by typing:

 sudo cat /private/var/db/RemoteManagement/RMDB/passwd.txt 


Make a note of the output of this command. This is the password you'll need to connect to your PostgreSQL database.

You can now run SQL commands against the PostgreSQL database on your machine. This could come from Web applications on a local Web server, or from the command line with commands such as this:

[View full width]

/System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/psql -p 5433 -h localhost -U ard -c "SELECT * FROM systeminformation" ard


When prompted, type the password you found in the passwd.txt file.

You can modify the above command to output the data in other formats. To output the data in an HTML table, add -H to the arguments for psql, or to output the data in a tab-separated list, add -A -F $'\t'.

For more information on the psql command, consult its man page with the command

 man -M /System/Library/CoreServices/RemoteManagement/rmdb.bundle/man psql 


Tip

The configuration steps and usage outlined above provide the most generic interface to your PostgreSQL data. If your usage of the PostgreSQL database is limited to only human interaction by those who are administrators on your system, you can simplify the above steps significantly. Don't modify either of the conf files. Preface the psql command with sudo, and omit the -p 5433 -h localhost arguments. This will create a local domain socket connection to your database rather than a TCP/IP connection. This is more secure and requires fewer changes, but is more difficult to access by other systems such as your Web server.


By harnessing the full power of SQL, you can create any custom report you desire based on the data stored in the PostgreSQL database. A sample query showing how you can join many fields together into one report is shown below:




Apple Training Series(c) Mac OS X v10. 4 System Administration Reference
Apple Training Series: Mac OS X v10.4 System Administration Reference, Volume 2
ISBN: 0321423151
EAN: 2147483647
Year: 2006
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net