IBM
C9010-022 · Question #138
What will the following script have NMON do? #!/bin/ksh : ${SNAPSHOT=300} : ${FLAGS="-tdMAV^"} ALLDAY_SECONDS=86400 HOUR=$(date +%H); MINUTE=$(date +%M); SECOND=$(date +%S) let SECONDS_LEFT_IN_DAY="…
The correct answer is C. Collect data every 5 minutes until midnight. See the full explanation below for the reasoning.
Question
What will the following script have NMON do?
#!/bin/ksh
: ${SNAPSHOT=300}
: ${FLAGS="-tdMAV^"}
ALLDAY_SECONDS=86400
HOUR=$(date +%H); MINUTE=$(date +%M); SECOND=$(date +%S)
let SECONDS_LEFT_IN_DAY=" $(ALLDAY_SECONDS - (60 * 60 * $HOUR) - (60 *
$MINUTE) - $SECOND)"
let SAMPLES="${SECONDS_LEFT_IN_DAY} / $SNAPSHOT"
nmon -f $FLAGS -s $SNAPSHOT -c $SAMPLES -m /var/log/nmon
Options
- ACollect data every hour in /var/log/nmon
- BCollect data every 5 minutes for 24 hours
- CCollect data every 5 minutes until midnight
- DCollect 360 data snapshots in /var/log/nmon
How the community answered
(30 responses)- A13% (4)
- B7% (2)
- C73% (22)
- D7% (2)
Community Discussion
No community discussion yet for this question.