Skip to content

Instantly share code, notes, and snippets.

I0722 08:46:32.476870 1 server.go:271] Using root directory: /var/lib/kubelet
I0722 08:46:32.477429 1 manager.go:127] cAdvisor running in container: "/docker/ed43b50cb884e6d80fe9887b47a1a20e1d793489111613b5954f1b370639bd54"
I0722 08:46:32.478130 1 fs.go:93] Filesystem partitions: map[/dev/mapper/ubuntu--vg-root:{mountpoint:/etc/resolv.conf major:252 minor:0}]
I0722 08:46:32.482897 1 machine.go:229] Couldn't collect info from any of the files in "/etc/machine-id,/var/lib/dbus/machine-id"
I0722 08:46:32.483029 1 manager.go:156] Machine: {NumCores:4 CpuFrequency:2000000 MemoryCapacity:8373030912 MachineID: SystemUUID:42340075-B540-CB27-B52A-919D91B98E64 BootID:00034267-f2dd-4444-92a4-2e346c27173c Filesystems:[{Device:/dev/mapper/ubuntu--vg-root Capacity:48197730304}] DiskMap:map[252:1:{Name:dm-1 Major:252 Minor:1 Size:4290772992 Scheduler:none} 2:0:{Name:fd0 Major:2 Minor:0 Size:0 Scheduler:deadline} 8:0:{Name:sda Major:8 Minor:0 Size:53687091200 Scheduler:deadline} 252:0:{Name:dm-0
I0722 08:46:32.476870 1 server.go:271] Using root directory: /var/lib/kubelet
I0722 08:46:32.477429 1 manager.go:127] cAdvisor running in container: "/docker/ed43b50cb884e6d80fe9887b47a1a20e1d793489111613b5954f1b370639bd54"
I0722 08:46:32.478130 1 fs.go:93] Filesystem partitions: map[/dev/mapper/ubuntu--vg-root:{mountpoint:/etc/resolv.conf major:252 minor:0}]
I0722 08:46:32.482897 1 machine.go:229] Couldn't collect info from any of the files in "/etc/machine-id,/var/lib/dbus/machine-id"
I0722 08:46:32.483029 1 manager.go:156] Machine: {NumCores:4 CpuFrequency:2000000 MemoryCapacity:8373030912 MachineID: SystemUUID:42340075-B540-CB27-B52A-919D91B98E64 BootID:00034267-f2dd-4444-92a4-2e346c27173c Filesystems:[{Device:/dev/mapper/ubuntu--vg-root Capacity:48197730304}] DiskMap:map[252:1:{Name:dm-1 Major:252 Minor:1 Size:4290772992 Scheduler:none} 2:0:{Name:fd0 Major:2 Minor:0 Size:0 Scheduler:deadline} 8:0:{Name:sda Major:8 Minor:0 Size:53687091200 Scheduler:deadline} 252:0:{Name:dm-0
@dalanlan
dalanlan / mux_http.go
Created June 29, 2015 02:08
Simple calculation via restful api with gorilla/mux
package main
import (
"fmt"
"github.com/gorilla/mux"
"net/http"
"net/url"
"strconv"
)
@dalanlan
dalanlan / mux.go
Last active August 29, 2015 14:23
simple example of gorilla/mux pkg
package main
import (
//"fmt"
"github.com/gorilla/mux"
"net/http"
)
func sayHi(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello world!"))
@dalanlan
dalanlan / default_http.go
Created June 26, 2015 08:21
simple calculation via restful request
package main
import (
"fmt"
"net/http"
"strconv"
//"strings"
//"github.com/gorilla/mux"
"net/url"
)
@implementer(ICommandLineScript)
class DeployScript(object):
def main(self, reactor, options):
"""
See :py:meth:`ICommandLineScript.main` for parameter documentation.
:return: A ``Deferred`` which fires when the deployment is complete or
has encountered an error.
"""
deployment = options['deployment']
@dalanlan
dalanlan / flocker-common-script.py
Created March 14, 2015 02:29
FlockerScriptRunner main() function
class FlockerScriptRunner(object):
...
def main(self):
"""Parse arguments and run the script's main function via ``react``."""
# If e.g. --version is called this may throw a SystemExit, so we
# always do this first before any side-effecty code is run:
options = self._parse_options(self.sys_module.argv[1:]) # 解析参数
...
def run_and_log(reactor):
@dalanlan
dalanlan / flocker-cli-script.py
Created March 14, 2015 01:29
flocker-deploy cmd entry
def flocker_deploy_main():
return FlockerScriptRunner(
script=DeployScript(),
options=DeployOptions(),
logging=False,
).main()
@implementer(ICommandLineScript)
class DeployScript(object):