centos7-sar工具的安装过程及其简单应用
一、sar工具安装
1、进入yum配置文件目录:
cd /etc/yum.repos.d/
2、vi CentOS-Base.repo命令创建文件CentOS-Base.repo
文件内容见网页:http://mirrors.163.com/.help/CentOS7-Base-163.repo
具体内容如下:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
3、更新:yum update
系统报错:Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
4、使用yum install deltarpm安装deltarpm
5、使用yum install sysstat安装sar工具
6、第一次执行sar系统报错:无法打开 /var/log/sa/sa18: 没有那个文件或目录,可以忽略,稍等一会儿再执行sar,OK运行成功
7、sysstat包安装成功后,一般如下的几个命令可以使用:
sar
iostat
sa1
sa2
sadf
mpstat
sadc
sysstat
二、sar工具使用
1、查看CPU使用情况 sar 2 3
//每隔2秒,显示3次,CPU使用的情况

2、查看网络吞吐量 sar -n DEV 2 3
//每隔2秒,显示3次,网络吞吐量情况
[root@host187 opbill]# sar -n DEV 2 3
Linux 3.10.0-327.22.2.el7.x86_64 (host187.eayun.com) 2016年08月18日 _x86_64_ (24 CPU)
10时02分42秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
10时02分44秒 vnet7 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet9 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet1 0.00 7.50 0.00 0.64 0.00 0.00 0.00
10时02分44秒 ovs-system 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 eayunosmgmt 21.50 14.50 11.42 7.46 0.00 0.00 0.00
10时02分44秒 br-int 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet6 0.00 7.50 0.00 0.64 0.00 0.00 0.00
10时02分44秒 br-tun 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 bond0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet3 1.00 8.50 0.19 5.52 0.00 0.00 0.00
10时02分44秒 eth0 19.00 11.50 2.83 2.31 0.00 0.00 3.00
10时02分44秒 eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 eth2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 eth3 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 eth4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 eth5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 lo 16.00 16.00 6.78 6.78 0.00 0.00 0.00
10时02分44秒 vnet10 0.00 7.50 0.00 0.64 0.00 0.00 0.00
10时02分44秒 vnet8 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 ;vdsmdummy; 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 vnet11 0.00 7.50 0.00 0.64 0.00 0.00 0.00
10时02分44秒 vnet2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分44秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
10时02分46秒 vnet7 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet9 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet1 0.50 6.00 0.02 0.42 0.00 0.00 0.00
10时02分46秒 ovs-system 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 eayunosmgmt 8.50 3.50 1.38 2.58 0.00 0.00 0.00
10时02分46秒 br-int 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet6 0.00 6.00 0.00 0.42 0.00 0.00 0.00
10时02分46秒 br-tun 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 bond0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet3 2.00 7.50 0.45 1.57 0.00 0.00 0.00
10时02分46秒 eth0 16.50 6.00 10.10 1.92 0.00 0.00 4.50
10时02分46秒 eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 eth2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 eth3 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 eth4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 eth5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 lo 9.50 9.50 0.89 0.89 0.00 0.00 0.00
10时02分46秒 vnet10 0.00 6.00 0.00 0.42 0.00 0.00 0.00
10时02分46秒 vnet8 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 ;vdsmdummy; 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 vnet11 0.00 6.00 0.00 0.42 0.00 0.00 0.00
10时02分46秒 vnet2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分46秒 IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
10时02分48秒 vnet7 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet9 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet1 0.00 7.50 0.00 0.59 0.00 0.00 0.00
10时02分48秒 ovs-system 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 eayunosmgmt 7.50 2.00 0.52 1.38 0.00 0.00 0.00
10时02分48秒 br-int 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet6 0.50 7.50 0.02 0.59 0.00 0.00 0.00
10时02分48秒 br-tun 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 bond0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet3 0.00 7.50 0.00 0.59 0.00 0.00 0.00
10时02分48秒 eth0 9.50 3.00 1.44 1.51 0.00 0.00 4.50
10时02分48秒 eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 eth2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 eth3 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 eth4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 eth5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 lo 8.00 8.00 5.22 5.22 0.00 0.00 0.00
10时02分48秒 vnet10 0.00 7.50 0.00 0.59 0.00 0.00 0.00
10时02分48秒 vnet8 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 ;vdsmdummy; 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
10时02分48秒 vnet11 0.00 7.50 0.00 0.59 0.00 0.00 0.00
10时02分48秒 vnet2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
平均时间: vnet7 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet9 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet1 0.17 7.00 0.01 0.55 0.00 0.00 0.00
平均时间: ovs-system 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: eayunosmgmt 12.50 6.67 4.44 3.80 0.00 0.00 0.00
平均时间: br-int 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet6 0.17 7.00 0.01 0.55 0.00 0.00 0.00
平均时间: br-tun 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: bond0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet3 1.00 7.83 0.22 2.56 0.00 0.00 0.00
平均时间: eth0 15.00 6.83 4.79 1.91 0.00 0.00 4.00
平均时间: eth1 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: eth2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: eth3 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: eth4 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: eth5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: lo 11.17 11.17 4.29 4.29 0.00 0.00 0.00
平均时间: vnet10 0.00 7.00 0.00 0.55 0.00 0.00 0.00
平均时间: vnet8 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet0 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: ;vdsmdummy; 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet5 0.00 0.00 0.00 0.00 0.00 0.00 0.00
平均时间: vnet11 0.00 7.00 0.00 0.55 0.00 0.00 0.00
平均时间: vnet2 0.00 0.00 0.00 0.00 0.00 0.00 0.00
3、查看内存使用情况 sar -r 2 3
//每隔2秒,显示3次,内存使用的情况

