Writing Profiles statistics to a file 

Use statistics administrative commands to enable and disable the Profiles statistics collection application. No file checkout or server restart is required when using these commands.


Before starting

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


About this task

You can use script-based administrative commands to store the most recent Profiles statistics information that is being held in memory to a file.

You can specify the path and file name of where you want this file created, or when just a filename is specified, then the statistics file is created in the subdirectory specified by the statistics.filePath parameter. This parameter can be seen by using the ProfilesConfigService.showConfig() command.


Procedure

To write Profiles statistics to a file on demand...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("profilesAdmin.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.

  • Use the following command to dump the statistics to a specified file.

      ProfilesService.writeStatisticsToFile(String myStatsFile)

        Writes the most recent Profiles statistics to a file.

        The myStatsFile argument can include the full path and name of the statistics file. Note that the path must be relative to the server hosting the MBean used by this command.

        For example:

        ProfilesService.writeStatisticsToFile("d:/temp/profilesStats.txt")

        Note: Statistics information can also be viewed in a browser using the following URL:

        http://<server.company.com>/profiles/html/servermetrics.do


    Parent topic

    Monitoring statistics and metrics for Profiles


       

     

    });

    +

    Search Tips   |   Advanced Search