kubectl top查看k8s pod的cpu , memory使用率情况
To see the pods that use the most cpu and memory you can use the kubectl top command but it doesn’t sort yet and is also missing the quota limits and requests per pod. You only see the current usage:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
$ kubectl top pod --all-namespacesNAMESPACE NAME CPU(cores) MEMORY(bytes)kube-system kube-proxy-gke-rel3170-default-pool-3459fe6a 2m 12Mikube-system kube-proxy-gke-rel3170-default-pool-3459fe6a 2m 12Mikube-system fluentd-gcp-v2.0.9-5t9q6 8m 85Mikube-system fluentd-gcp-v2.0.9-pd4s9 10m 84Mikube-system kube-dns-3468831164-v2gqr 1m 26Mikube-system event-exporter-v0.1.7-1642279337-180db 0m 13Mikube-system kube-proxy-gke-rel3170-default-pool-3459fe6a 1m 12Mikube-system l7-default-backend-3623108927-tjm9z 0m 1Mikube-system kube-dns-3468831164-cln0p 1m 25Mikube-system fluentd-gcp-v2.0.9-sj3rh 9m 84Mikube-system kube-dns-autoscaler-244676396-00btn 0m 7Mikube-system kubernetes-dashboard-1265873680-8prcm 0m 18Mikube-system heapster-v1.4.3-3980146296-33tmw 0m 42Mi |
Because of these limitations, but also because you want to gather and store this resource usage information on an ongoing basis, a monitoring tool comes in handy. This allows you to analyze resource usage both in real time and historically, and also lets you alert on capacity bottlenecks.
实际示例:
[root@]:~# kubectl top pod -n taobao-spider
NAME CPU(cores) MEMORY(bytes)
app-1375507206-spider-new-v1-0-55f8cbb5cb-29wnz 0m 76Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-2s2qj 0m 69Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-6q9w7 0m 71Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-7s59f 0m 74Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-96lsb 0m 73Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-fdglr 0m 71Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-h52th 0m 71Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-j26cx 0m 73Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-k95gz 0m 71Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-pv9w7 0m 75Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-r9mtz 0m 69Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-vq79m 0m 75Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-xzzbs 0m 70Mi
app-1375507206-spider-new-v1-0-55f8cbb5cb-zhjdb 0m 80Mi
app-183215290-spider-v1-0-76f57788d-8jfqm 93m 80Mi
app-2492659469-spider-new-v1-0-7fbf4d7c7d-vf552 20m 61Mi
app-3437963581-spider-v1-0-66cd9d7699-5z2vk 74m 108Mi
app-3437963581-spider-v1-0-66cd9d7699-79bwf 54m 75Mi
kubectl top查看k8s pod的cpu , memory使用率情况的更多相关文章
- kubectl cp 从k8s pod 中 拷贝 文件到本地
请查看官方的说明 kubectl cp --help 官方说使用cp , pod里需要有tar命令 从k8s pod 中 拷贝 文件到本地 这是我使用的命令 kubectl exec redis-6c ...
- CentOS7下查看系统环境(内存CPU磁盘使用率)
1.方法一 yum install atop --安装atop sudo atop--开启监视 2.方法二 top 3.方法三 free --查看没存情况 ps ux --查看CPU 情况 磁盘 df
- 使用top观察一进程的cpu历史占用情况
#!/bin/shtop -b -n 1 -p 1975| tail -3 >>process1975.log 搞了时间节点,做个定时任务什么的就ok了
- 使用kubectl管理Kubernetes(k8s)集群:常用命令,查看负载,命名空间namespace管理
目录 一.系统环境 二.前言 三.kubectl 3.1 kubectl语法 3.2 kubectl格式化输出 四.kubectl常用命令 五.查看kubernetes集群node节点和pod负载 5 ...
- linux top命令查看内存及多核CPU的使用讲述
查看多核CPU命令 mpstat -P ALL 和 sar -P ALL 说明:sar -P ALL > aaa.txt 重定向输出内容到文件 aaa.txt top命令 经常用来监控l ...
- 【转载】linux top命令查看内存及多核CPU的使用讲述
转载 https://www.cnblogs.com/dragonsuc/p/5512797.html 查看多核CPU命令 mpstat -P ALL 和 sar -P ALL 说明:sar -P ...
- linux top命令查看内存及多核CPU的使用讲述【转】
转载一下top使用后详细的参数,之前做的笔记找不见了,转载一下,作为以后的使用参考: 原文地址:http://blog.csdn.net/linghao00/article/details/80592 ...
- linux top 查看CPU命令
top 命令主要用于查看进程的相关信息,同时它也会提供查看系统平均负载,cpu 信息和内存信息 实时监控系统资源使用情况 [root@localhost ~]$ top // 动态查看进程使用资源的情 ...
- k8s Pod的自动水平伸缩(HPA)
我们知道,当访问量或资源需求过高时,使用:kubectl scale命令可以实现对pod的快速伸缩功能 但是我们平时工作中我们并不能提前预知访问量有多少,资源需求多少. 这就很麻烦了,总不能为了需求总 ...
随机推荐
- Validate Binary Search Tree leetcode java
题目: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is define ...
- java判断一个字符串是否包含某个字符
一.contains方法 1:描述 java.lang.String.contains() 方法返回true,当且仅当此字符串包含指定的char值序列 2:声明 public boolean cont ...
- 设置让php能够以root权限来执行exec() 或者 shell_exec()
一.查看启动你php的进程的用户是谁. 可以通过在命令行执行:ps -ef | grep php来看.或者在php中执行 echo exec('whoami') 来查看.centos下默认会是nobo ...
- 【Scala】Scala-调用Java-集合
Scala-调用Java-集合 sacla 遍历 java list_百度搜索 13.11 Scala混用Java的集合类调用scala的foreach遍历问题 - 简书
- oracle 嵌套查询
select dat.id, dat.voucher_id, dat.type, dat.state, dat.start_point, dat.start_floor, dat.end_point, ...
- mac 安装 RabbitMQ
https://blog.csdn.net/u010046908/article/details/54773323
- editplus教程
Editplus 3.0 开发ext 教程 使用Editplus配置轻型的PHP调试环境 Editplus已经使用了很多年,一直很喜欢这个小巧.精致的文本编辑器,比起ZenStudio这样庞大的IDE ...
- C++代码复习笔记:第三章
getline这个方法的使用, 可以获取用户输入的一行数据, 保存到数组中: #include <iostream> #include <string> int main() ...
- performSelector 多个参数
[self performSelector:@selector(callFooWithArray) withObject:[NSArray arrayWithObjects:@"first& ...
- jQuery 发送验证码倒计时按钮 复制代码
<!DOCTYPE html> <html> <head> <title></title> <script src="../ ...