View and collect Forums metrics 

Use the ForumsMetricsService commands and Server Metrics page to monitor product usage, and to make configuration adjustments when necessary.


Before starting

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


About this task

Metrics are frequency data that are recorded about the database state. There are two ways to view and collect metrics. The simplest way is to enter the URL below or select Server Metrics from the site footer to see some of the most relevant metrics available for the application:

http://<servername.com:port>/forums/html/servermetrics

where <servername.com:port> is the appropriate host name and port number for your server.

Notes:

Table 1. Forums metrics

Metric Description
forums.metric.distinct.owners Total number of forum owners
forums.metric.total.creators Total number of forum posters
forums.metric.total.entries Total number of forum posts
forums.metric.total.forums Total number of forums
forums.metric.total.loggedin1day Number of unique users who logged in today
forums.metric.total.loggedin30days Number of unique users who logged in last 30 days
forums.metric.total.loggedin7days Number of unique users who logged in last 7 days
forums.metric.total.members Total number of login users
forums.metric.total.topics Total number of forum topics


Procedure

You can also follow these steps to return metrics using administrative commands. No file check out or server restart is required when using these commands.

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("forumsAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Enter the commands below to retrieve metrics.

    • To collect all the metrics in a single operation, and have them returned as a hash table:

        ForumsMetricsService.fetchMetrics()

    • To collect one or a subset of metrics:

        ForumsMetricsService.fetchMetric("<metric_to_fetch>")

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

        For example:

        ForumsMetricsService.fetchMetric("forums.metric.total.forums")

  3. Use one of the following commands to write the metrics to a file.

    • To write all the metrics to a file:

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

    • where you provide values for the following variables:

      • <file_name>. Path to a file in which to export the metrics. Metrics are exported in comma separated value (CSV) format. If you specify a file name with a .csv extension, it is possible to open it as a spreadsheet. See Importing statistics and metrics into a spreadsheet.

          Tip: If the metrics are being kept over a period of time, consider using a universal file path so that the command can be run on any node with the metrics saved to the same file. For example:

          ForumsMetricsService.saveMetricToFile(“//9.32.168.90/c$/IBM/LotusConnections/Data/forums/metrics/AllForums.csv”, 40, “all”)

      • <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:

        ForumsMetricsService.saveMetricToFile(“C:/IBM/LotusConnections/metrics/AllForums.csv”,40,“all”)

    • To write one metric to a file:

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

    • where you provide values for the following variables:

      • <file_name>. Path to a file in which to export the metrics. Metrics are exported in comma separated value (CSV) format. If you specify a file name with a .csv extension, it is possible to open it as a spreadsheet. See Importing statistics and metrics into a spreadsheet.

          Tip: If the metrics are being kept over a period of time, consider using a universal file path so that the command can be run on any node with the metrics saved to the same file. For example:

          ForumsMetricsService.saveMetricToFile(“//9.32.168.90/c$/IBM/LotusConnections/Data/forums/metrics/AllForums.csv”, 40, “all”)

      • <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>. The metric that you want to write to the file.

          For example:

          ForumsMetricsService.saveMetricToFile(“C:/IBM/LotusConnections/metrics/AllForum.csv”, 40, 
          “forums.metric.total.forums”)

    • 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("forums.metric.total.forums")
          fldkeys.add("forums.metric.total.members")
          fldkeys.add("forums.metric.distinct.owners")

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

          ForumsMetricsService.saveMetricsToFile(“C:/IBM/LotusConnections/metrics/MetList.csv”,60,fldkeys)


Parent topic

Administer Forums

Related concepts
Collecting metrics


Related tasks


Importing statistics and metrics into a spreadsheet

Related reference
Roles


   

 

});

+

Search Tips   |   Advanced Search