How to show clusterwide utilization in Openshift/Kubernetes
Background When deploying openshift/kubernetes cluster in production, usually we used more than 3 machine/hosts, and in my company's deployment we used more than 10 VMs. Monitoring resource usage in multiple VM is nothing new but using kubernetes we have an option to use kubectl / oc adm top nodes to do this. Using kubectl/ oc adm top nodes will show overall CPU and memory usage for each node The old ways (pre-kubernetes) Before using kubernetes/openshift, we used RHEL/CentOS VMs and to get resource usage we use the sar utility. Of course we need to install sar first (sudo yum install sysstat) , and then sar is quite unique that it store historical data based on the date of the month. To get cpu usage for current date : sar To get memory usage for current date : sar -r To get memory usage for the date 30 : sar -r -f /var/log/sa/sa30 To get cpu usage for the date 30 : sar -f /var/log/sa/sa30 There are other interesting resource usage such as per core cpu usage (sar -P A...