1.查看所有待挂载设备信息

fdisk -l

# fdisk -l

Disk /dev/sda: 120.0 GB,  bytes
heads, sectors/track, cylinders, total sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x00002f03 Device Boot Start End Blocks Id System
/dev/sda1 * Linux
/dev/sda2 Extended
/dev/sda5 Linux swap / Solaris Disk /dev/sdb: 1000.2 GB, bytes
heads, sectors/track, cylinders, total sectors
Units = sectors of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x3025e656 Device Boot Start End Blocks Id System
/dev/sdb1 HPFS/NTFS/exFAT
/dev/sdb2 HPFS/NTFS/exFAT
/dev/sdb3 HPFS/NTFS/exFAT

2.查看cpu信息

cat /proc/cpuinfo

processor    :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Core(TM) i5- CPU @ .40GHz
stepping :
microcode : 0x19
cpu MHz : 3443.429
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level :
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips : 6796.22
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management: processor :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Core(TM) i5- CPU @ .40GHz
stepping :
microcode : 0x19
cpu MHz : 3399.601
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level :
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips : 6796.22
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management: processor :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Core(TM) i5- CPU @ .40GHz
stepping :
microcode : 0x19
cpu MHz : 3400.000
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level :
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips : 6796.22
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management: processor :
vendor_id : GenuineIntel
cpu family :
model :
model name : Intel(R) Core(TM) i5- CPU @ .40GHz
stepping :
microcode : 0x19
cpu MHz : 3400.000
cache size : KB
physical id :
siblings :
core id :
cpu cores :
apicid :
initial apicid :
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level :
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm
bogomips : 6796.22
clflush size :
cache_alignment :
address sizes : bits physical, bits virtual
power management:

3.查看内存信息

cat /proc/meminfo

cat /proc/meminfo
MemTotal: kB
MemFree: kB
MemAvailable: kB
Buffers: kB
Cached: kB
SwapCached: kB
Active: kB
Inactive: kB
Active(anon): kB
Inactive(anon): kB
Active(file): kB
Inactive(file): kB
Unevictable: kB
Mlocked: kB
HighTotal: kB
HighFree: kB
LowTotal: kB
LowFree: kB
SwapTotal: kB
SwapFree: kB
Dirty: kB
Writeback: kB
AnonPages: kB
Mapped: kB
Shmem: kB
Slab: kB
SReclaimable: kB
SUnreclaim: kB
KernelStack: kB
PageTables: kB
NFS_Unstable: kB
Bounce: kB
WritebackTmp: kB
CommitLimit: kB
Committed_AS: kB
VmallocTotal: kB
VmallocUsed: kB
VmallocChunk: kB
AnonHugePages: kB
HugePages_Total:
HugePages_Free:
HugePages_Rsvd:
HugePages_Surp:
Hugepagesize: kB
DirectMap4k: kB
DirectMap2M: kB

4.硬盘速度测试

hdparm -Tt /dev/sda1

# hdparm -Tt /dev/sda1

/dev/sda1:
Timing cached reads: MB in 2.00 seconds = 11305.77 MB/sec
Timing buffered disk reads: MB in 3.01 seconds = 363.90 MB/sec

5.cron执行定时任务

crontab -l查看定时任务列表

crontab -e 编辑定时任务

5.1简单的定时任务编辑示范

crontab -e

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at a.m every week with:
# * * tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab() and cron()
#
# m h dom mon dow command
#
##每隔一分钟输出时间到文件
*/2 * * * * echodate >> $HOME>test.txt 

5.2 查看定时任务列表

crontab -l

# crontab -l
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at a.m every week with:
# * * tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab() and cron()
#
# m h dom mon dow command
*/ * * * * date >> $HOME>test.txt

5.3查看定时任务运行效果

tail -f ~/test.txt

 tail -f ~/test.txt
2015年 10月 02日 星期五 :: CST
2015年 10月 02日 星期五 :: CST
2015年 10月 02日 星期五 :: CST
2015年 10月 02日 星期五 :: CST

5.4 crontab补充

5.4.1 开启corntab 服务  /etc/init.d/cron start

5.4.2 开机启动corntab

 vim /etc/rc.local 添加需要启动的服务

 例如

  

#!/bin/sh -e
#
# rc.local
#
# when machine startup, blow scripts will run.
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
export HISTTIMEFORMAT="%Y-%m-%d %H:%i:%S `whoami` "
exit
~

5.5 开启crontab日志

将cron.*前面的注释符去掉 

. 修改rsyslog(大致是第10行):

sudo vim /etc/rsyslog.d/-default.conf

#cron.*    /var/log/cron.log 

. 重启rsyslog:

sudo  service rsyslog  restart

. 查看crontab日志:

tail -f /var/log/cron.log | nl 

最新文章

  1. TortoiseGIT创建及合并分支
  2. combox
  3. 51nod1305 Pairwise Sum and Divide
  4. Merkle Patricia Tree (MPT) 树详解
  5. IOS基础——实例变量四种范围类型
  6. Window.onLoad 和 DOMContentLoaded事件的先后顺序
  7. Unity3d大会的部分总结
  8. ASP根据IP来判断跳转页面
  9. hadoop中Combiner使用中需要注意的地方
  10. 解决iOS中tabBarItem图片默认颜色的问题(指定代码渲染模式为以原样模式的方式显示出来)
  11. 13 - NSURLConnection
  12. Spider_Man_5.1 の Mongodb_安装
  13. P1186 玛丽卡
  14. 大数据小白系列——HDFS(3)
  15. tp5 base64 图片上传
  16. linux-nc命令介绍
  17. LiveCharts文档-3开始-8自定义工具提示
  18. 20165336 2017-2018-2 《Java程序设计》第7周学习总结
  19. Linux修改用户密码有效期
  20. 学习推荐-Postgresql学习手册

热门文章

  1. 【T-BABY 夜谈大数据】基于内容的推荐算法
  2. 关于spring mvc的配置文件
  3. 51nod1222最小公倍数计数
  4. Hive_Hive的数据模型_视图
  5. response.setContentType() 作用及参数用法
  6. netty~引用对象引用
  7. Datagridview强制结束编辑状态
  8. 056 Merge Intervals 合并区间
  9. 「干货分享」模块化编程和maven配置实践一则
  10. 原创 html动态表格