diff --git a/Cargo.lock b/Cargo.lock index f119137867..73402f428f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -143,7 +143,7 @@ checksum = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -424,9 +424,9 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.1" +version = "2.33.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" +checksum = "10040cdf04294b565d9e0319955430099ec3813a64c952b86a41200ad714ae48" dependencies = [ "ansi_term 0.11.0", "atty", @@ -699,7 +699,7 @@ checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -876,7 +876,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -1006,7 +1006,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -2624,7 +2624,7 @@ dependencies = [ "pest_meta", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -2722,7 +2722,7 @@ checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -2820,27 +2820,25 @@ dependencies = [ [[package]] name = "proc-macro-error" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc175e9777c3116627248584e8f8b3e2987405cabe1c0adf7d1dd28f09dc7880" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", "version_check 0.9.2", ] [[package]] name = "proc-macro-error-attr" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc9795ca17eb581285ec44936da7fc2335a3f34f2ddd13118b6f4d515435c50" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", - "syn-mid", "version_check 0.9.2", ] @@ -3424,7 +3422,7 @@ checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -3447,7 +3445,7 @@ checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -3535,9 +3533,9 @@ checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" [[package]] name = "signal-hook-registry" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +checksum = "a3e12110bc539e657a646068aaf5eb5b63af9d0c1f7b29c97113fad80e15f035" dependencies = [ "arc-swap", "libc", @@ -3640,7 +3638,7 @@ dependencies = [ [[package]] name = "sqlx" version = "0.4.0-beta.1" -source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#b4bff0127a21f9399fa6a676d7d9100e429dc62e" +source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#73b571295c1903263707c5ed680d856ee8864e32" dependencies = [ "sqlx-core", "sqlx-macros", @@ -3649,7 +3647,7 @@ dependencies = [ [[package]] name = "sqlx-core" version = "0.4.0-beta.1" -source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#b4bff0127a21f9399fa6a676d7d9100e429dc62e" +source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#73b571295c1903263707c5ed680d856ee8864e32" dependencies = [ "atoi", "base64 0.12.3", @@ -3694,7 +3692,7 @@ dependencies = [ [[package]] name = "sqlx-macros" version = "0.4.0-beta.1" -source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#b4bff0127a21f9399fa6a676d7d9100e429dc62e" +source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#73b571295c1903263707c5ed680d856ee8864e32" dependencies = [ "cargo_metadata", "dotenv", @@ -3710,14 +3708,14 @@ dependencies = [ "sha2", "sqlx-core", "sqlx-rt", - "syn 1.0.36", + "syn 1.0.38", "url", ] [[package]] name = "sqlx-rt" version = "0.1.1" -source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#b4bff0127a21f9399fa6a676d7d9100e429dc62e" +source = "git+https://github.com/jgrund/sqlx?branch=support-offline-workspaces#73b571295c1903263707c5ed680d856ee8864e32" dependencies = [ "native-tls", "once_cell", @@ -3764,7 +3762,7 @@ dependencies = [ "quote 1.0.7", "serde", "serde_derive", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -3780,7 +3778,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -3850,9 +3848,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c" +checksum = "de5472fb24d7e80ae84a7801b7978f95a19ec32cb1876faea59ab711eb901976" dependencies = [ "clap", "lazy_static", @@ -3861,15 +3859,15 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118" +checksum = "1e0eb37335aeeebe51be42e2dc07f031163fbabfa6ac67d7ea68b5c2f68d5f99" dependencies = [ "heck", "proc-macro-error", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -3907,26 +3905,15 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.36" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cdb98bcb1f9d81d07b536179c269ea15999b5d14ea958196413869445bb5250" +checksum = "e69abc24912995b3038597a7a593be5053eb0fb44f3cc5beec0deb421790c1f4" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", "unicode-xid 0.2.1", ] -[[package]] -name = "syn-mid" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -dependencies = [ - "proc-macro2 1.0.19", - "quote 1.0.7", - "syn 1.0.36", -] - [[package]] name = "synom" version = "0.11.3" @@ -4047,7 +4034,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -4105,7 +4092,7 @@ dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", "standback", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -4168,7 +4155,7 @@ checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] @@ -4271,9 +4258,9 @@ checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" [[package]] name = "tracing" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbdf4ccd1652592b01286a5dbe1e2a77d78afaa34beadd9872a5f7396f92aaa9" +checksum = "f0aae59226cf195d8e74d4b34beae1859257efb4e5fed3f147d2dc2c7d372178" dependencies = [ "cfg-if", "log 0.4.11", @@ -4289,14 +4276,14 @@ checksum = "f0693bf8d6f2bf22c690fc61a9d21ac69efdbb894a17ed596b9af0f01e64b84b" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", ] [[package]] name = "tracing-core" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ae75f0d28ae10786f3b1895c55fe72e79928fd5ccdebb5438c75e93fec178f" +checksum = "d593f98af59ebc017c0648f0117525db358745a8894a8d684e185ba3f45954f9" dependencies = [ "lazy_static", ] @@ -4334,9 +4321,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4f5dd7095c2481b7b3cbed71c8de53085fb3542bc3c2b4c73cba43e8f11c7ba" +checksum = "f7b33f8b2ef2ab0c3778c12646d9c42a24f7772bee4cdafc72199644a9f58fdc" dependencies = [ "ansi_term 0.12.1", "chrono", @@ -4607,7 +4594,7 @@ dependencies = [ "log 0.4.11", "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", "wasm-bindgen-shared", ] @@ -4641,7 +4628,7 @@ checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556" dependencies = [ "proc-macro2 1.0.19", "quote 1.0.7", - "syn 1.0.36", + "syn 1.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/iml-agent/src/daemon_plugins/snapshots/iml_agent__daemon_plugins__stats__tests__no_job_stats.snap b/iml-agent/src/daemon_plugins/snapshots/iml_agent__daemon_plugins__stats__tests__no_job_stats.snap new file mode 100644 index 0000000000..24a855511c --- /dev/null +++ b/iml-agent/src/daemon_plugins/snapshots/iml_agent__daemon_plugins__stats__tests__no_job_stats.snap @@ -0,0 +1,47 @@ +--- +source: iml-agent/src/daemon_plugins/stats.rs +expression: xs +--- +[ + "memused", + "memused_max", + "lnet_memused", + "health_check", + "mdt.*.exports.*.uuid", + "mgs.*.mgs.stats", + "mgs.*.mgs.threads_max", + "mgs.*.mgs.threads_min", + "mgs.*.mgs.threads_started", + "mgs.*.num_exports", + "obdfilter.*OST*.stats", + "obdfilter.*OST*.brw_stats", + "obdfilter.*OST*.filesfree", + "obdfilter.*OST*.filestotal", + "obdfilter.*OST*.fstype", + "obdfilter.*OST*.kbytesavail", + "obdfilter.*OST*.kbytesfree", + "obdfilter.*OST*.kbytestotal", + "obdfilter.*OST*.num_exports", + "obdfilter.*OST*.tot_dirty", + "obdfilter.*OST*.tot_granted", + "obdfilter.*OST*.tot_pending", + "ldlm.namespaces.{mdt-,filter-}*.contended_locks", + "ldlm.namespaces.{mdt-,filter-}*.contention_seconds", + "ldlm.namespaces.{mdt-,filter-}*.ctime_age_limit", + "ldlm.namespaces.{mdt-,filter-}*.early_lock_cancel", + "ldlm.namespaces.{mdt-,filter-}*.lock_count", + "ldlm.namespaces.{mdt-,filter-}*.lock_timeouts", + "ldlm.namespaces.{mdt-,filter-}*.lock_unused_count", + "ldlm.namespaces.{mdt-,filter-}*.lru_max_age", + "ldlm.namespaces.{mdt-,filter-}*.lru_size", + "ldlm.namespaces.{mdt-,filter-}*.max_nolock_bytes", + "ldlm.namespaces.{mdt-,filter-}*.max_parallel_ast", + "ldlm.namespaces.{mdt-,filter-}*.resource_count", + "mdt.*.md_stats", + "mdt.*MDT*.num_exports", + "osd-*.*MDT*.filesfree", + "osd-*.*MDT*.filestotal", + "osd-*.*MDT*.kbytesavail", + "osd-*.*MDT*.kbytesfree", + "osd-*.*MDT*.kbytestotal", +] diff --git a/iml-agent/src/daemon_plugins/stats.rs b/iml-agent/src/daemon_plugins/stats.rs index 441c46d0be..f1bee0cd65 100644 --- a/iml-agent/src/daemon_plugins/stats.rs +++ b/iml-agent/src/daemon_plugins/stats.rs @@ -17,6 +17,13 @@ pub fn create() -> impl DaemonPlugin { Stats } +fn params() -> Vec { + parser::params() + .into_iter() + .filter(|x| x != "obdfilter.*OST*.job_stats") + .collect() +} + #[derive(Debug)] struct Stats; @@ -31,11 +38,7 @@ impl DaemonPlugin for Stats { ) -> Pin> + Send>> { async { let mut cmd1 = Command::new("lctl"); - let cmd1 = cmd1 - .arg("get_param") - .args(parser::params()) - .output() - .err_into(); + let cmd1 = cmd1.arg("get_param").args(params()).output().err_into(); let mut cmd2 = Command::new("lnetctl"); let cmd2 = cmd2.arg("export").output().err_into(); @@ -82,3 +85,14 @@ impl DaemonPlugin for Stats { .boxed() } } + +#[cfg(test)] +mod tests { + + #[test] + fn test_no_job_stats() { + let xs = super::params(); + + insta::assert_debug_snapshot!(xs); + } +}