The gasadmin command

The gasadmin tool is provided as an administrative command for the Genero Application Server.

With this tool, you can:

Syntax

gasadmin [options]

Syntax with reset-log command

The reset-log command reconfigures the logs for one or more sessions. Options are described in Table 2. This feature was added in the version 3.00 (MR) maintenance release.
gasadmin reset-log [options ] [session-id ...]

Options

Table 1. gasadmin options
Option Description

-p directory

--as-directory directory

Specify the Genero Application Server directory.

-f configuration-file

--configuration-file configuration-file

Specify the configuration file to use. If not specified, the default configuration file, FGLASDIR/etc/as.xcf, is used.

-E resourceName=value

--resource-overwrite resourceName=value

Define or overwrite a resource.
Important: If you start the dispatcher with the option (-E) to override the $(res.appdata.path) location, you must also override the resource when using the gasadmin command to deploy an archive.
For example, specify the same option with both commands:
  • Starting the dispatcher:

    httpdispatch -E res.appdata.path=/work/tmp/gas/appdata

  • Deploying the application:

    gasadmin -E res.appdata.path=/work/tmp/gas/appdata --deploy-archive myapp.gar

-c

--configuration-check

Check the configuration file, then exit.

-e

--configuration-explode

Explode the GAS configuration into files, one for each application.

-t

--configuration-explode-external

Explode the given external configuration file in current directory. See Explode configuration file into an XML file

-r

--configuration-expand-resources

Expand resources and replace with real values. Used with --configuration-explode or --configuration-explode-external. See Explode configuration file into XML files

-d dispatcher-name

--dispatcher dispatcher-name

Used by session-related options to select the target dispatcher.

-K -d dispatcher-name

--kill-all-sessions

--kill-all-sessions --dispatcher dispatcher-name

Terminate (kill) all sessions of a specified dispatcher.
Note: The option -d <dispatcher_name> is optional. If omitted, the option kills all sessions of all dispatchers.

-k session-id -d dispatcher-name

--kill-session session-id --dispatcher dispatcher-name

Terminate (kill) the requested session id of the specified dispatcher.
Important: The option -d <dispatcher_name> is required, as the same session identifier can exist for the various dispatchers.
See Kill dispatcher sessions

-X

-X -d dispatcher-name

--ping-all-sessions

--ping-all-sessions --dispatcher dispatcher-name

Ping all active sessions of the specified dispatcher.
Note: The option -d <dispatcher_name> is optional. If omitted, the option pings all active sessions of all dispatchers.

-x session-id -d dispatcher-name

--ping-session session-id --dispatcher dispatcher-name

Ping the request session id of the specified dispatcher.

-l

-l -d dispatcher-name

--list-sessions

--list-sessions --dispatcher dispatcher-name

List all sessions of the specified dispatcher.
Note: The option -d <dispatcher_name> is optional. If omitted, the option lists all sessions of all dispatchers.
See List dispatcher sessions

--dispatcher dispatcher-name

--monitorsession-id

Retrieve monitor information for a session. Information is displayed in XML format on the standard output. See Monitor session.
Note: Monitor feature was added in 3.00 (MR) maintenance release.

-z paths, [...]

--compress-resources paths, [...]
Compress the resources located in specified paths. The path separator is a comma (,). See Compress resources.

-C

--session-cleanup
Clear remaining Linux®/UNIX™ domain sockets.

-h

--help

Display help information.

-V

--version

Display GAS version information. See Display GAS version information

-q

--quiet

Silent mode.

--deploy-archive archive_file

Unpack the specified archive content into the deployment directory.

--undeploy-archive archive_file

Undeploy the specified archive.

--enable-archive archive_file

Expose all services and applications contained in the specified archive.

--disable-archive archive_file

Unexpose all services and applications contained in the specified archive.

--list-archives

List all archives deployed on the Genero Application Server.

--clean-archives

Clean up all undeployed archives.
--xml-output List all archives and applications deployed on the Genero Application Server. Only compatible with archive options.

-y

--yes

Do not prompt for confirmation.
--monitor Retrieve monitor information for a session. Information is displayed in XML format on the standard output. See Monitor session.
Table 2. gasadmin reset-log options
Option Description
-h

--help

Displays help for the reset-log command.
-q

--quiet

Operates in silent mode
-p directory_name

--as-directory directory_name

Specify the Genero Application Server directory.
-f configuration-file

--configuration-fileconfiguration_file_name

Specify the configuration file to use. If not specified, the default configuration file, FGLASDIR/etc/as.xcf, is used.

-E resource_name=value

--resource-overwrite resource_name=value

Define or overwrite a resource.

-d dispatcher-name

--dispatcher dispatcher_name

Target the dispatcher - used by session-related options to select the target dispatcher.

--output-type <arg>

Log type (CONSOLE or DAILYFILE), default is DAILYFILE.

--output-path <arg>   

Log output directory for DAILYFILE, default is the current directory.

--raw-data-max-length <arg>

Data max length, default is -1.

--format <arg>   

Log format, columns to output, the default is: time event-type event-params.

--categories <arg>

Log categories to enable, the default is: GAS ACCESS PROCESS ERROR
Note: The reset-log feature is not enabled with java-j2eedispatch, as it does not store sessions on disk.

Usage Examples

Explode configuration file into an XML file

Explode external application configuration file demo/Card.xcf and expand its resources and its parent's resources into an XML file.
gasadmin -t demo/Card

Explode configuration file into XML files

Explode external application configuration file demo/Card.xcf. Replace its resources and its parent resources with real values, and expand them into individual XML files.
gasadmin -r -t demo/Card

List dispatcher sessions

List all sessions having as1.xcf as configuration file for dispatcher httpdispatch
gasadmin -X -f as1.xcf -d httpdispatch

Kill dispatcher sessions

Kill the session with the id "d98290172c8f7c0d861db329f1ce6597" that has as1.xcf as its configuration file, and isapidispatch as its dispatcher.
gasadmin -k d98290172c8f7c0d861db329f1ce6597 -f as1.xcf -d isapidispatch

Monitor session

This example shows how to use the --monitor option to retrieve information to monitor a specified session. Information on the current status of the dispatcher is sent to the standard output in XML format during the session.
gasadmin --dispatcher <dispatcher> --monitor <session-id>
The -d or --dispatcher option is required to specify the dispatcher.

Compress resources

Compress the resources located in the listed paths.
gasadmin -z FGLASDIR/app,$FGLASDIR/services,$FGLASDIR/web, FGLASDIR/tpl

Reset logs

gasadmin reset-log --output-type CONSOLE --categories "ALL DEBUG" 1170f560ca4d03fd3aa4bbac75da97e9 
The example command uses options for --output type and --categories. The output type effects where the logs are sent, either the console or the daily log file (DAILYFILE). The categories effects the type of logs output. These changes only effect the specified session.
Tip: You can specify multiple sessions by listing the session ids, separated by spaces.

If an option (for example, --output_path) is not specified, gasadmin tries to use the LOG configuration from the as.xcf. If not found in the as.xcf (for example, CONSOLE may not be configured in as.xcf), default values are used.

Display GAS version information

gasadmin -V 

Image shows GAS version and build information displayed when the gasadmin -V command is run

Figure 1. Sample GAS Version Information