First things first !
sudo apt update
sudo apt upgrade
sudo apt-get install build-essential git
A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.
This is specific to k8s and containers that have CPU limits set.
To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:
sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
[user] | |
name = rajmani1995 | |
email = rajmani1995@gmail.com | |
[credential] | |
helper = cache --timeout=3600 | |
[alias] | |
aliases = config --get-regexp '^alias\\.' | |
br = branch | |
branch-name = rev-parse --abbrev-ref HEAD | |
ci = commit -m |
{ | |
"hadoop_src":"hadoop-2.7.1.tar.gz", | |
"hadoop_folder": "hadoop-2.7.1", | |
"hadoop_path": "Softi/hadoop-2.7.1", | |
"__comment" : "hadoop_path with respect home folder", | |
"core": [ | |
{ | |
"name": "fs.default.name", | |
"value": "hdfs://localhost:54310" | |
} |
#include <bits/stdc++.h> | |
#include <unistd.h> | |
using namespace std; | |
int USER = 1; | |
int COMPUTER = 0; | |
#define LEFT 0 | |
#define RIGHT 1 | |
#define UP 2 |
#!/usr/bin/env python | |
p_table_1 = [ | |
[57,49,41,33,25,17, 9], | |
[ 1,58,50,42,34,26,18], | |
[10, 2,59,51,43,35,27], | |
[19,11, 3,60,52,44,36], | |
[63,55,47,39,31,23,15], | |
[ 7,62,54,46,38,30,22], | |
[14, 6,61,53,45,37,29], |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
{ | |
"cmd": ["gcc", "$file", "-o", "${file_path}/${file_base_name}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c", | |
"variants": | |
[ | |
{ | |
"name": "Run", | |
"shell": true, |
^[-+]?\d+(\.\d+)?$
^[a-zA-Z0-9._]+\@[a-zA-Z]+\.[a-zA-Z]+$
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Modal Test</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
</head> | |
<body> |