Author: jpuyy

  • mysql双主配置(keepalived)

    keepalived

    ip addr
    crontab
    mysql检测脚本

  • linux taskset将进程指定cpu执行

    两个名词
    SMP (Symmetrical Multi-Processing):指在一个计算机上汇集了一组处理器(多CPU),各CPU之间共享内存子系统以及总线结构。 [更多…]
    CPU affinity:中文唤作“CPU亲和性”,是指在CMP架构下,能够将一个或多个进程绑定到一个或多个处理器上运行。[更多…]

    请先确定你的cpu核心及命名(例如四个核心:0,1,2,3):cat /proc/cpuinfo
    Java代码 收藏代码
    taskset -cp 1 5200
    #把PID为5200的进程运行到CPU#1上
    #也可以在启动进程时指定:
    taskset -c 1 /etc/init.d/mysql start

    linux taskset命令详解

    SYNOPSIS
    taskset [options] [mask | list ] [pid | command [arg]…]
    OPTIONS
    -p, –pid
    operate on an existing PID and not launch a new task
    -c, –cpu-list
    specifiy a numerical list of processors instead of a bitmask.
    The list may contain multiple items, separated by comma, and
    ranges. For example, 0,5,7,9-11.
    -h, –help
    display usage information and exit
    -V, –version
    output version information and exit

  • tune2fs

    sudo tune2fs -l /dev/xvda | grep “Inode size”

  • git用久了之后变的很大

    .git/objects/pack/pack-376650db9982f82b2036b0f9f0d28f47be9809e3.pack

  • php.ini参数整理

    ./etc/php.ini

    ./lib/php.ini

    指定error_log到指定文件

    error_log = /tmp/php_errors.log

    也可以到syslog

  • ci编写webservice(api)整理

    什么是webservice

    W3C描述里说是”a software system designed to support interoperable machine-to-machine iteraction over a network”

    这意味着webservice具有的特质应已经是无论系统和编程语言。

    REST(Representational State Transfer)是一种定义资源URI以实现调用的方法,使用的即是http的GET, POST, PUT, DELETE,后面加上ful表示充分的意思,变成了RESTful.

    定义资源定位符