Managing clients with the CLI


The clientmgr command tool can be used to manage the MVMM clients, that is, the Monitor Console and most CLI utilities.

Option

Description

--shutdown

Use --shutdown to shutdown all clients and new connections from any user. 
Clients will display the message immediately and will be terminated after the wait period (--wait or --wait-date). Any edits in progress by a client will be lost. This state persists when the pplication Service is restarted and remains in effect until it expires (--expire or --expire-date) --clear issued or --restrict, --notify, or another --shutdown.

clientmgr --shutdown message --wait seconds --expire seconds user

--restrict

Use --restrict to only allow clients of administrative users. Clients of 
non-administrative users will display the message immediately and be 
terminated after the wait period (--wait or --wait-date). Any edits in 
progress by a client will be lost. This state persists when the 
Application Service is restarted and remains in effect until it expires 
(--expire or --expire-date) --clear issued or --shutdown, --notify, or 
another --restrict.

clientmgr --restrict message --wait seconds --expire seconds user

--notify

Use --notify to display a message on all clients. This state persists when 
the Application Service is restarted and remains in effect until it 
expires (--expire or --expire-date) --clear issued or --shutdown, 
--restrict, or another --notify.

clientmgr --notify message --expire seconds user

--clear

Use --clear to cancel --shutdown, --restrict, or --notify.

clientmgr --clear user

--disable

Use --disable to prevent any new clients of a user from connecting. 
Connected clients of the specified user will be terminated immediately. 
Any edits in progress by a client will be lost.

clientmgr --disable user user

--enable

Use --enable to enable client connections for a user previously disabled.

clientmgr --enable user user

--status

Use --status to display the current message displayed to clients, whether 
client connections are shutdown and whether clients are restricted to 
administrative users. Use -v to list currently connected clients.

clientmgr --status user

Messages are displayed at the bottom of the frame of the Monitor Console and in a dialog when -d is specified. the message on the frame may be replaced while certain Monitor Console operations are in-progress but will return after the operation completes.

Note

Clients will be terminated when the Application Serivce is stopped regardless of whether there is any notification message or command pending if the terminate_clients_on_shutdown keyword of the [App_Service] stanza in services.cfg is true.

The following table contains the options that you can use with the clietmgr command:

Option

Description

--as-host host_name

Application Service host.

--as-port port_number

Application Service port.

--clear

Cancels --shutdown, --restrict or --notify before they
expire.

--disable user

Disables a user. Terminates connected clients and prevents
any new client connections of specified user.

--enable user

Enable client connections by specified user.

--expire seconds

Number of seconds before --shutdown, --restrict or --notify expires.

--expire-date "yyyy-MM-dd HH:mm:ss"

Date/Time when --shutdown, --restrict or --notify expire

--notify message

Sends message to connected clients. Message remains until expired or cleared.

--restrict message

Sends message to connected clients and restricts client connections to administrators until expired as specified by --expire or --expire-date or cleared using --clear. Waits for a period of time specified by --wait or --wait-date and then terminates any remaining clients of users that are not an administrator. Edits in progress will be lost for any clients terminated.

--shutdown message

Sends message to connected clients. Prevents new client connections. until expired as specified by --expire or --expire-date or cleared using --clear. Waits for a period of time specified by --wait or --wait-date and then terminates any remaining clients. Edits in progress will be lost for any clients terminated.

--status

Shows status (ie. whether shutdown in progress or client connections restricted) and connected clients.

--wait seconds

Number of seconds --shutdown, --restrict waits before terminating clients.

--wait-date "yyyy-MM-dd HH:mm:ss"

Date/Time --shutdown or --restrict waits before terminating clients.

-d

Display message in pop-up dialog as well as on frame.

-h|-?

Give this help summary.

-p password

Password.

-s|--stdin

Specify password via stdin. This is mutually exclusive with -p.

-v

Run in verbose mode.

Example

Notify users to save their work and terminates all clients after ten minutes as a maintenance is to be performed.

clientmgr --shutdown "Save your work and log off, MVMM maintenance to start in 10 minutes" --wait 600 --expire 605 -p BMCSOFTWARE SA

Terminate any clients logged in using a non-administrative user after five minutes and prevents such users from logging in until an expiration date/time. This allows administrative users to continue or log in to troubleshoot some issue with BMC Support for example.

clientmgr --restrict "Save your work and log off, administrative work to start in 5 minutes" --wait 300 --expire-date "2020-11-01 23:00:00" -p BMCSOFTWARE SA

Disable the user Bob which also terminates his connected Monitor Console as he left it running in edit mode and another user needs to make changes.

clientmgr --disable Bob -p BMCSOFTWARE SA

Enable the user Bob.

clientmgr --enable Bob -p BMCSOFTWARE SA

Notify all clients and shows in a dialog (-d option) in addition to the Monitor Console frame. clientmgr -d --notify "We are bouncing some agents, no need to worry." --expire 900 -p BMCSOFTWARE SA

Clears any shutdown, restrict or notify operation in progress. clientmgr -

-clear -p BMCSOFTWARE SA

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*