ls-monitor Usage Guide

ls-monitor is a command-line tool accessible through a shell on a device. ls-monitor lets you see traffic going over the webOS service bus, similar to a network sniffer that lets you observe HTTP traffic.

Note
To access the device shell, you must connect to the device using the Secure Shell (SSH) protocol. For more details, see Network Setup.

Syntax

ls-monitor [OPTIONS...]
Note
Pressing the CTRL + C key breaks out of the monitoring.

Options

OptionParameterDescription

-h, --help

None

Displays the help.

-f, --filter

SERVICE_NAME

Filters by service name (or unique name).

e.g. -f com.webos.foo or --filter=com.webos.foo

-l, --list

None

Lists all luna services connected to a hub.

-s, --subscriptions

None

Lists all subscriptions in the system.

-i, --introspection

SERVICE_NAME

Lists service methods and signals.

e.g. -i com.webos.foo or --introspection=com.webos.foo

-v, --api-version

SERVICE_NAME

Displays the version of the service.

e.g. -v com.webos.foo or --api-version=com.webos.foo

-m, --malloc

None

Lists memory allocation data from all services in the system.

-d, --debug

None

Prints extra output for debugging monitor.

Caution
Be careful of unbounded memory growth when using the debug option.

-c, --compact

None

Prints compact output to fit terminal. The followings indicate the symbols in the message printed in the Console.

  • >* : Signal

  • >| : Cancel method call

  • > : Method call

  • < : Reply

e.g. TX c.w.s.activemanage >| TX c.w.s.activemanage/private/cancel

Note
This option takes precedence over the debug option.

-j, --json

None

Prints JSON-formatted output for easy parsing.

Note
This option takes precedence over the debug option.

-t, --sort-by-timestamps

None

Sorts output by timestamp instead of serial.

--dump-hub-data-csv

None

Dumps hub data in CSV format.

Parameters

ParameterDescription

SERVICE_NAME

Specifies the name of the service.

Examples

List all the luna services.

$ ls-monitor -l

HUB CLIENTS:
PID             SERVICE NAME                    EXE                                     TYPE                    UNIQUE NAME
988             com.webos.service.ime           /usr/sbin/MaliitServer                  static                  4bVcR4sI
1025            com.palm.webappmanager          /usr/bin/WebAppMgr                      static                  8uWCx2pk
988             com.webos.service.ime.globalplugin      /usr/sbin/MaliitServer                  static                  CLWsVoGP
378             com.webos.service.pdm           /usr/sbin/physical-device-manager       static                  EiUUeTcR
738             com.webos.media                 /usr/sbin/umediaserver                  static                  FTZBmz2f
998             com.webos.applicationManager    /usr/sbin/sam                           static                  QhqbAMrB
780             com.webos.service.downloadmanager       /usr/bin/LunaDownloadMgr                static                  0vamvcPe
376             com.webos.memorymanager         /usr/sbin/memorymanager                 static                  vq0S1Rpo
1038            com.webos.service.contextintentmgr      /usr/bin/node                           static                  UMMQl4Zt
...

List the luna services and searches for the services including ‘settings’ in the results.

$ ls-monitor -l | grep 'settings'
1025            com.webos.settingsservice.client        /usr/bin/WebAppMgr                      unknown/client only     rRW5wOi9
799             com.lge.settingsservice         /usr/sbin/SettingsService               static                  8CvddVIm
799             com.webos.settingsservice       /usr/sbin/SettingsService               static                  Hw11GM5M
988             com.webos.service.ime.settings  /usr/sbin/MaliitServer                  static                  j4sFEXuc
799             com.webos.service.settings      /usr/sbin/SettingsService               static                  NQwI0Mu5

List the luna services and searches for the services including ‘com.webos.service’ in the results.

$ ls-monitor -l | grep 'com.webos.service*'
988             com.webos.service.ime           /usr/sbin/MaliitServer                  static                  4bVcR4sI
988             com.webos.service.ime.globalplugin      /usr/sbin/MaliitServer                  static                  CLWsVoGP
378             com.webos.service.pdm           /usr/sbin/physical-device-manager       static                  EiUUeTcR
780             com.webos.service.downloadmanager       /usr/bin/LunaDownloadMgr                static                  0vamvcPe
1038            com.webos.service.contextintentmgr      /usr/bin/node                           static                  UMMQl4Zt
...

Request the version of the service name ‘com.webos.service.settings’.

$ ls-monitor -v com.webos.service.settings

com.webos.service.settings 1.0

List all service methods and signals registered by ‘com.webos.service.settings’.

$ ls-monitor -i com.webos.service.settings

METHODS AND SIGNALS REGISTERED BY SERVICE 'com.webos.service.settings' WITH UNIQUE NAME 'ypFkyFme' AT HUB

  "/":
      "getCurrentSettings": {"provides":["all","settings.read","settings"]}
      "resetSystemSettingDesc": {"provides":["all","settings"]}
      "getSystemSettings": {"provides":["all","settings.read","settings"]}
      "setSystemSettingDesc": {"provides":["all","settings"]}
      "setSystemSettingFactoryValue": {"provides":["all","settings"]}
      "setSystemSettingFactoryDesc": {"provides":["all","settings"]}
      "deleteSystemSettings": {"provides":["all","settings"]}
      "batch": {"provides":["all","settings"]}
      "getSystemSettingValues": {"provides":["all","settings.read","settings"]}
      "setSystemSettingValues": {"provides":["all","settings"]}
      "getSystemSettingFactoryValue": {"provides":["all","settings.read","settings"]}
      "setSystemSettings": {"provides":["all","settings"]}
      "getSystemSettingDesc": {"provides":["all","settings.read","settings"]}
      "resetSystemSettings": {"provides":["all","settings"]}
  "/internal":
      "getCurrentSubscriptions": {"provides":["all","settings"]}
      "instrument": {"provides":["all","settings"]}

Filter by service name ‘com.webos.service’ and searches for the logs including ‘com.webos.service.setting’ in the results without case-sensitivity restrictions.

$ ls-monitor --filter=com.webos.service | grep -i 'com.webos.service.setting*'

Contents