Skip to content

Commit

Permalink
Add new blog
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Dec 1, 2024
1 parent 074d38c commit fac0df6
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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
// {
Expand Down
Binary file added src/content/posts/docker-c-advisor/cadvisor-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/posts/docker-c-advisor/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions src/content/posts/docker-c-advisor/index.md
Original file line number Diff line number Diff line change
@@ -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.

<!--truncate-->

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
2 changes: 1 addition & 1 deletion src/content/spec/about.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit fac0df6

Please sign in to comment.