From c29e71a55664fbdc57fd6218dede3cbde6d6dd82 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 1 Nov 2025 17:31:02 +0200 Subject: Update content for html --- ...-03-16-the-pragmatic-programmer-book-notes.html | 1 + ...4-01-never-split-the-difference-book-notes.html | 1 + ...3-05-06-the-obstacle-is-the-way-book-notes.html | 1 + ...17-career-guide-and-soft-skills-book-notes.html | 1 + gemfeed/2023-11-11-mind-management-book-notes.html | 1 + .../2024-05-01-slow-productivity-book-notes.html | 1 + .../2024-07-07-the-stoic-challenge-book-notes.html | 1 + gemfeed/2024-10-24-staff-engineer-book-notes.html | 1 + gemfeed/2025-04-19-when-book-notes.html | 1 + ...6-07-a-monks-guide-to-happiness-book-notes.html | 1 + ...1-02-the-courage-to-be-disliked-book-notes.html | 130 ++++++ gemfeed/atom.xml | 466 ++++++--------------- gemfeed/index.html | 1 + 13 files changed, 269 insertions(+), 338 deletions(-) create mode 100644 gemfeed/2025-11-02-the-courage-to-be-disliked-book-notes.html (limited to 'gemfeed') diff --git a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html index c79938e8..6a9f1323 100644 --- a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html +++ b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html @@ -98,6 +98,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2023-04-01-never-split-the-difference-book-notes.html b/gemfeed/2023-04-01-never-split-the-difference-book-notes.html index 73791d99..635c99be 100644 --- a/gemfeed/2023-04-01-never-split-the-difference-book-notes.html +++ b/gemfeed/2023-04-01-never-split-the-difference-book-notes.html @@ -161,6 +161,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html index ee85f802..44cee61e 100644 --- a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html +++ b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html @@ -114,6 +114,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html index 2479ec94..bdf51be7 100644 --- a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html +++ b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html @@ -346,6 +346,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2023-11-11-mind-management-book-notes.html b/gemfeed/2023-11-11-mind-management-book-notes.html index 8b8d392b..a61aa781 100644 --- a/gemfeed/2023-11-11-mind-management-book-notes.html +++ b/gemfeed/2023-11-11-mind-management-book-notes.html @@ -131,6 +131,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2024-05-01-slow-productivity-book-notes.html b/gemfeed/2024-05-01-slow-productivity-book-notes.html index 890ea6fd..b424e683 100644 --- a/gemfeed/2024-05-01-slow-productivity-book-notes.html +++ b/gemfeed/2024-05-01-slow-productivity-book-notes.html @@ -157,6 +157,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2024-07-07-the-stoic-challenge-book-notes.html b/gemfeed/2024-07-07-the-stoic-challenge-book-notes.html index a5d882d8..259bb2e4 100644 --- a/gemfeed/2024-07-07-the-stoic-challenge-book-notes.html +++ b/gemfeed/2024-07-07-the-stoic-challenge-book-notes.html @@ -73,6 +73,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2024-10-24-staff-engineer-book-notes.html b/gemfeed/2024-10-24-staff-engineer-book-notes.html index 560bd4c8..1ed708f1 100644 --- a/gemfeed/2024-10-24-staff-engineer-book-notes.html +++ b/gemfeed/2024-10-24-staff-engineer-book-notes.html @@ -138,6 +138,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes (You are currently reading this)
diff --git a/gemfeed/2025-04-19-when-book-notes.html b/gemfeed/2025-04-19-when-book-notes.html index c419d3ef..1ec3118b 100644 --- a/gemfeed/2025-04-19-when-book-notes.html +++ b/gemfeed/2025-04-19-when-book-notes.html @@ -118,6 +118,7 @@ __ejm\___/________dwb`---`______________________
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes (You are currently reading this)
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2025-06-07-a-monks-guide-to-happiness-book-notes.html b/gemfeed/2025-06-07-a-monks-guide-to-happiness-book-notes.html index 1a2b4251..0d7d4762 100644 --- a/gemfeed/2025-06-07-a-monks-guide-to-happiness-book-notes.html +++ b/gemfeed/2025-06-07-a-monks-guide-to-happiness-book-notes.html @@ -100,6 +100,7 @@
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes (You are currently reading this)
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
diff --git a/gemfeed/2025-11-02-the-courage-to-be-disliked-book-notes.html b/gemfeed/2025-11-02-the-courage-to-be-disliked-book-notes.html new file mode 100644 index 00000000..a1d153f7 --- /dev/null +++ b/gemfeed/2025-11-02-the-courage-to-be-disliked-book-notes.html @@ -0,0 +1,130 @@ + + + + +'The Courage To Be Disliked' book notes + + + + + +

+Home | Markdown | Gemini +

+

"The Courage To Be Disliked" book notes


+
+Published at 2025-11-01T17:28:38+02:00
+
+These are my personal book notes from Ichiro Kishimi and Fumitake Koga's "The Courage To Be Disliked". They are for me, but I hope they might be useful to you too.
+
+

The Nature of Life and Happiness


+
+
+

Subjective Reality and Perception


+
+
+This is illustrated by the "10 people" example: if one person dislikes you, two love you, and seven are indifferent, focusing only on the one who dislikes you gives a distorted and negative view of your life. You are focusing on a tiny, insignificant part and judging the whole by it.
+
+The challenge is to find the courage to see the world directly, without the filters of our own subjective views.
+
+

The Power to Change and the Role of the Past


+
+
+

Self-Acceptance, Lifestyle, and Life Lies


+
+
+

Interpersonal Relationships


+
+
+

Inferiority and Superiority


+
+
+

Community, Contribution, and Happiness


+
+
+

Living in the Here and Now


+
+
+

The Courage to Be Normal


+
+
+

Freedom is Being Disliked


+
+
+

The Meaning of Life


+
+
+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Other book notes of mine are:
+
+2025-11-02 "The Courage To Be Disliked" book notes (You are currently reading this)
+2025-06-07 "A Monk's Guide to Happiness" book notes
+2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
+2024-10-24 "Staff Engineer" book notes
+2024-07-07 "The Stoic Challenge" book notes
+2024-05-01 "Slow Productivity" book notes
+2023-11-11 "Mind Management" book notes
+2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes
+2023-05-06 "The Obstacle is the Way" book notes
+2023-04-01 "Never split the difference" book notes
+2023-03-16 "The Pragmatic Programmer" book notes
+
+Back to the main site
+ + + diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index f7539dd9..2b863d91 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,11 +1,132 @@ - 2025-11-01T16:25:00+02:00 + 2025-11-01T17:28:38+02:00 foo.zone feed To be in the .zone! https://foo.zone/ + + 'The Courage To Be Disliked' book notes + + https://foo.zone/gemfeed/2025-11-02-the-courage-to-be-disliked-book-notes.html + 2025-11-01T17:28:38+02:00 + + Paul Buetow aka snonux + paul@dev.buetow.org + + These are my personal book notes from Ichiro Kishimi and Fumitake Koga's 'The Courage To Be Disliked'. They are for me, but I hope they might be useful to you too. + +
+

"The Courage To Be Disliked" book notes


+
+These are my personal book notes from Ichiro Kishimi and Fumitake Koga's "The Courage To Be Disliked". They are for me, but I hope they might be useful to you too.
+
+

The Nature of Life and Happiness


+
+
    +
  • Life and the world are fundamentally simple; we are the ones who make them complicated. Drama does not exist.
  • +
  • Happiness is a choice and is attainable for everyone. Often, we lack the courage to be happy because it's easier to stay in a familiar, albeit unhappy, situation than to choose a new lifestyle, which may bring anxiety and unknowns.
  • +
  • Unhappiness is something you choose for yourself.
  • +

+

Subjective Reality and Perception


+
+
    +
  • Our perception of the world is subjective. We don't see the world as it is, but as we are.
  • +
  • The world you see is different from the one I see, and it's impossible to truly share your world with anyone else.
  • +

+This is illustrated by the "10 people" example: if one person dislikes you, two love you, and seven are indifferent, focusing only on the one who dislikes you gives a distorted and negative view of your life. You are focusing on a tiny, insignificant part and judging the whole by it.
+
+The challenge is to find the courage to see the world directly, without the filters of our own subjective views.
+
+

The Power to Change and the Role of the Past


+
+
    +
  • We are not defined by our past experiences but by the meaning we assign to them. The past does not determine our future.
  • +
  • The book rejects Freudian etiology (the idea that past trauma defines us) in favor of teleology (the idea that we are driven by our present goals).
  • +
  • Change is possible for everyone at any moment, regardless of their circumstances or age. This change must come from your own doing, not from others.
  • +
  • We live in accordance with our present goals, not past causes. The past does not exist; the only issue is the present.
  • +
  • Emotions, like anger, can be fabricated tools used to achieve a goal (e.g., to control or shout at someone) rather than uncontrollable forces that rule us.
  • +

+

Self-Acceptance, Lifestyle, and Life Lies


+
+
    +
  • Your "lifestyle"—your worldview and outlook on life—is a choice, not a fixed personality trait. You can change it instantly.
  • +
  • The key is self-acceptance, not self-affirmation. Accept what you cannot change and have the courage to change what you can.
  • +
  • You cannot be reborn as someone else. It is better to learn to love yourself and make the best use of the "equipment" you were born with.
  • +
  • Workaholism is a "life lie." It is a form of being in disharmony with life, using work as an excuse to avoid other life tasks and responsibilities.
  • +

+

Interpersonal Relationships


+
+
    +
  • All problems are, at their core, problems of interpersonal relationships. To escape all problems would mean to live alone in the universe, which is impossible.
  • +
  • The book identifies three "Life Tasks" that everyone faces: the task of work, the task of friendship, and the task of love.
  • +
  • **Competition:** Life is not a competition. When we stop comparing ourselves to others, we cease to see them as enemies. They become comrades, and we can genuinely celebrate their successes. This removes the fear of losing and allows for peace.
  • +
  • **Power Struggles:** When someone is angry with you, recognize it as their attempt at a power struggle. The person who attacks you is the one with the problem. Do not get drawn in. Arguing about who is right or wrong is a trap. Admitting a fault is not a defeat.
  • +
  • **Horizontal vs. Vertical Relationships:** Strive for "horizontal relationships" based on equality, rather than "vertical relationships" based on hierarchy. Praise and rebuke are forms of manipulation found in vertical relationships. Instead, offer encouragement. (Note: The original author expresses disagreement with applying this to children, feeling a hierarchy is necessary and that children appreciate praise).
  • +
  • **Separation of Tasks:** Understand what is your responsibility and what is someone else's. For example, if someone takes advantage of your trust, that is their task. Your task is to decide whether to trust them in the first place.
  • +
  • **Confidence in Others:** Having unconditional confidence in others helps build deep relationships and a sense of belonging, turning others into comrades.
  • +

+

Inferiority and Superiority


+
+
    +
  • A feeling of inferiority is not inherently bad; it can be a catalyst for growth when we compare ourselves to our ideal self. This "pursuit of superiority" drives progress.
  • +
  • This is different from an "inferiority complex," which is using feelings of inadequacy as an excuse to avoid change and responsibility.
  • +
  • Value is based on a social context. An object's worth is subjective and can be reinterpreted.
  • +

+

Community, Contribution, and Happiness


+
+
    +
  • The definition of happiness is the feeling of contribution.
  • +
  • A true sense of self-worth comes from feeling useful to a community (the "community feeling").
  • +
  • This contribution doesn't have to be grand. You can be of worth to the community simply by being.
  • +
  • When you have a genuine feeling of contribution, you no longer need recognition or praise from others.
  • +

+

Living in the Here and Now


+
+
    +
  • Life is a series of moments ("dots"), not a continuous line. We should live fully in the "here and now."
  • +
  • The greatest life lie is to dwell on the past and the future, which do not exist, instead of focusing on the present moment.
  • +
  • Focus on the process, not just the outcome. The goal of a dance is the dancing itself, not just reaching a destination.
  • +

+

The Courage to Be Normal


+
+
    +
  • Why does everyone want to be special? Is it inferior to be normal?
  • +
  • Embracing being normal, instead of striving for a special status, is a form of courage. In the grander sense, isn't everyone normal?
  • +

+

Freedom is Being Disliked


+
+
    +
  • The price of true freedom is to be disliked by other people. It is a sign that you are living in accordance with your own principles.
  • +

+

The Meaning of Life


+
+
    +
  • Life has no inherent meaning. It is up to each individual to assign meaning to their own life.
  • +
  • Do not be afraid of being disliked by others for living your life according to the meaning you create.
  • +
  • You have the power to change yourself, and in doing so, you change your world. No one else can change it for you.
  • +

+E-Mail your comments to paul@nospam.buetow.org :-)
+
+Other book notes of mine are:
+
+2025-11-02 "The Courage To Be Disliked" book notes (You are currently reading this)
+2025-06-07 "A Monk's Guide to Happiness" book notes
+2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
+2024-10-24 "Staff Engineer" book notes
+2024-07-07 "The Stoic Challenge" book notes
+2024-05-01 "Slow Productivity" book notes
+2023-11-11 "Mind Management" book notes
+2023-07-17 "Software Developmers Career Guide and Soft Skills" book notes
+2023-05-06 "The Obstacle is the Way" book notes
+2023-04-01 "Never split the difference" book notes
+2023-03-16 "The Pragmatic Programmer" book notes
+
+Back to the main site
+
+
+
Perl New Features and Foostats @@ -6140,6 +6261,7 @@ Jul 06 10: Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes (You are currently reading this)
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
@@ -7707,6 +7829,7 @@ __ejm\___/________dwb`---`______________________
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes (You are currently reading this)
2024-10-24 "Staff Engineer" book notes
@@ -10760,6 +10883,7 @@ dev.cpu.0.freq: 2922
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes (You are currently reading this)
@@ -11415,6 +11539,7 @@ jgs \\`_..---.Y.---.._`//
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
@@ -12758,6 +12883,7 @@ http://www.gnu.org/software/src-highlite -->
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
@@ -14199,6 +14325,7 @@ echo baz
Other book notes of mine are:

+2025-11-02 "The Courage To Be Disliked" book notes
2025-06-07 "A Monk's Guide to Happiness" book notes
2025-04-19 "When: The Scientific Secrets of Perfect Timing" book notes
2024-10-24 "Staff Engineer" book notes
@@ -14519,343 +14646,6 @@ blurs html index.html photos thumbs 2021-06-05 Gemtexter - One Bash script to rule it all
2021-05-16 Personal Bash coding style guide

-Back to the main site
- - -
- - DTail usage examples - - https://foo.zone/gemfeed/2023-09-25-dtail-usage-examples.html - 2023-09-25T14:57:42+03:00 - - Paul Buetow aka snonux - paul@dev.buetow.org - - Hey there. As I am pretty busy this month personally (I am now on Paternity Leave) and as I still want to post once monthly, the blog post of this month will only be some DTail usage examples. They're from the DTail documentation, but not all readers of my blog may be aware of those! - -
-

DTail usage examples


