Skip to content

How to capture all packets for issue resolution

tagyoureit edited this page Aug 25, 2021 · 10 revisions

Packet capture

Packet capture for issue resolution is made even easier in 6.0! Packet capture can be started from your current configuration or you can request that the app does a "reset" as if you were starting from a fresh place.

The first step in troubleshooting any problem is to make a backup

The output of the process is everything you need for submitting an issue. The final files will be stored in a directory under logs with the date time. EG logs\2020-05-25_21-07-43 (May 25, 2020 9:07:43 pm). In that directory will be the following:

  • A zip file containing the 5 items below (see notes in each section below for easy access to this file)
    1. config.json
    2. poolConfig.json as it is at the end of the capture
    3. poolState.json as it is at the end of the capture
    4. packetLog(date).log with a record of all the incoming & outgoing packets and incoming API calls
    5. consoleLog(_date).log which is a record of all the messages displayed in the console (with full logging)

There are three ways to complete the process:

  1. dashPanel
  2. Command line
  3. API

-dashPanel

If you are using dashPanel as your web client, you can create the capture files and have them downloaded to your browser.

  1. To begin, click the hamburger menu on the upper left corner of the dashPanel display to open the settings menu.

image

  1. Select the logging tab in the settings window and click the Capture Replay button. A dialog will be displayed that allows you to reload the configuration while capturing the communications.

image

! Please read this section so you don't accidentally erase any custom configurations you may have done.

@@ If you do erase these files, there will be a backup in the logs directory. @@

Under most circumstances a complete reload provides the most information for troubleshooting. This action is taken when the Capture Configuration Relaod checkbox is checked. Uncheck this box to capture a particular situation regarding your controller. For instance, the communications that occur when you turn a circuit on or off. When you are satisfied with your selections press the Begin Capture button.

image

  1. After pressing the Begin Capture button the Select Capture Options dialog will close and the capture will begin. At this time the Capture Replay Button will change to Cancel Capture. If the Capture Configuration Reload option is checked the software will start requesting configuration items from the equipment installed on your pool.

image

  1. Perform the necessary actions to capture the issue in its entirety. If the issue has to do with the configuration wait until the dashPanel header changes from Loading to Ready. When you are done capturing the information, navigate to the Logging tab on the Settings dialog and press the Cancel Capture button.

image

IMPORTANT: Do not leave the the software in the capture mode. This will continue to capture information at great detail until consumes all the available storage on the device that is running njspc.

  1. After you press the Cancel Capture button the results of the capture will be downloaded to your browser in the form of a .zip file. Upload that file with a detailed description of your issue. Depending on your browser platform, this will appear on the footer of the browser.

IMPORTANT: In case you didn't read the statement above. Do not leave the the software in the capture mode. This will continue to capture information at great detail until consumes all the available storage on the device that is running njspc.

API method

This method calls the same API's as the -webClient method but can be useful if you don't have the -webClient running.

Start the capture with either:

  • server:4200/app/config/startPacketCapture - this will call a "reset" of your poolController app. This method will make a backup of your poolConfig.json/poolState.json in the /data directory.

  • server:4200/app/config/startPacketCaptureWithoutReset - starts a capture with your existing configuration.

Stop the capture with:

  • server:4200/app/config/stopPacketCapture - This will stop the packet capture and download a zip file in your local browser with the name as the current date and a zip extension, eg 2020-05-25_21-09-43.zip.

Command line

To use this from the command line, set config.json property {log: {app: {captureForReplay: true}}}. This will capture the process from whatever state the app is in when you start it. EG if you have already initialized the pool controller it will start with your existing configuration files.

To start with a clean configuration, manually make a backup (or delete) your data\poolConfig.json and data\poolState.json files and start the app.

To stop the capture, do one of three things:

  1. Stop the application from the command line using Cmd-C or Ctrl-C (let it exit normally; do not kill the process).
  2. Use the stop method for the -webClient as listed above
  3. Use the stop method for the API's as listed above.