自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 sql状态查看

[root@controller2 ~]# mysqlWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 106Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026C

2018-01-04 21:14:52 897

原创 epoll IO EVENT NOTIFICATION FACILITY学习

EPOLL :epoll_create/epoll_ctl/epoll_wait水平触发和边缘触发:使用水平触发的epoll和poll相同。EPOLLET1.管道的read端口rfd注册到epoll2.管道的write端口写2K的数据3.调用epoll_wait等待rfd资源可用4.从rfd读1K的数据5.再次调用epoll_wait步骤5中调用的epoll_wai

2015-11-05 10:15:01 384

原创 Makefile相关知识

最简单的示例:test:test.o listen_sock.ogcc -o test test.o listen_sock.otest.o:test.c listen_sock.hgcc -c test.clisten_sock.o:listen_sock.c listen_sock.hgcc -c listen_sock.c1.每一个 *.c文件都可以对应一个*.o

2015-10-23 10:43:38 244

原创 socket demo1

client:#include #include #include #include #include #include #include int main(int argc,char *argv[]){        int cli_fd,ser_fd;        struct sockaddr_in cli_addr,ser_addr; 

2015-10-12 17:16:32 304

原创 管道pipe&&fifo

1.pipe#include #include #include #include #include #include #include int main(int argc,char *argv[]){        pid_t pid1;        int pipefd[2];        char buf;        if(pipe(p

2015-10-08 19:57:14 301

原创 fcntl文件锁

fcntl的非强制文件锁(锁定后仍可读写),通过F_GETLK判断是否锁定,再决定是否加锁#include #include #include #include #include #include #include #include extern int errno;int main(){        pid_t pid1;   

2015-10-08 19:54:49 322

原创 bash中使用文件锁

#!/bin/shLOCKFILE=/tmp/$(basename $0)if [ -f "$LOCKFILE" ]then    echo "file had been locked !cant open"   exit 1else    echo "now,the file locking !"   touch $LOCKFILEfisleep

2015-09-09 14:33:43 1236

原创 使用open方式的文件锁

#include #include #include #include #include int main(int argc,char *argv[]){        pid_t pid1;        int file1;        char *path1="/home/wy/whatfuck";        pid1=fork();   

2015-09-07 15:59:11 675

原创 mysql常用部分

忘记密码:/etc/my.config 中的mysqld添加skip-grant-tables不区分大小写:lower_case_table_names=1不能远程连接:grant all privileges on *.* to 'root'@‘%’ identified by 'wangyi' with grant option;    flush privilege;更新:u

2015-08-31 17:55:28 291

转载 时间问题

转载:http://blog.sina.com.cn/s/blog_67b7d7e40101gk5v.html首先确认使用utc还是local time.UTC(Universal Time Coordinated)=GMT(Greenwich Mean Time)Local time 是你手表上的时间传统的POSIX计算机(Solaris,bsd,unix)使

2015-08-20 10:10:48 395

翻译 tcpdump笔记

输出网络接口上符合规则的数据包,-w保存输出数据到文件,-r从文件中读数据。-c后面可以接抓包的次数,否则以ctrl+c结束。tcpdump结束时,最后会输出3个信息:captured,resived by filter,droped by kernel。(-c -w的演示)选项:-A 将抓取的包以ASCI码显示,适用于web转包(未使用)-B 设置系统captur

2015-08-20 09:43:57 362

原创 rsync使用小结

rsync工作的基本配置如图,如果要从中心同步数据到节点就在节点上运行rsync --daemon,中心节点上用rsync指令进行同步

2015-08-20 09:33:48 318

原创 linux更换硬盘后的网络设置

两台linux,交换硬盘后执行ifconfig发现没有eth0和eth1,反而有eth2和eth3,其中eth2(对应eth0)为有效网卡,eth3(eth1)未配置。network-script目录下只有eth0(192.168.1.176)和eth1的配置文件,ifconfig显示eth2为dhcp自动分配的ip(192.168.1.254)。解决方法:/etc/udev/rules.d/

2015-07-31 17:43:26 1171

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除