-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
} | ||
_ => match os_error.raw_os_error().unwrap() { | ||
libc::EMFILE => error!( | ||
"Too many open files. Increase limit with `ulimit -n`" | ||
libc::EMFILE => warn!( |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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}; |
There was a problem hiding this comment.
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?
There was a problem hiding this 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?
src/data/systeminfo.rs
Outdated
@@ -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); |
There was a problem hiding this comment.
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.
Also,
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.