4、性能收集调整方法
系统信息
[root@host187 sa]# uname -a
Linux host187.eayun.com 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
性能收集配置文件
[root@host187 sa]# cat /etc/cron.d/sysstat
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# 0 * * * * root /usr/lib64/sa/sa1 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A
参数说明
1、/etc/cron.d/sysstat为一个定时作业的格式编写的,我们可以自己调整它的执行时间间隔,要求每分钟执行一次,可将“*/10”改成“*/1”。
2、 */10 * * * * root /usr/lib64/sa/sa1 1 1 这一行的作用是执行sa1收集系统性能,后面的“1 1”表示sa1每次只执行一次,每次的性能收集时间跨度为一秒。
3、 53 23 * * * root /usr/lib64/sa/sa2 -A 这使用是:每天的23:53分生成当天的性能数据。
系统性能数据记录文件
上面说到的由sa1生成的性能数据不明白的可以看下面两个文件的生成时间给出的实例,一个是:09-21 23:50 另一个是:09-21 23:53。
4、[D]日期中的天数
sa[D]:表示性能原始数据收集的日期。不懂的可以看下面的实例说明,如果这个也看不懂的话,就回去磨墙吧。
sar[D]:这个是由sa2这个脚本调用sa[D]生成的,人可读的性能数据记录。
下面是实例:
[root@host187 sa]# ls -al /var/log/sa/sa18
-rw-r--r--. 1 root root 53204 8月 18 10:10 /var/log/sa/sa18
默认的保留天数为:28天,需要修改保留天数的可以在下面的文件中修改。
[root@host187 sa]# cat /etc/sysconfig/sysstat
# sysstat-10.1.5 configuration file.
# How long to keep log files (in days).
# If value is greater than 28, then log files are kept in
# multiple directories, one for each month.
HISTORY=28
# Compress (using gzip or bzip2) sa and sar files older than (in days):
COMPRESSAFTER=31
# Parameters for the system activity data collector (see sadc manual page)
# which are used for the generation of log files.
SADC_OPTIONS="-S DISK"
# Compression program to use.
ZIP="bzip2"
把上面的HISTORY=DAY,DAY为你想要的保留天数。
默认性能的收集策略是不收集磁盘性能数据到sa[D]文件中的,如果要收集磁盘的数据,我们就要手工修改/usr/lib64/sa/sa1文件,修改方式如下:
在exec ${ENDIR}/sadc -F -L 1 1 - 改为exec ${ENDIR}/sadc -F -d -L 1 1 -
将exec ${ENDIR}/sadc -F -L $* - 改为exec ${ENDIR}/sadc -F -d -L $* -
修改后的结果如下:
[root@host187 sa]# cat /usr/lib64/sa/sa1
#!/bin/sh
# /usr/lib64/sa/sa1
# (C) 1999-2012 Sebastien Godard (sysstat <at> orange.fr)
#
#@(#) sysstat-10.1.5
#@(#) sa1: Collect and store binary data in system activity data file.
#
# Set default value for some variables.
# Used only if ${SYSCONFIG_DIR}/sysstat doesn't exist!
HISTORY=0
SADC_OPTIONS=""
DDIR=/var/log/sa
DATE=`date +%d`
CURRENTFILE=sa${DATE}
CURRENTDIR=`date +%Y%m`
SYSCONFIG_DIR=/etc/sysconfig
umask 0022
[ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat
if [ ${HISTORY} -gt 28 ]
then
cd ${DDIR} || exit 1
[ -d ${CURRENTDIR} ] || mkdir -p ${CURRENTDIR}
# If ${CURRENTFILE} exists and is a regular file, then make sure
# the file was modified this day (and not e.g. month ago)
# and move it to ${CURRENTDIR}
[ ! -L ${CURRENTFILE} ] &&
[ -f ${CURRENTFILE} ] &&
[ "`date +%Y%m%d -r ${CURRENTFILE}`" = "${CURRENTDIR}${DATE}" ] &&
mv -f ${CURRENTFILE} ${CURRENTDIR}/${CURRENTFILE}
touch ${CURRENTDIR}/${CURRENTFILE}
# Remove the "compatibility" link and recreate it to point to
# the (new) current file
rm -f ${CURRENTFILE}
ln -s ${CURRENTDIR}/${CURRENTFILE} ${CURRENTFILE}
else
# If ${CURRENTFILE} exists, is a regular file and is from a previous
# month then delete it so that it is recreated by sadc afresh
[ -f ${CURRENTFILE} ] && [ "`date +%Y%m -r ${CURRENTFILE}`" -lt "${CURRENTDIR}" ] && rm -f ${CURRENTFILE}
fi
ENDIR=/usr/lib64/sa
cd ${ENDIR}
[ "$1" = "--boot" ] && shift && BOOT=y || BOOT=n
if [ $# = 0 ] && [ "${BOOT}" = "n" ]
then
# Note: Stats are written at the end of previous file *and* at the
# beginning of the new one (when there is a file rotation) only if
# outfile has been specified as '-' on the command line...
exec ${ENDIR}/sadc -F -d -L ${SADC_OPTIONS} 1 1 -
else
exec ${ENDIR}/sadc -F -d -L ${SADC_OPTIONS} $* -
fi
配置验证
这个要在系统中查看执行:sar -d -f /var/log/sa/sa[D],当天为18日则执行如下:sar -d -f /var/log/sa/sa18 ,有以下输出证明已经有效果了哦。
[root@host187 sa]# sar -d -f /var/log/sa/sa18 |more
Linux 3.10.0-327.22.2.el7.x86_64 (host187.eayun.com) 2016年08月18日 _x86_64_ (24 CPU)
09时50分01秒 DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util
10时00分02秒 dev8-16 18.25 0.00 411.08 22.52 0.00 0.08 0.08 0.15
10时00分02秒 dev8-0 45.58 337.24 15785.69 353.75 0.09 2.00 0.51 2.33
10时00分02秒 dev8-32 0.05 0.39 0.00 8.00 0.00 0.03 0.03 0.00
10时00分02秒 dev8-48 75.68 1811.04 753.89 33.89 0.23 3.06 3.01 22.81
10时00分02秒 dev8-64 0.05 0.39 0.00 8.00 0.00 0.45 0.45 0.00
10时00分02秒 dev8-80 1.43 11.42 0.00 8.00 0.00 0.07 0.07 0.01
10时00分02秒 dev8-96 3.15 28.90 0.00 9.17 0.00 0.12 0.12 0.04
10时00分02秒 dev253-0 12.64 51.76 213.09 20.95 0.01 0.57 0.14 0.18
10时00分02秒 dev253-1 0.27 0.00 2.17 8.00 0.00 0.52 0.28 0.01
10时00分02秒 dev8-112 67.78 1095.88 241.28 19.73 0.05 0.79 0.77 5.23
……………………
有下面的输出就需要查原因了:
[root@host187 sa]# sar -d -f /var/log/sa/sa29
Requested activities not available in file
[root@host187 sa]#
方法有:
ü 重启一下sysstat服务。
ü 查看一下sysstat服务的配置,修改成随系统自启动的方式。
[root@host187 sa]#chkconfig sysstat --list
sysstat 0:off 1:off 2:on 3:on 4:off 5:on 6:off
[root@host187 sa]#
centos7-sar工具的安装过程及其简单应用的更多相关文章
- Hadoop集群中pig工具的安装过程记录
在Hadoop环境中安装了pig工具,安装过程中碰到了一些问题,在此做一下记录: 主要安装流程参考:http://www.cnblogs.com/yanghuahui/p/3768270.html ...
- VMware workstation16 中Centos7下MySQL8.0安装过程+Navicat远程连接
1.MySQL yum源安装 2.安装后,首次登录mysql以及密码配置3.远程登录问题(Navicat15为例) 一.CentOS7+MySQL8.0,yum源安装1.安装mysql前应卸载原有my ...
- Kali Linux虚拟机安装完整安装过程及简单配置(视频)
点击播放视频 附:视频中出现的两个txt文本,包含了大致的安装与配置过程: 文本1:KaliLinux虚拟机安装和初步配置 Kali Linux虚拟机安装和初步配置 大家好,今天给大家演示一下在VMw ...
- Centos7中MySQL8.0安装过程及遇到的问题记录
本文主要参考以下2篇文章,安装操作 https://www.miboxapp.com/article/detail/1146659339214393344 https://blog.csdn.net/ ...
- Centos7.3-mysql5.7复制安装过程
一.环境 192.168.56.102 为主服务器 192.168.56.101 为从服务器 Mysql5.7.20 二进制安装包环境 1. 下载免编译安装包并进行安装 从官网下载 mysql-5.7 ...
- SDPLR的安装过程(matlab)
SDPLR 半正定规划优化工具的安装过程很简单,只要按照SDPLR 1.03-beta User's Guide (short version).pdf的介绍安装就可以. 运行在下载的工具包目录里运行 ...
- 离线微博工具Open Live Writer(Windows Live Writer)安装过程及server error 500错误解决
必备条件: .net framework 3.5框架(大概是要求3.5或以上,不确定,好像没有人遇到和这个相关的问题) 2017年7月27日最新官方版0.6.2英文离线客户端网盘下载(官网的安装包无法 ...
- vue.js 安装过程(转载)
一.简介 Vue.js 是什么 Vue.js(读音 /vjuː/, 类似于 view) 是一套构建用户界面的 渐进式框架.与其他重量级框架不同的是,Vue 采用自底向上增量开发的设计.Vue 的核 ...
- Linux 进程管理工具 supervisord 安装及使用
Supervisor是用Python实现的一款非常实用的进程管理工具 1.安装过程非常简单 安装python 安装meld3-0.6.8.tar.gz 安装supervisor-3.0a12.tar. ...
随机推荐
- 【bzoj3576】[Hnoi2014]江南乐 博弈论+SG定理+数学
题目描述 两人进行 $T$ 轮游戏,给定参数 $F$ ,每轮给出 $N$ 堆石子,先手和后手轮流选择石子数大于等于 $F$ 的一堆,将其分成任意(大于1)堆,使得这些堆中石子数最多的和最少的相差不超过 ...
- 802.1p 优先级与内部优先级的映射关系
缺省情况下,所有华为 S 系列交换机的 802.1P 优先级 与内部优先级的映射关系是 一 样的,如表 10-3 所示.从中可以看出,这些交换机中 802.1p 优先级与内部优先级的缺省映射关系是按等 ...
- Linux基础------文件打包解包---tar命令,文件压缩解压---命令gzip,vim编辑器创建和编辑正文件,磁盘分区/格式化,软/硬链接
作业一:1) 将用户信息数据库文件和组信息数据库文件纵向合并为一个文件/1.txt(覆盖) cat /etc/passwd /etc/group > /1.txt2) 将用户信息数据库文件和用户 ...
- 【神仙题】【CF28D】 Don't fear, DravDe is kind
传送门 Description 一个有N辆卡车的车队从城市Z驶向城市3,来到了一条叫做"恐惧隧道"的隧道.在卡车司机中,有传言说怪物DravDe在那条隧道里搜寻司机.有些司机害怕先 ...
- Linux之多线程20160705
简单介绍一下多线程的API,线程的概念类似与一个任务或者说一个函数,线程一旦被创建就会运行,具体使用方法可以在Linux下使用man 命令查看: pthread_t:线程ID pthread_attr ...
- SpringMVC 国际化问题
1.首先在src文件下添加3个properties文件 a.message.properties message.username=UserName message.password=Password ...
- selenium - switch_to.frame()- 内嵌表单的切换
表单嵌套frame/iframe webDriver只能在一个页面上对元素识别和定位,对于frame/iframe表单内嵌页面上的元素无法直接定位,此时就需要通过switch_to.frame()方法 ...
- springMVC和mybatis的原理
mybatis是什么? mybatis是一个持久层框架,是apache下的开源项目,前身是itbatis,是一个不完全的ORM框架,mybatis提供输入和输出的映射,需要程序员自己写sql语句,my ...
- 5.UiScrollable API 详细介绍
Tip: 1.扫动过程中如果界面停留在滚动条的中间部分会先回到起点再进行滚动 2.扫动过程中设置的步长长短决定划过内容的多少,步长越长滑过的内容就越少:步长越短划过的内容就越长 一.UiScrolla ...
- tf.slice函数解析
tf.slice函数解析 觉得有用的话,欢迎一起讨论相互学习~Follow Me tf.slice(input_, begin, size, name = None) 解释 : 这个函数的作用是从输入 ...