app2container inventory command - AWS App2Container

app2container inventory command

Records all Java processes (Linux) or all IIS websites and Windows services (Windows) that are running on the application server.

Syntax

app2container inventory --type [iis | service | java] [--nofilter] [--help]

Parameters and options

Parameters

--type [iis | service | java]

Use this parameter to specify the application type (required). For .NET applications running on Windows, you can specify an IIS web application (iis), or a Windows service (service). For Java applications running on Linux, you must specify java.

Options

--nofilter

For applications running on Windows, this option prevents App2Container from filtering out default system services when building the inventory output. This can be used for complex Windows .NET applications that have dependent web apps that need to be included in the container.

--help

Displays the command help.

Output

Information about the Java processes or IIS websites is saved to the inventory.json file in one of the following locations:

  • Linux: /root/inventory.json

  • Windows: C:\Users\Administrator\AppData\Local\.app2container-config\inventory.json

The application ID that is used by other App2Container commands is the key for each application object in the JSON file. The application objects are slightly different depending on your application language and the application server operating system. Choose the operating system tab for your application in the Examples section below to see the differences.

Examples

Choose the operating system tab for the application server or worker machine where you run the command.

Linux

Each Java process has a unique application ID (for example, java-tomcat-9e8e4799). You can use this application ID with other AWS App2Container commands. Inventory information is saved to /root/inventory.json.

The following example shows the inventory command with no additional options.

$ sudo app2container inventory { "java-jboss-5bbe0bec": { "processId": 27366, "cmdline": "java ...", "applicationType": "java-jboss" }, "java-tomcat-9e8e4799": { "processId": 2537, "cmdline": "/usr/bin/java ...", "applicationType": "java-tomcat" } }
Windows

Each IIS website has a unique application ID (for example, iis-smarts-51d2dbf8). You can use this application ID with other AWS App2Container commands. Inventory information is saved to C:\Users\Administrator\AppData\Local\.app2container-config\inventory.json.

The following example shows the inventory command with no additional options.

PS> app2container inventory { "iis-smarts-51d2dbf8": { "siteName": "Default Web Site", "bindings": "http/*:80:,net.tcp/808:*", "applicationType": "iis", "discoveredWebApps": [] }, "iis-smart-544e2d61": { "siteName": "smart", "bindings": "http/*:82:", "applicationType": "iis", "discoveredWebApps": [] }, "service-colorwindowsservice-69f90194": { "serviceName": "colorwindowsservice", "applicationType": "service" } }