go control docker

https://blog.kowalczyk.info/article/w4re/using-mysql-in-docker-for-local-testing-in-go.html https://github.com/kjk/go-cookbook/tree/master/start-mysql-in-docker-go

繼續閱讀

http://colobu.com/2017/03/07/what-is-in-linux-cached/#more slabtop -s c ====================== pcstat https://github.com/tobert/pcstat #!/bin/bash #you have to install pcstat if \[ ! \-f /data0/brokerproxy/pcstat \] then echo "You haven't installed pcstat yet" echo "run \\"go get github.com/tobert/pcstat\\" to install" exit fi #find the top 10 processs' cache file ps \-e -o pid,rss|sort -nk2 -r|head -10 |awk '{print $1}'\>/tmp/cache.pids #find all the processs' cache file #ps -e -o pid>/tmp/cache.pids if \[ \-f /tmp/cache.files \] then echo "the cache.

繼續閱讀

go aws ec2 control

package main import ( “fmt”  “log” “net/http”  “io/ioutil”  “github.com/gorilla/mux”  “github.com/smartystreets/go-aws-auth” ) func stopEC2InstanceHandler(w http.ResponseWriter, req *http.Request) {  vars := mux.Vars(req)  w.Write([]byte(fmt.Sprintf(“stopEC2InstanceHandler: %v \n\n”, vars[“id”])))  var Action = “StopInstances” //check aws website  var Version = “2016-11-15” //need to check api version from aws website //regoin need to check url from aws website. ex: ap-northeast-2 //some region no support some action  apiUrl := “https://ec2.

繼續閱讀

go crawler

https://codereview.stackexchange.com/questions/70263/go-go-gadget-web-crawler https://github.com/PuerkitoBio/gocrawl

繼續閱讀

rtmp srs

https://github.com/ossrs/srs https://github.com/ossrs/srs/wiki/v2_CN_Home https://github.com/ossrs/srs/wiki/v1_CN_SampleRTMP https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=srs&starCount=0 http://ossrs.net/srs.release/releases/ ====低延时配置====== https://github.com/ossrs/srs/wiki/v2_CN_LowLatency 考虑GOP-Cache和累积延迟,推荐的低延时配置如下(参考min.delay.com): # the listen ports, split by space. listen 1935; vhost __defaultVhost__ {  gop_cache off;  queue_length 10;  min_latency on;  mr { enabled off; }  mw_latency 100;  tcp_nodelay on; } 当然,服务器的性能也要考虑,不可以让一个SRS进程跑太高带宽,一般CPU在80%以下不会影响延迟,连接数参考性能。

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan