摘要:
1、设置进程的cpu亲和性程序如下,#Using:g++ setCpuAffinity.c -o setCpuAffinity#include#include#include//#define __USE_GNU#include#include#include#include#includeint main(int argc, char* argv[]){ int num = sysconf(_SC_NPROCESSORS_CONF); int created_thread = 0; int myid, pid; int i; ... 阅读全文
摘要:
首先安装ntp server, yum install -y ntp 修改ntp server 配置文件,vi /etc/ntp.conf###change for self-network# Hosts on local network are less restricted.restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap 配置server端硬件时间同步,vi /etc/sysconfig/ntpd###modify# Set to 'yes' to sync hw clock after successful 阅读全文
摘要:
1、vmstat 从整个系统的角度观察系统各项资源的使用情况,包括cpu、内存、磁盘等:procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 72628 44156 684676 0 0 0 0 22 24 0 0 100 0 0 0 0 0 ... 阅读全文