Courseiva
Splunk Basics and Interface NavigationmediumMultiple ChoiceObjective-mapped

SPLK-1001 Splunk Basics and Interface Navigation Practice Question

An analyst needs to count the number of distinct IP addresses that accessed a server. Which approach is most efficient?

⚠ Common exam trap

It's easy for candidates to confuse `count` with `dc()` or think `dedup` is the standard way to count unique values, not realizing that `dc()` is purpose-built for efficient distinct counting in Splunk.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

| stats dc(src_ip)

`| stats dc(src_ip)` uses the `dc()` (distinct count) function to directly calculate the number of unique IP addresses in a single pass over the data. This is the most efficient approach as it avoids creating intermediate events or performing separate deduplication steps, leveraging Splunk's streaming stats for minimal memory and CPU overhead.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • | stats count by src_ip

    Why it's wrong here

    The `| stats count by src_ip` command counts the number of events per src_ip, not the number of distinct IPs. It returns a count for each IP, not a single total.

  • | dedup src_ip | stats count

    Why it's wrong here

    The `| dedup src_ip | stats count` command first deduplicates events by src_ip, then counts the resulting events. This is less efficient than `dc()` because it requires an intermediate dedup step and more memory.

  • | stats dc(src_ip)

    Why this is correct

    The `| stats dc(src_ip)` command correctly uses the distinct count function to compute the number of unique src_ip values in one efficient pass.

  • | fields src_ip | sort | uniq

    Why it's wrong here

    The `| fields src_ip | sort | uniq` command extracts only the src_ip field, sorts, and then uses `uniq` to remove consecutive duplicates. This is inefficient because sorting requires heavy resources and `uniq` only removes adjacent duplicates, requiring a prior sort.

About these practice questions

One of 502 original SPLK-1001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SPLK-1001 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1001 exam.