Loading...

Knowledge Center


How to use command-line switches with McAfee Agent
Technical Articles ID:   KB52707
Last Modified:  3/9/2018
Rated:


Environment

McAfee Agent (MA) 5.x, 4.x

Apple OS X, macOS
Linux
Microsoft Windows
UNIX

Summary

This article provides command-line switches for McAfee Agent in Windows, Mac, or UNIX environments.

When you deploy McAfee Agent from ePolicy Orchestrator (ePO), the following command-line options are available for the McAfee Agent binary (CmdAgent.exe) to set up communications with the ePO server and policy enforcement.

Click to expand the section you want to view:

Windows switches:
You can use the following switches with CmdAgent.exe on Windows clients.


NOTE: The switches are case sensitive.
 
Switch Description
/p Collect and send properties to the ePO server
/e Enforce policies locally
/c Check for new policies.

The agent contacts the ePO server for new or updated policies, then enforces them immediately on receipt.
/s Display the Agent Monitor
/i Display McAfee Agent information
/h List all switches with their description
/l Set the location of the log file


 

NOTE: The switches are not case sensitive.
 
Switch Description
/P Collect and send properties to the ePO server
/E Enforce policies locally
/C Check for new policies.

The agent contacts the ePO server for new or updated policies, then enforces them immediately on receipt.
/S Display the Agent Monitor


 

Mac or UNIX switches:
You can use the following switches on non-Windows clients by changing to the correct directory for Mac or UNIX and running sudo ./cmdagent.

NOTES:
  • The switches are case sensitive.
  • Switches on non-Windows systems use a - instead of /.
  • Although the Display Agent Monitor option is not available, you can still view current agent activity by using the following command:

    # tail -f /var/McAfee/agent/logs/masvc_<system name>.log

    NOTE: Run the command in a separate PuTTY/terminal session. You can issue the cmdagent command in one session and watch agent activity in the other.
Switch Description
-p Collect and send properties to the ePO server
-e Enforce policies locally
-c Check for new policies.

The agent contacts the ePO server for new or updated policies, then enforces them immediately on receipt.
-f Forward events to the ePO server
-i Display McAfee Agent information
-h List all switches with their description
-l Set the location of the log file


 
NOTES:
  • The switches are not case sensitive.
  • Switches on non-Windows systems use a - instead of /.
  • Although the Display Agent Monitor option is not available, you can still view current agent activity by using the following command:

    # tail -f /opt/McAfee/cma/scratch/etc/log

    NOTE: Run the command in a separate PuTTY/terminal session. You can issue the cmdagent command in one session and watch agent activity in the other.
Switch Description
-P Collect and send properties to the ePO server
-E Enforce policies locally
-C Check for new policies.

The agent contacts the ePO server for new or updated policies, then enforces them immediately on receipt.
-F Forward events to the ePO server

 

General Usage:

McAfee Agent 5.x
 
Operating System File Path File Name
Windows <Installation Path>\McAfee\Agent CmdAgent.exe
UNIX /opt/McAfee/Agent/bin CmdAgent
Mac /Library/McAfee/Agent/bin CmdAgent

McAfee Agent 4.x
Operating System File Path File Name
Windows <Installation Path>\McAfee\Common Framework\ CmdAgent.exe
UNIX /opt/McAfee/cma/bin CmdAgent
Mac /Library/McAfee/cma/bin CmdAgent


 
IMPORTANT: Use only one switch per command. Do not run a command with multiple switches (for example, CmdAgent.exe /p /e /c), as it can start multiple concurrent agent-server communications and can cause policy errors.

Correct syntax:
 
<installation path>\McAfee\Agent\CmdAgent.exe /p
 

Incorrect syntax:
 
<installation path>\McAfee\Agent\CmdAgent.exe /p /e /c


When McAfee Agent is unmanaged or ePO managed, there are ma/cma command-line options available to help with McAfee Agent service management and McAfee Agent installation.

MA 5.x Syntax:
 
/etc/init.d/ma <start|stop|restart|status|basedir|configdir|reload SOFTWAREID|unload SOFTWAREID>

MA 4.x Syntax:
 
/etc/init.d/cma <start|stop|restart|status|basedir|configdir|reload SOFTWAREID|unload SOFTWAREID>
 
MA 5.x Command MA 4.x Command Description
/etc/init.d/ma start /etc/init.d/cma start Starts McAfee Agent if stopped.
/etc/init.d/ma stop /etc/init.d/cma stop Stops McAfee Agent.
/etc/init.d/ma restart /etc/init.d/cma restart Stops/starts McAfee Agent.
/etc/init.d/ma status /etc/init.d/cma status Returns the status of McAfee Agent - stopped or running (with PID).
/etc/init.d/ma basedir /etc/init.d/cma basedir Returns the McAfee Agent installation folder.

The defaults are:
  • MA 5.x: /opt/McAfee/Agent/bin
  • MA 4.x: /opt/McAfee/cma
/etc/init.d/ma configdir /etc/init.d/cma configdir Returns the McAfee Agent configuration directory.

The defaults are:
  • MA 5.x: /etc/ma.d/
  • MA 4.x: /etc/cma.d)
/etc/init.d/ma reload SOFTWAREID /etc/init.d/cma reload SOFTWAREID Loads/reloads the installed managed product ePO plug-in.

For example, /etc/init.d/ma reload LYNXSHLD1700 unregisters or registers the VirusScan Enterprise for Linux (VSEL) 1.7 or 1.9 ePO plug-in.
/etc/init.d/ma unload SOFTWAREID /etc/init.d/cma unload SOFTWAREID Unloads the installed managed product ePO plug-in.

For example, /etc/init.d/ma unload LYNXSHLD2000 unregisters the VSEL 2.0 ePO plug-in.


NOTE: Available plug-in folders are located in the configuration directory and depends on the managed product (such as VSEL) installed on the system.


Back to Top
 

Previous Document ID

615525

Rate this document

Beta Translate with

Select a desired language below to translate this page.

Glossary of Technical Terms


 Highlight Glossary Terms

Please take a moment to browse our Glossary of Technical Terms.