-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Colorize zpool iostat output #14459
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
Colorize zpool iostat output #14459
Conversation
- Bold header - Color space suffixes in iostat by order of magnitude - K is green - M is yellow - G is red - T is blue - P is magenta - E is cyan - 0 space is colored gray Signed-off-by: Ethan Coe-Renner <[email protected]>
When the output of Edit: |
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.
A rebase would be fine.
I see no errors within the code - but the tests should be triggered again.
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.
diff --git a/include/libzutil.h b/include/libzutil.h
index fe65265..a2938c7 100644
--- a/include/libzutil.h
+++ b/include/libzutil.h
@@ -173,9 +173,8 @@ struct zfs_cmd;
#define ANSI_GREEN "\033[0;32m"
#define ANSI_YELLOW "\033[0;33m"
#define ANSI_BLUE "\033[0;34m"
-#define ANSI_MAGENTA "\033[0;34m"
-#define ANSI_CYAN "\033[0;34m"
-
+#define ANSI_MAGENTA "\033[0;35m"
+#define ANSI_CYAN "\033[0;36m"
#define ANSI_GRAY "\033[0;37m"
#define ANSI_RESET "\033[0m"
#define ANSI_BOLD "\033[1m"
This also applies to commit fb11b15 -- the renamed pathes in dark blue are extremely hard to read. |
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes: openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes: openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes: openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Reviewed-by: WHR <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes openzfs#14621 Closes openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Reviewed-by: WHR <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes openzfs#14621 Closes openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Reviewed-by: WHR <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes openzfs#14621 Closes openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Reviewed-by: WHR <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes openzfs#14621 Closes openzfs#14459
Use a bold header and colorize the space suffixes in iostat by order of magnitude like this: - K is green - M is yellow - G is red - T is lightblue - P is magenta - E is cyan - 0 space is colored gray Reviewed-by: WHR <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ethan Coe-Renner <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes openzfs#14621 Closes openzfs#14459
Motivation and Context
Add colored output to
zpool iostat
to improve readability and allow users to quickly see relative sizes of various entries. Addresses #13168 by coloring space suffixes.Description
Uses the interface introduced in #9340 to add color to
zpool iostat
.If the
ZFS_COLOR
env variable is set, then the output ofzpool iostat
is colored as follows:Screenshots


How Has This Been Tested?
Manually tested
Types of changes
Checklist:
Signed-off-by
.