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的快速伸缩功能 但是我们平时工作中我们并不能提前预知访问量有多少,资源需求多少. 这就很麻烦了,总不能为了需求总 ...
随机推荐
- [leetcode]Palindrome Partitioning @ Python
原题地址:https://oj.leetcode.com/problems/palindrome-partitioning/ 题意: Given a string s, partition s suc ...
- 组件化 得到 DDComponent JIMU 模块 插件 MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- java正则校验,密码必须由字母和数字组成
一个匹配数字和字母密码的正则表达式 2011 年 12 月 14 日 | Filed under: 正则表达式 and tagged with: 密码 , 正则表达式 , 零宽断言 一个用户注册功能的 ...
- Spring(十五):通过注解配置 Bean
在ClassPath中扫描组件 1)组件扫描(component scanning):Spring能够从classpath下自动扫描,侦测和实例化具有特定注解的组件: 2)特定组件包含: --- @C ...
- Direct2D教程V——位图(Bitmap)和位图笔刷(BitmapBrush)
目前博客园中成系列的Direct2D的教程有 1.万一的 Direct2D 系列,用的是Delphi 2009 2.zdd的 Direct2D 系列,用的是VS中的C++ 3.本文所在的 Direct ...
- 理解linux sed命令
理解linux sed命令(2010-02-27 18:21:20) 标签:linuxshellsed替换 分类:革命本钱 1. Sed简介sed是一种在线编辑器,它一次处理一行内容.处理时,把当 前 ...
- Mybatis之使用注解开发CRUD
上一篇演示了怎样使用XML来操作Mybatis实现CRUD,可是大量的XML配置文件的编写是很烦人的.因此 Mybatis也提供了基于注解的配置方式,以下我们来演示一下使用接口加注解来实现CRUD的的 ...
- zoj 2876 Phone List
#include <stdio.h> #include <string.h> #include <stdlib.h> #define ZERO 0 const in ...
- 【Android界面实现】使用PagerTabStrip实现有滑动标签的Viewpager
在ViewPager这样的能够滑动的控件上,总是有非常多的文章能够做.上次的文章,我们实现了一个自己定义的ViewPager的指示器,这篇文章,我们主要是想利用Android自带的控件,实现一个指示器 ...
- Using a Microsoft Account to Logon and Resulting Internet Communication in Windows 8
Using a Microsoft Account to Logon and Resulting Internet Communication in Windows 8 此主题尚未评级 - 评价此主题 ...