Home

 

View and collect Profiles metrics

Enter a URL to view a standard set of Profiles metrics, or use administrative commands to collect metrics for the Profiles feature and write them to a file. No file checkout or server restart is required when using these commands.

To edit configuration files, use wsadmin. See Start the wsadmin client for information about how to start the wsadmin command-line tool.


There are two ways to view and collect Profiles metrics. The simplest way is to enter the following URL and view the full set of metrics available for the feature:

http://<servername.com:port>/profiles/html/servermetrics.do where <servername.com:port> is the appropriate host name and port number for your server.

The metrics in the first two columns display. The third column is the corresponding wsadmin command that you can use to retrieve individual commands or aggregate metrics in a file, as described below. For performance reasons, the metrics are cached for one hour. Within that hour, if you try to gather metrics using the Metrics URL or the wsadmin command, the metrics numbers are the same because they are read from the cache. After the cache expires, then the next time you request metrics data, the database is queried for the updated information and the updated numbers are returned.


Profiles metrics

Number of Description wsadmin command
Employees The total number of employees in the profiles database. profiles.metric.employee.count
Employees with a background supplied The number of employees in the profiles database who have supplied background details in their profile. profiles.metric.background.count
Employees with a picture supplied The number of employees in the profiles database who have provided a picture as part of their profile. profiles.metric.picture.count
Employees with pronunciation supplied The number of employees in the profiles database who have uploaded a pronunciation file to their profile. profiles.metric.total.pronunciation.count
Employees logged in today The number of employees logged in to Profiles in the last day. profiles.metric.users.authenticated.today
Employees logged in the last week The number of employees logged in to Profiles in the last week. profiles.metric.users.authenticated.last.7.days
Employees logged in the last month The number of employees logged in to Profiles in the last month. profiles.metric.users.authenticated.last.30.days

To exercise greater control over what Profiles metrics you want to view or to write them to a file, follow these steps to use wsadmin commands for managing metrics:

  1. Open a command window and start wsadmin so that you can access the Profiles configuration files.

    1. Access the Profiles configuration files:

  2. Enter one of the following commands to collect the current metrics:

    • To collect all of the metrics at once and have them returned as a hash table:

      ProfilesMetricsService.fetchMetrics()

    • To collect one or a subset of metrics:

      ProfilesMetricsService.fetchMetric("<metric_to_fetch>")

      where the <metric_to_fetch> is one of the metrics defined in the metrics table above.

      For example:

        ProfilesMetricsService.fetchMetric("profiles.metric.employee.count") ProfilesMetricsService.fetchMetric("profiles.metric.background.count") ProfilesMetricsService.fetchMetric("profiles.metric.picture.count") ProfilesMetricsService.fetchMetric("profiles.metric.total.pronunciation.count") ProfilesMetricsService.fetchMetric("profiles.metric.users.authenticated.today") ProfilesMetricsService.fetchMetric("profiles.metric.users.authenticated.last.7.days") ProfilesMetricsService.fetchMetric("profiles.metric.users.authenticated.last.30.days")
        

  3. Use one of the following commands:

    • To write all of the metrics to a file:

      ProfilesMetricsService.saveMetricToFile("<file_name>", <number>,"all")

      where you provide values for the following variables:

      • <file_name>. Full path to a text file in which to store the metric information.

      • <number>. The number of entries to persist in the file. If you specify 20, and add one new entry to the file, the file retains the last 19 entries and adds your new entry. Any older entries are deleted.

      For example:

        ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/AllProfs.txt”,40,“all”)
        

  4. To write one metric to a file:

    ProfilesMetricsService.saveMetricToFile("<file_name>", <number>,"<metric_to_save>")

    where you provide values for the following variables:

    • <file_name>. Full path to a text file in which to store the metric information.

    • <number>. The number of entries to persist in the file. If you specify 20, and add one new entry to the file, the file retains the last 19 entries and adds your new entry. Any older entries are deleted.

    • <metric_to_save>. Metric that you want to write to the file.

      For example:

        ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/empCnt.txt”,40, 
        “profiles.metric.employee.count”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/BkGndCnt.txt”,40, 
        “profiles.metric.background.count”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/PicCnt.txt”,40, 
        “profiles.metric.picture.count”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/PronunCnt.txt”,40, 
        “profiles.metric.total.pronunciation.count”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/UsrCntToday.txt”,40, 
        “profiles.metric.users.authenticated.today”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/UsrCntThisWeek.txt”,40, 
        “profiles.metric.users.authenticated.last.7.days”) ProfilesMetricsService.saveMetricToFile(“C:/Connections/metrics/UsrCntThisMonth.txt”,40, 
        “profiles.metric.users.authenticated.last.30.days”)
        

  5. To write a subset of metrics to a file:

    1. Define an ArrayList Java™ object variable named fldkeys.

    2. Add the subset of metrics that you want to write to a file to the array. For example:

        from java.util import ArrayList fldkeys=ArrayList() fldkeys.add("profiles.metric.employee.count") fldkeys.add("profiles.metric.background.count") fldkeys.add("profiles.metric.picture.count")
        

    3. Use the following command to write the subset of metrics to a file:

      ProfilesMetricsService.saveMetricsToFile(“C:/Connections/metrics/MetList.txt”,60,fldkeys)


Monitor statistics and metrics for Profiles

Collect metrics


+

Search Tips   |   Advanced Search