Splunk Core Certified Power User — Question 151

Which of the following expressions could be used to create a calculated field called megabytes?

Answer options

Correct answer: C

Explanation

The correct answer is C because it properly uses the 'eval' command to create a new field named 'megabytes' that calculates its value based on 'sc_bytes(1024/1024)'. Option A is incorrect because it does not assign the result to a field, while B simply calls the function without any assignment. Option D incorrectly assigns the result directly to 'megabytes' without using the 'eval' command.