問題
EEMスクリプトで、show process cpu sortedの出力をflash:high-cpu-fileへ追記したい。追加するactionはどれか。
- A
action 4.0 syslog command "show process cpu sorted | append flash:high-cpu-file" - B
action 4.0 cli command "show process cpu sorted | append flash:high-cpu-file" - C
action 4.0 cns-event "show process cpu sorted | append flash:high-cpu-file" - D
action 4.0 publish-event "show process cpu sorted | append flash:high-cpu-file"
正解:B
理由
| コマンド名・構文 | 作用・条件 |
|---|---|
action cli command |
IOSのCLIを実行するこの指定を使う。 |
CLIのappend指定が、出力をファイル末尾へ追加する。
選択肢ごとの説明
- A.
action 4.0 syslog command "show process cpu sorted | append flash:high-cpu-file" syslogはメッセージの記録に使い、このcli commandの実行構文ではない。
- B.
action 4.0 cli command "show process cpu sorted | append flash:high-cpu-file" cli commandはIOSのコマンドを実行するactionで、append先のファイルも指定している。
- C.
action 4.0 cns-event "show process cpu sorted | append flash:high-cpu-file" cns-eventはCNSイベントの送信に使うactionである。
- D.
action 4.0 publish-event "show process cpu sorted | append flash:high-cpu-file" publish-eventはイベントの発行に使い、文字列をIOS CLIとして実行しない。