nerdexam
Cisco

350-401 · Question #416

Refer to the exhibit. An engineer must create a script that appends the output of the show process cpu sorted command to a file. Which action completes the configuration?

The correct answer is B. action 4.0 cli command "show process cpu sorted | append flash:high-cpu-file". To append the output of a show process cpu sorted command to a file using Cisco EEM, the action cli command is the correct method.

Submitted by priya_blr· Mar 6, 2026Automation

Question

Refer to the exhibit. An engineer must create a script that appends the output of the show process cpu sorted command to a file. Which action completes the configuration?

Exhibits

350-401 question #416 exhibit 1
350-401 question #416 exhibit 2

Options

  • Aaction 4.0 syslog command "show process cpu sorted | append flash:high-cpu-file"
  • Baction 4.0 cli command "show process cpu sorted | append flash:high-cpu-file"
  • Caction 4.0 ens-event "show process cpu sorted | append flash:high-cpu-file"
  • Daction 4.0 publish-event "show process cpu sorted | append flash:high-cpu-file"

How the community answered

(71 responses)
  • A
    7% (5)
  • B
    73% (52)
  • C
    3% (2)
  • D
    17% (12)

Why each option

To append the output of a `show process cpu sorted` command to a file using Cisco EEM, the `action cli command` is the correct method.

Aaction 4.0 syslog command "show process cpu sorted | append flash:high-cpu-file"

The `syslog` action in EEM is used for generating and sending syslog messages to a logging server or local buffer, not for executing arbitrary CLI commands on the device.

Baction 4.0 cli command "show process cpu sorted | append flash:high-cpu-file"Correct

In Cisco Embedded Event Manager (EEM), the `action cli command` keyword is used to execute any standard IOS or IOS-XE command-line interface command, including those with redirection operators like `| append`, which allows the script to gather and append command output to a specified file on the device's flash memory.

Caction 4.0 ens-event "show process cpu sorted | append flash:high-cpu-file"

`ens-event` is not a recognized or standard EEM action keyword for executing CLI commands; EEM actions are well-defined and follow specific syntaxes.

Daction 4.0 publish-event "show process cpu sorted | append flash:high-cpu-file"

`publish-event` is not a recognized or standard EEM action keyword for executing CLI commands; EEM actions are well-defined and follow specific syntaxes.

Concept tested: Cisco EEM CLI command execution

Source: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/eem/configuration/xe-3se/eem-xe-3se-book/eem-cli.html

Topics

#EEM#CLI action#IOS scripting#event manager

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice