We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
package main | |
import ( | |
"fmt" | |
"reflect" | |
"unsafe" | |
) | |
type private struct { | |
val string |
We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
FROM maven:3.5.2-jdk-9 AS build | |
COPY pom.xml /usr/src/app | |
COPY src /usr/src/app/src | |
RUN mvn -f /usr/src/app/pom.xml clean package | |
FROM maven:3.5.2-jdk-9 AS build | |
COPY pom.xml /usr/src/app/ | |
RUN mvn -f /usr/src/app/pom.xml dependency:copy-dependencies | |
COPY src /usr/src/app/src | |
RUN mvn -f /usr/src/app/pom.xml clean package |
#!/usr/bin/env python | |
# encoding:utf8 | |
""" | |
https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.karFPe&treeId=257&articleId=105735&docType=1 | |
""" | |
from __future__ import unicode_literals | |
import copy | |
import json | |
import requests |
#!/bin/env bash | |
zero_commit="0000000000000000000000000000000000000000" | |
permit_user="gitlab-ci" | |
commit_msg_format="ci/`date +%Y%m%d`/*" | |
excludeExisting="--not --all" |
package main | |
import ( | |
"bytes" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" |
[URL][1]
package main
import "fmt"
func main() {
// Use bitwise OR | to get the bits that are in 1 OR 2
// 1 = 00000001
// 2 = 00000010
OID | Descr | Remarks | Method |
---|---|---|---|
.1.3.6.1.2.1.1.1.0 | 系统基本信息 | SysDescr | GET |
.1.3.6.1.2.1.1.3.0 | SNMP自启动监控时间 | sysUptime | GET |
.1.3.6.1.2.1.1.4.0 | 系统联系人 | sysContact | GET |
.1.3.6.1.2.1.1.5.0 | 机器名 | SysName | GET |
.1.3.6.1.2.1.1.6.0 | 所在位置 | SysLocation | GET |
.1.3.6.1.2.1.1.7.0 | 提供服务 | SysService | GET |
.1.3.6.1.2.1.25.4.2.1.2 | 系统运行进程列表 | hrSWRunName | WALK |
.1.3.6.1.2.1.25.6.3.1.2 | 系统安装列表 | hrSWInstalledName | WALK |
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import os | |
import click | |
import logging | |
import re | |
import subprocess | |
import time |
package main | |
import ( | |
"bytes" | |
"context" | |
"crypto/tls" | |
"encoding/base64" | |
"encoding/json" | |
"encoding/pem" | |
"flag" |