diff --git a/src/config.ts b/src/config.ts index a7f7e1a72..cf8f2ce54 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,7 +7,7 @@ import type { import { LinkPreset } from './types/config' export const siteConfig: SiteConfig = { - title: 'Jack\'s Leadership Blog', + title: 'Jiaqi\'s Leadership Blog', subtitle: 'Leadership is, at root, about Influencing Others', lang: 'en', // 'en', 'zh_CN', 'zh_TW', 'ja' themeColor: { @@ -26,7 +26,7 @@ export const siteConfig: SiteConfig = { }, toc: { enable: true, // Display the table of contents on the right side of the post - depth: 2 // Maximum heading depth to show in the table, from 1 to 3 + depth: 3 // Maximum heading depth to show in the table, from 1 to 3 }, favicon: [ // Leave this array empty to use the default favicon // { diff --git a/src/content/posts/docker-c-advisor/cadvisor-1.png b/src/content/posts/docker-c-advisor/cadvisor-1.png new file mode 100644 index 000000000..b8dc509a2 Binary files /dev/null and b/src/content/posts/docker-c-advisor/cadvisor-1.png differ diff --git a/src/content/posts/docker-c-advisor/cadvisor-2.png b/src/content/posts/docker-c-advisor/cadvisor-2.png new file mode 100644 index 000000000..2ce2e390d Binary files /dev/null and b/src/content/posts/docker-c-advisor/cadvisor-2.png differ diff --git a/src/content/posts/docker-c-advisor/cover.png b/src/content/posts/docker-c-advisor/cover.png new file mode 100644 index 000000000..d54e3a7c6 Binary files /dev/null and b/src/content/posts/docker-c-advisor/cover.png differ diff --git a/src/content/posts/docker-c-advisor/docker-container-stats.png b/src/content/posts/docker-c-advisor/docker-container-stats.png new file mode 100644 index 000000000..a4f5f87a6 Binary files /dev/null and b/src/content/posts/docker-c-advisor/docker-container-stats.png differ diff --git a/src/content/posts/docker-c-advisor/index.md b/src/content/posts/docker-c-advisor/index.md new file mode 100644 index 000000000..db7166ec2 --- /dev/null +++ b/src/content/posts/docker-c-advisor/index.md @@ -0,0 +1,51 @@ +--- +title: Docker cAdvisor +published: 2024-12-01 +description: Overseeing resource consumption of all Docker containers on a VM +image: cover.png +tags: [Technology] +category: English +draft: false +--- + +[cAdvisor] (Container Advisor) provides Docker container users an understanding of +the resource usage and performance characteristics of their running containers. It is a running daemon that collects, +aggregates, processes, and exports information about running containers. Specifically, for each container it keeps +resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network +statistics. This data is exported by container and machine-wide. + + + +Although [cAdvisor] has some prelimilary (useful though) UI. It also offers + +1. [RESTful API to query container stats](https://github.com/google/cadvisor/blob/master/docs/api.md) +2. [Export capability to common data storage, such as Elasticsearch](https://github.com/google/cadvisor/blob/master/docs/storage/README.md) + +To pull the image and run it: + +```bash +sudo docker run \ + --volume=/:/rootfs:ro \ + --volume=/var/run/docker.sock:/var/run/docker.sock:rw \ + --volume=/sys:/sys:ro \ + --volume=/var/lib/docker/:/var/lib/docker:ro \ + --volume=/dev/disk/:/dev/disk:ro \ + --publish=8080:8080 \ + --detach=true \ + --name=cadvisor \ + --privileged \ + --device=/dev/kmsg \ + gcr.io/cadvisor/cadvisor:v0.36.0 +``` + +![cAdvisor Screenshot 1](cadvisor-1.png) +![cAdvisor Screenshot 2](cadvisor-2.png) + +### [docker-container-stats](https://github.com/virtualzone/docker-container-stats) + +[cAdvisor](https://github.com/google/cadvisor) is good for customizing container monitoring, but it's heavy. A +quick-and-lightweight option would be [docker-container-stats](https://github.com/virtualzone/docker-container-stats) + +![docker-container-stats Screenshot](docker-container-stats.png) + +[cAdvisor]: https://github.com/google/cadvisor diff --git a/src/content/spec/about.md b/src/content/spec/about.md index f7fc2e043..63c52e4bc 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,7 +1,7 @@ # About Leadership, for me, is a Science, a discipline that involves a much broader superset beyond technology. It includes not -just project management and public speaking, but also Psychology, Philosophy, and not to forget the technology itself +just project management and public speaking, but also Psychology, Philosophy, and not to forget the technology itself. [leadership.qubitpi.org](https://leadership.qubitpi.org/) serves as my continuing effort that expand the boundary of my limit on being a leader