-
-Published at 2023-09-25T14:57:42+03:00
-
-Hey there. As I am pretty busy this month personally (I am now on Paternity Leave) and as I still want to post once monthly, the blog post of this month will only be some DTail usage examples. They're from the DTail documentation, but not all readers of my blog may be aware of those!
-
-DTail is a distributed DevOps tool for tailing, grepping, catting logs and other text files on many remote machines at once which I programmed in Go.
-
-https://dtail.dev
-
-
-                              ,_---~~~~~----._
-                        _,,_,*^____      _____``*g*\"*,
-  ____ _____     _ _   / __/ /'     ^.  /      \ ^@q   f
- |  _ \_   _|_ _(_) |   @f |      ((@|  |@))    l  0 _/
- | | | || |/ _` | | |  \`/   \~____ / __ \_____/    \
- | |_| || | (_| | | |   |           _l__l_           I
- |____/ |_|\__,_|_|_|   }          [______]           I
-                        ]            | | |            |
-                        ]             ~ ~             |
-                        |   Let's tail those logs!   |
-                         |                           |
-
-
-

Table of Contents


-
-
-

Commands


-
-DTail consists out of a server and several client binaries. In this post, I am showcasing their use!
-
-
    -
  • Use dtail to follow logs
  • -
  • Use dtail to aggregate logs while they are followed
  • -
  • Use dcat to display logs and other text files already written
  • -
  • Use dgrep to grep (search) logs and other text files already written
  • -
  • Use dmap to aggregate logs and other text files already written
  • -
  • dserver is the DTail server, where all the clients can connect to
  • -

-

Following logs


-
-The following example demonstrates how to follow logs of several servers at once. The server list is provided as a flat text file. The example filters all records containing the string INFO. Any other Go compatible regular expression can also be used instead of INFO.
-
- -
% dtail --servers serverlist.txt --grep INFO --files "/var/log/dserver/*.log"
-
-
-Hint: you can also provide a comma separated server list, e.g.: servers server1.example.org,server2.example.org:PORT,...
-
-Tail example
-
-Hint: You can also use the shorthand version (omitting the --files)
-
- -
% dtail --servers serverlist.txt --grep INFO "/var/log/dserver/*.log"
-
-
-

Aggregating logs


-
-To run ad-hoc map-reduce aggregations on newly written log lines you must add a query. The following example follows all remote log lines and prints out every few seconds the result to standard output.
-
-Hint: To run a map-reduce query across log lines written in the past, please use the dmap command instead.
-
- -
% dtail --servers serverlist.txt \
-    --files '/var/log/dserver/*.log' \
-    --query 'from STATS select sum($goroutines),sum($cgocalls),
-             last($time),max(lifetimeConnections)'
-
-
-Beware: For map-reduce queries to work, you have to ensure that DTail supports your log format. Check out the documentaiton of the DTail query language and the DTail log formats on the DTail homepage for more information.
-
-Tail map-reduce example
-
-Hint: You can also use the shorthand version:
-
- -
% dtail --servers serverlist.txt \
-    --files '/var/log/dserver/*.log' \
-    'from STATS select sum($goroutines),sum($cgocalls),
-     last($time),max(lifetimeConnections)'
-
-
-Here is another example:
-
- -
% dtail --servers serverlist.txt \
-    --files '/var/log/dserver/*.log' \
-    --query 'from STATS select $hostname,max($goroutines),max($cgocalls),$loadavg,
-             lifetimeConnections group by $hostname order by max($cgocalls)'
-
-
-Tail map-reduce example 2
-
-You can also continuously append the results to a CSV file by adding outfile append filename.csv to the query:
-
- -
% dtail --servers serverlist.txt \
-    --files '/var/log/dserver/*.log' \
-    --query 'from STATS select ... outfile append result.csv'
-
-
-

How to use dcat


-
-The following example demonstrates how to cat files (display the full content of the files) on several servers at once.
-
-As you can see in this example, a DTail client also creates a local log file of all received data in ~/log. You can also use the noColor and -plain flags (this all also work with other DTail commands than dcat).
-
- -
% dcat --servers serverlist.txt --files /etc/hostname
-
-
-Cat example
-
-Hint: You can also use the shorthand version:
-
- -
% dcat --servers serverlist.txt /etc/hostname
-
-
-

How to use dgrep


-
-The following example demonstrates how to grep files (display only the lines which match a given regular expression) of multiple servers at once. In this example, we look after some entries in /etc/passwd. This time, we don't provide the server list via an file but rather via a comma separated list directly on the command line. We also explore the -before, -after and -max flags (see animation).
-
- -
% dgrep --servers server1.example.org:2223 \
-    --files /etc/passwd \
-    --regex nologin
-
-
-Generally, dgrep is also a very useful way to search historic application logs for certain content.
-
-Grep example
-
-Hint: -regex is an alias for -grep.
-
-

How to use dmap


-
-To run a map-reduce aggregation over logs written in the past, the dmap command can be used. The following example aggregates all map-reduce fields dmap will print interim results every few seconds. You can also write the result to an CSV file by adding outfile result.csv to the query.
-
- -
% dmap --servers serverlist.txt \
-    --files '/var/log/dserver/*.log' \
-    --query 'from STATS select $hostname,max($goroutines),max($cgocalls),$loadavg,
-             lifetimeConnections group by $hostname order by max($cgocalls)'
-
-
-Remember: For that to work, you have to make sure that DTail supports your log format. You can either use the ones already defined in internal/mapr/logformat or add an extension to support a custom log format. The example here works out of the box though, as DTail understands its own log format already.
-
-DMap example
-
-

How to use the DTail serverless mode


-
-Until now, all examples so far required to have remote server(s) to connect to. That makes sense, as after all DTail is a *distributed* tool. However, there are circumstances where you don't really need to connect to a server remotely. For example, you already have a login shell open to the server an all what you want is to run some queries directly on local log files.
-
-The serverless mode does not require any dserver up and running and therefore there is no networking/SSH involved.
-
-All commands shown so far also work in a serverless mode. All what needs to be done is to omit a server list. The DTail client then starts in serverless mode.
-
-

Serverless map-reduce query


-
-The following dmap example is the same as the previously shown one, but the difference is that it operates on a local log file directly:
-
- -
% dmap --files /var/log/dserver/dserver.log
-    --query 'from STATS select $hostname,max($goroutines),max($cgocalls),$loadavg,
-              lifetimeConnections group by $hostname order by max($cgocalls)'
-
-
-As a shorthand version the following command can be used:
-
- -
% dmap 'from STATS select $hostname,max($goroutines),max($cgocalls),$loadavg,
-        lifetimeConnections group by $hostname order by max($cgocalls)' \
-        /var/log/dsever/dserver.log
-
-
-You can also use a file input pipe as follows:
-
- -
% cat /var/log/dserver/dserver.log | \
-    dmap 'from STATS select $hostname,max($goroutines),max($cgocalls),$loadavg,
-          lifetimeConnections group by $hostname order by max($cgocalls)'
-
-
-

Aggregating CSV files


-
-In essence, this works exactly like aggregating logs. All files operated on must be valid CSV files and the first line of the CSV must be the header. E.g.:
-
- -
% cat example.csv
-name,lastname,age,profession
-Michael,Jordan,40,Basketball player
-Michael,Jackson,100,Singer
-Albert,Einstein,200,Physician
-% dmap --query 'select lastname,name where age > 40 logformat csv outfile result.csv' example.csv
-% cat result.csv
-lastname,name
-Jackson,Michael
-Einstein,Albert
-
-
-DMap can also be used to query and aggregate CSV files from remote servers.
-
-

Other serverless commands


-
-The serverless mode works transparently with all other DTail commands. Here are some examples:
-
- -
% dtail /var/log/dserver/dserver.log
-
-
- -
% dtail --logLevel trace /var/log/dserver/dserver.log
-
-
- -
% dcat /etc/passwd
-
-
- -
% dcat --plain /etc/passwd > /etc/test
-# Should show no differences.
-diff /etc/test /etc/passwd 
-
-
- -
% dgrep --regex ERROR --files /var/log/dserver/dsever.log
-
-
- -
% dgrep --before 10 --after 10 --max 10 --grep ERROR /var/log/dserver/dsever.log
-
-
-Use --help for more available options. Or go to the DTail page for more information! Hope you find DTail useful!
-
-E-Mail your comments to paul@nospam.buetow.org :-)
-
-Other related posts are:
-
-2023-09-25 DTail usage examples (You are currently reading this)
-2022-10-30 Installing DTail on OpenBSD
-2022-03-06 The release of DTail 4.0.0
-2021-04-22 DTail - The distributed log tail program
-
-I hope you find the tools presented in this post useful!
-
-Paul
-
Back to the main site
diff --git a/gemfeed/index.html b/gemfeed/index.html index 37f89e8f..ee5b488b 100644 --- a/gemfeed/index.html +++ b/gemfeed/index.html @@ -15,6 +15,7 @@

To be in the .zone!



+2025-11-02 - 'The Courage To Be Disliked' book notes
2025-11-02 - Perl New Features and Foostats
2025-10-11 - Key Takeaways from The Well-Grounded Rubyist
2025-10-02 - f3s: Kubernetes with FreeBSD - Part 7: k3s and first pod deployments
-- cgit v1.2.3