Skip to content

Conversation

@janaknat
Copy link
Contributor

Also,

  • use WARN in Perf Stat when asking to change system settings.
  • use WARN in SystemInfo when IMDS fails.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@janaknat janaknat requested a review from a team as a code owner November 29, 2023 17:18
_ => match os_error.raw_os_error().unwrap() {
libc::EMFILE => error!(
"Too many open files. Increase limit with `ulimit -n`"
libc::EMFILE => warn!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be needed for any basic collection to work in APerf? So, this has to be an error and not warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't prevent APerf from running.

use chrono::prelude::*;
use ctor::ctor;
use log::{error, trace};
use log::{trace, warn};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, can we summarize what all are not collected (for which warnings are issued) when requirements are not met and a message is dumped to console or a file/ log?

Copy link
Contributor

@RamaMalladiGH RamaMalladiGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings can be summarized to the user on the console or a log file?

Ok(s) => self.set_instance_metadata(s),
Err(e) => error!("An error occurred: {}", e),
Err(e) => {
warn!("An error occurred: {}", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it, a warning or an error? :p

"Unable to get instance metadata: {}" would be more meaningful since there isn't going to be much context to understand what was being attempted when the failure is reported.

Also,
* use WARN in Perf Stat when asking to change system settings.
* use WARN in SystemInfo when IMDS fails.
@janaknat janaknat merged commit a082b46 into aws:main Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants