exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 2 question 39 discussion

Actual exam question from Microsoft's AZ-400
Question #: 39
Topic #: 2
[All AZ-400 Questions]

HOTSPOT
-

You have an Azure virtual machine named web1.

You need to query the amount of free memory that was available on web1 during the past seven days. The solution must meet the following requirements:

• Display the data as a time chart.
• Calculate the average value per hour.

How should you complete the KQL query? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zellck
Highly Voted 1 year, 10 months ago
1. TimeGenerated > ago (7d) 2. bin(TimeGenerated, 1h) https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/agofunction Subtracts the given timespan from the current UTC time. https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binfunction Rounds values down to an integer multiple of a given bin size.
upvoted 17 times
...
Tyler2023
Highly Voted 1 year, 9 months ago
Let's say we have Perf Logs from Jan 1-31 and Today's date: Jan 31 Target perf logs are within 7 days ago, which is Jan 25 so the logic will be, Perf logs where TimeGenerated > Jan 25
upvoted 12 times
Dankho
3 months, 4 weeks ago
Thanks guy who will never read my thanks!
upvoted 1 times
...
...
MrAZ105
Most Recent 7 months ago
let startTime = ago(7d); Perf | where TimeGenerated >= startTime | where Computer == "web1" and ObjectName == "Memory" and CounterName == "Available Bytes" | summarize avgFreeMemory = avg(CounterValue) by bin(TimeGenerated, 1h) | project TimeGenerated, avgFreeMemoryMB = avgFreeMemory / 1024 / 1024 // Convert bytes to megabytes | render timechart with ( title = 'Average Free Memory on web1 Over Last 7 Days', ytitle = 'Free Memory (MB)', xaxis = 'Time', series = ['avgFreeMemoryMB'] )
upvoted 1 times
...
chloaus
1 year ago
TimeGenerated > ago(7d) Bin(TimeGenerated, 1h) Syntax ago(timespan) timespan: The interval to subtract from the current UTC clock time now(). Example All rows with a timestamp in the past hour: T | where Timestamp > ago(1h) https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/ago-function
upvoted 1 times
Yindave
1 year ago
Yeah i agree < means less then, so "less then 7 days ago" means the last 7 days, Since the question states 'the past 7 days' > ago(7d) is correct.
upvoted 1 times
...
...
ozbonny
1 year, 2 months ago
correct
upvoted 1 times
...
yana_b
1 year, 8 months ago
Provided answer is correct
upvoted 2 times
...
CHAMPIONAGAIA
1 year, 9 months ago
The first answer should be : 1. TimeGenerated < ago (7d) It s said "Past 7 days" so less than 7 days
upvoted 6 times
resonant
1 year, 9 months ago
The greater the value of TimeGenerated is, the closer to the future it is. Therefore it must be TimeGenerated > ago (7d) instead of what you say. Your answer would include all data since the creation of the universe until 7 days ago, instead of being since 7 days ago until now.
upvoted 14 times
...
...
kay000001
1 year, 10 months ago
Perf | where TimeGenerated > ago(7d) | where Computer == "web1" | where CounterName == "Available MBytes" | summarize avg(CounterValue) by bin(TimeGenerated, 1h) | render timechart
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago