Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record: Handle Kernel config not available #102

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Record: Handle Kernel config not available #102

merged 1 commit into from
Nov 29, 2023

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.

@@ -6,7 +6,7 @@ use crate::{PERFORMANCE_DATA, VISUALIZATION_DATA};
use anyhow::Result;
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

@RamaMalladiAWS RamaMalladiAWS 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?

@@ -121,7 +121,17 @@ impl CollectData for SystemInfo {

match rt.block_on(EC2Metadata::get_instance_metadata()) {
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
8 checks passed
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