Home

 

View and collect Home page metrics

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

To use administrative commands to manage metrics, 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 metrics. The simplest way is to enter the following URL and view the full set of Home page metrics available for the feature:

http://<servername.com:port>/homepage/web/servermetrics

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.


Home page metrics

Metrict_admin_homepage_backup_index.html Description wsadmin command
Total number of unique users Total number of unique users who have accessed the Home page feature. homepage.metric.totals.user
Total number of deployed widgets Total number of widgets deployed in the Home page. homepage.metric.totals.available.widgets
Total number of enabled widgets Total number of widgets currently enabled and available to users on the Home page. homepage.metric.totals.enabled.widgets
Total number of visitors in the past 24 hours Total number of unique visitors to the Home page in the past 24 hours. homepage.metric.totals.visitorPast24Hours
Total number of visitors in the past hour Total number of unique visitors to the Home page in the past hour. homepage.metric.totals.visitorPastHour
Total number of visitors in the past 7 days Total number of visitors in the past 7 days. homepage.metric.totals.visitorPast7Days
Total number of visitors in the past 30 days Total number of visitors in the past 30 days. homepage.metric.totals.visitorPast30Days

The metrics are cached for one hour. For performance reasons, they are not collected from the database more than once an hour.

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

  1. Start wsadmin so that you can access the Home page configuration file:

    1. After the wsadmin command environment has initialized, use one of the following commands to initialize the Home page environment and start the Home page script interpreter:

      • Standalone deployment:

        execfile("homepageAdmin.py")

      • Network deployment:

        execfile("WAS_HOME\profiles\Dmgr01\config\bin_lcadmin\homepageAdmin.py")

  2. Enter one of the following commands to collect the current metrics for the Home page.

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

      HomepageMetricsService.fetchMetrics()

    • To collect one or a subset of metrics:

      HomepageMetricsService.fetchMetric("<metric_to_fetch>")

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

      For example:

        HomepageMetricsService.fetchMetric("homepage.metric.totals.user") HomepageMetricsService.fetchMetric("homepage.metric.totals.available.widgets") HomepageMetricsService.fetchMetric("homepage.metric.totals.enabled.widgets") HomepageMetricsService.fetchMetric("homepage.metric.totals.visitorPast24Hours") HomepageMetricsService.fetchMetric("homepage.metric.totals.visitorPastHour") HomepageMetricsService.fetchMetric("homepage.metric.totals.visitorPast7Days") HomepageMetricsService.fetchMetric("homepage.metric.totals.visitorPast30Days")
        

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

    • To write all of the metrics to a file:

      HomepageMetricsService.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:

        HomepageMetricsService.saveMetricToFile("“C:\Connections\metrics\AllComms.txt”,40,“all”)
        

  4. To write one metric to a file:

    HomepageMetricsService.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:

      HomepageMetricsService.saveMetricToFile("“C:\Connections\metrics\TotUser.txt”,40, 
      “homepage.metric.totals.user”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotAvailWidg.txt”,40, 
      “homepage.metric.totals.available.widgets”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotEnabWidg.txt”,40, 
      “homepage.metric.totals.enabled.widgets”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotVis24Hr.txt”,40, 
      “homepage.metric.totals.visitorPast24Hours”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotVisHr.txt”,40, 
      “homepage.metric.totals.visitorPastHour”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotVisWk.txt”,40, 
      “homepage.metric.totals.visitorPast7Days”) HomepageMetricsService.saveMetricToFile(“C:\Connections\metrics\TotVisMnth.txt”,40, 
      “homepage.metric.totals.visitorPast30Days”)
      

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

    • Define an ArrayList Java™ object variable named fldkeys.

    • 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("homepage.metric.totals.available.widgets") fldkeys.add("homepage.metric.totals.enabled.widgets") fldkeys.add("homepage.metric.totals.visitorPast24Hours")
        

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

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


Administer the Home page using wsadmin

Collect metrics


+

Search Tips   |   Advanced Search