随笔分类 -  Linux

摘要: 阅读全文
posted @ 2021-01-11 21:55 tigergaonotes 阅读(71) 评论(0) 推荐(0)
摘要:① 物理CPU 实际Server中插槽上的CPU个数 物理cpu数量,可以数不重复的 physical id 有几个 ② 逻辑CPU Linux用户对 /proc/cpuinfo 这个文件肯定不陌生. 它是用来存储cpu硬件信息的 信息内容分别列出了processor 0 – n 的规格。这里需要注 阅读全文
posted @ 2021-01-11 21:45 tigergaonotes 阅读(117) 评论(0) 推荐(0)
摘要:free是完全没有占用的空闲内存,Available 减 free是操作系统为了优化运行速度拿来调用的内存, 程序需要的话操作系统会进行释放。所以一般看Available即可。 free+buffer+cache 阅读全文
posted @ 2021-01-03 21:14 tigergaonotes 阅读(139) 评论(0) 推荐(0)
摘要:手把手教你用Strace诊断问题 发表于2015-10-16 早些年,如果你知道有个 strace 命令,就很牛了,而现在大家基本都知道 strace 了,如果你遇到性能问题求助别人,十有八九会建议你用 strace 挂上去看看,不过当你挂上去了,看着满屏翻滚的字符,却十有八九看不出个所以然。本文通 阅读全文
posted @ 2020-12-27 20:58 tigergaonotes 阅读(117) 评论(0) 推荐(0)
摘要:#!/bin/bash file1=`du -sm /var/www/vhosts/|awk '{print $1}'` ps=`ps -C rsync --no-header|wc -l` if [ "$file" = "11517" ];then echo "files downloaded!" 阅读全文
posted @ 2020-12-24 22:11 tigergaonotes 阅读(109) 评论(0) 推荐(0)
摘要:#!/usr/bin/expect spawn /usr/bin/ssh root@192.168.43.43 -p 22 expect "password:" send "tigergao\r" expect efo interact 阅读全文
posted @ 2020-12-24 22:08 tigergaonotes 阅读(61) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-12-24 22:05 tigergaonotes 阅读(124) 评论(0) 推荐(0)
摘要:-e filename 如果 filename存在,则为真 -d filename 如果 filename为目录,则为真 -f filename 如果 filename为常规文件,则为真 -L filename 如果 filename为符号链接,则为真 -r filename 如果 filename 阅读全文
posted @ 2020-12-22 22:14 tigergaonotes 阅读(371) 评论(0) 推荐(0)
摘要:#!/bin/bash for i in `seq 1 20` do if ping -w 2 -c 1 192.168.43.$i | grep "100%" > /dev/null;then echo "192.168.43.$i is not reachable" else echo "192 阅读全文
posted @ 2020-12-22 22:12 tigergaonotes 阅读(1983) 评论(0) 推荐(0)
摘要:[root@centos6 /]# netstat -na|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r 6 192.168.43.1 阅读全文
posted @ 2020-12-22 22:11 tigergaonotes 阅读(328) 评论(0) 推荐(0)
摘要:yum -y install nc 在a机器上执行: nc -ul 1080 在b机器上执行:nc -u 服务器ip 1080 a机器可以接收到报文则代表端口正常。 阅读全文
posted @ 2020-12-22 22:09 tigergaonotes 阅读(168) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-12-22 22:06 tigergaonotes 阅读(75) 评论(0) 推荐(0)
摘要:echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag 阅读全文
posted @ 2020-12-22 22:05 tigergaonotes 阅读(167) 评论(0) 推荐(0)
摘要:#!/bin/bash #@date:2019-11-28 #@auth:tigergao #@update_all function depprot() { curdir=`dirname $0` tar xvfz $curdir/update.tgz -C / echo "Finger Prin 阅读全文
posted @ 2020-12-21 19:45 tigergaonotes 阅读(100) 评论(0) 推荐(0)
摘要:https://www.runoob.com/regexp/regexp-syntax.html 正整数 : ^\d+$ 负整数 : ^-\d+$ 电话号码 : ^+?[\d\s]{3,}$ 电话代码 : ^+?[\d\s]+(?[\d\s]{10,}$ 整数 : ^-?\d+$ 用户名 : ^[\ 阅读全文
posted @ 2020-12-21 19:36 tigergaonotes 阅读(62) 评论(0) 推荐(0)
摘要:cow技术 copy on write 实现快照 [root@xiaochen ~]# lvscan ACTIVE '/dev/vg1/lv1' [12.00 GiB] inherit [root@xiaochen ~]# lvs LV VG Attr LSize Pool Origin Data% 阅读全文
posted @ 2020-12-20 21:13 tigergaonotes 阅读(99) 评论(0) 推荐(0)
摘要:find ./ -type f -newermt '2000-01-04 10:30:00' ! -newermt '2019-10-28 10:57:00' -exec cp -a {} /var/log/webraydb/DataPullService/Data_Pull_Service_Fac 阅读全文
posted @ 2020-12-20 21:06 tigergaonotes 阅读(186) 评论(0) 推荐(0)
摘要:当发现某个分区下的inode使用率过大时,需要找到该分区下的某些目录里有哪些文件可以清理。 查找某个目录下一个月或两个月之前的文件,然后删除# find . -type f -mtime +30 |wc -l# find . -type f -mtime +60 |wc -l# find . -ty 阅读全文
posted @ 2020-12-20 20:49 tigergaonotes 阅读(435) 评论(0) 推荐(0)
摘要:然后打开任务管理器找出来结束进程即可 阅读全文
posted @ 2020-12-15 22:05 tigergaonotes 阅读(1280) 评论(0) 推荐(0)
摘要:server端: restrict 192.168.43.36 nomodify notrap nopeer noquery restrict 192.168.43.2 mask 255.255.255.0 nomodify notrap server 127.127.1.0 Fudge 127.127.1.0 stratum 10 内置的时钟服务器 ntp -q 客户端: res... 阅读全文
posted @ 2019-07-17 20:36 tigergaonotes 阅读(207) 评论(0) 推荐(0)