Loading...

Knowledge Center


How to use command line switches with McAfee Agent
Technical Articles ID:   KB52707
Last Modified:  3/2/2017
Rated:


Environment

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

Apple Mac OS X
Linux
Microsoft Windows
UNIX

Summary

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

Solution

When McAfee Agent is deployed from ePolicy Orchestrator (ePO), the following command line options are available for the McAfee Agent binary (CmdAgent.exe) to assist in communications with the ePO server and policy enforcement.
 
Windows switches

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

McAfee Agent 5.x:

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 upon receipt.
/s Display the Agent Monitor
/i Display McAfee Agent information
/h List all the switches with their description
/l Set the location of the log file

McAfee Agent 4.x:

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 upon 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.

McAfee Agent 5.x:

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 this 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 upon receipt.
-f Forward events to the ePO server
-i Display McAfee Agent information
-h List all the switches with their description
-l Set the location of the log file
McAfee Agent 4.x:

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 this 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 upon receipt.
-F Forward events to the ePO server
 
Syntax

IMPORTANT: Use only one switch per command. Do not run a command with multiple switches (for example, CmdAgent.exe /p /e /c). This can launch multiple concurrent Agent-to-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
 
File Locations

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
 

Solution

When McAfee Agent is either unmanaged or ePolicy Orchestrator managed, there are ma/cma command line options available to assist in 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 (default 5.x: /opt/McAfee/Agent/bin | 4.x: /opt/McAfee/cma)
/etc/init.d/ma configdir /etc/init.d/cma configdir Returns the McAfee Agent configuration directory (default 5.x: /etc/ma.d/ | 4.x: /etc/cma.d)
/etc/init.d/ma reload SOFTWAREID /etc/init.d/cma reload SOFTWAREID Loads/reloads the installed point product ePO plugin 
For example, /etc/init.d/ma reload LYNXSHLD1700 will unregister/register the VirusScan Enterprise for Linux 1.7 or 1.9 ePO plugin.
/etc/init.d/ma unload SOFTWAREID /etc/init.d/cma unload SOFTWAREID Unloads the installed point product ePO plugin 
For example, /etc/init.d/ma unload LYNXSHLD2000 will unregister the VirusScan Enterprise for Linux 2.0 ePO plugin.
NOTE: Available plugin folders will be located in the configuration directory and will depend on the point product (such as VirusScan Enterprise for Linux) installed on the system.

Previous Document ID

615525

Rate this document

Did this article resolve your issue?

Please provide any comments below

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.