04 2019 档案
摘要:The requiretty option in sudoers file The requiretty if set in sudo config file sudoers, sudo will only run when the user is logged in to a real tty.
阅读全文
摘要:在linux系统上有时发现使用df 查看磁盘已使用空间和使用du统计的不相等,例如: [running]root@slave11:/$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.9G 4.0G 5.4G 43% / /d
阅读全文
摘要:➜ ~ pythonPython 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2Type "help", "copyright", "credits" or "licen
阅读全文
摘要:We may drop the file system caches on Linux to free up memory for applications. Kernels 2.6.16 and newer provide a mechanism via the /proc/ to make th
阅读全文
摘要:a) Create Volume cinder create 1 --display-name admin-volume1 cinder create --display-name VOLNAME SIZE(SIZE的单位为GB)b) Delete Volume cinder delete volu
阅读全文
摘要:把下面内容放到.bashrc中,或者直接执行也行。 export OS_USERNAME=adminexport OS_PASSWORD=admin #根据实际密码来设 export OS_PROJECT_NAME=adminexport OS_AUTH_URL=http://localhost:3
阅读全文
摘要:本文目的在于分析Linux内存管理机制的slab分配器。内核版本为2.6.31。1. SLAB分配器内核需要经常分配内存,我们在内核中最常用的分配内存的方式就是kmalloc了。前面讲过的伙伴系统只支持按页分配内存,但这个单位太大了,有时候我们并不需要这么大的内存,比如我想申请128字节的空间,如果
阅读全文
摘要:本文目的在于分析Linux内存管理机制中的伙伴系统。内核版本为2.6.31。1. 伙伴系统的概念在系统运行过程中,经常需要分配一组连续的页,而频繁的申请和释放内存页会导致内存中散布着许多不连续的页,这样,当某一时刻要申请一块较大的连续内存时,虽然系统内存余量足够,即很多页是空闲的,但找不到一大块连续
阅读全文
摘要:1. 使用buddy系统管理ZONE我的这两篇文章buddy系统和slab分配器已经分析过buddy和slab的原理和源码,因此一些细节不再赘述。所有zone都是通过buddy系统管理的,buddy system由Harry Markowitz在1963年提出。buddy的工作方式我就不说了,简单来
阅读全文
摘要:glocktop: Display or print active GFS2 locks. Index of glocktop man page Read glocktop man page on Linux: $ man 8 glocktop Index of glocktop man page
阅读全文
摘要:1、AST简介 DLM进程(LMON、LMD)之间的跨实例通信是使用高速互联上的IPC层实现的。为了传递锁资源的状态,DLM使用了异步陷阱(AST),它在操作系统处理程序例程中实现为中断。纯粹主义者可能同意AST的确切含义以及它的实现方式(中断或其他阻塞机制),但对于OPS或Oracle RAC来说
阅读全文
摘要:1. min_free_kbytes 先看官方解释: This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a waterma
阅读全文
摘要:https://blog.csdn.net/bullbat/article/details/7194794 https://blog.csdn.net/qq_26626709/article/details/52742484 https://blog.csdn.net/wfreehorse/arti
阅读全文
摘要:为什么要有NUMA 在NUMA架构出现前,CPU欢快的朝着频率越来越高的方向发展。受到物理极限的挑战,又转为核数越来越多的方向发展。如果每个core的工作性质 都是share-nothing(类似于map-reduce的node节点的作业属性),那么也许就不会有NUMA。由于所有CPU Core都是
阅读全文
摘要:global中增加下面内容。 [global] use sendfile = yes write raw = yes read raw = yes max xmit = 65535 aio read size = 16384 aio write size = 16384 enable core fi
阅读全文
摘要:http://www.penglixun.com/tech/system/linux_cache_discovery.html
阅读全文
摘要:从官网下载相应版本。 https://iperf.fr/iperf-download.php centos7 安装 rpm -i iperf3-3.1.3-1.fc24.x86_64.rpm ubuntu18.04安装 sudo dpkg -i libiperf0_3.1.3-1_amd64.deb
阅读全文
摘要:一、前言 云计算与集群系统密不可分,作为分布式计算和集群计算的集大成者,云计算的基础设施必须通过集群进行管理控制,而作为拥有大量资源与节点的集群,必须具备一个强大的集群资源管理器(Cluster system Manager, CSM)来调度和管理集群资源。对于任何集群而言,集群资源管理器是整个集群
阅读全文
摘要:1. Strong Reference StrongReference 是 Java 的默认引用实现, 它会尽可能长时间的存活于 JVM 内, 当没有任何对象指向它时 GC 执行后将会被回收 2. WeakReference & WeakHashMap WeakReference, 顾名思义, 是一
阅读全文
摘要:先看看什么是标记接口?标记接口有时也叫标签接口(Tag interface),即接口不包含任何方法。 在Java里很容易找到标记接口的例子,比如JDK里的Serializable接口就是一个标记接口。 首先明确一点,Marker Interface(标记接口)决不是Java这门编程语言特有的,而是计
阅读全文
摘要:高可用性HA(High Availability)指的是通过尽量缩短因日常维护操作(计划)和突发的系统崩溃(非计划)所导致的停机时间,以提高系统和应用的可用性。HA系统是目前企业防止核心计算机系统因故障停机的最有效手段。 实现HA的方式,一般采用两台机器同时完成一项功能,比如数据库服务器,平常只有一
阅读全文
摘要:samba在运行时,Samba 存储许多信息,从本地密码到希望从中收到信息的一系列客户端。这类数据其中一些是暂时的,在 Samba 重启时可能会被丢弃,但是另一些却是永久的,不会被丢弃。这类数据可能是很大的,也可能是不经常访问只是在内存中保留,或者在重启时保持存在。要满足这些要求,Samba 团队创
阅读全文
摘要:Chrony是一个开源的自由软件,像CentOS 7或基于RHEL 7操作系统,已经是默认服务,默认配置文件在 /etc/chrony.conf 它能保持系统时间与时间服务器(NTP)同步,让时间始终保持同步。 相对于NTP时间同步软件,占据很大优势。其用法也很简单。 Chrony有两个核心组件,分
阅读全文
摘要:Understanding NFS Caching Filesystem caching is a great tool for improving performance, but it is important to balance performance with data safety. C
阅读全文
摘要:OTOH n 网络用语 On the Other Hand 另一方面 [例句]OTOH, pressure on the keys of a digital AFTER bottoming can be significant. 压在了数字键后触底可能会很大。
阅读全文
摘要:选择文字段后输入:Ctrl+Alt+C可以插入评论,但会出现: unknown author解决方法:Tools>Options>LibreOffice>User Data. First/Last name/initials中填写名字就行了。
阅读全文
摘要:blockdev --getra /dev/sdablockdev --setra 2048 /dev/sda必须将其写入配置文件/etc/rc.local,否则重启就会失效。[root@localhost ~]# echo '/sbin/blockdev --setra 2048 /dev/sda
阅读全文
摘要:解决方法:/mnt/demo 10.0.1.57(fsid=0,rw,async) //加入fsid=0参数就可。
阅读全文
摘要:NFS的缓存IO机制<一> async 参数模式下分析 NFS 默认的mount参数为async,async 参数表示内核不会透传程序的IO请求给sever,对于写IO会延迟执行,积累一定的时间以便合并上层的IO请求以提高效率。 读分析 1: 顺序读请求的合并预读 dd if=/mnt/nfs/3
阅读全文
摘要:如何快速的吃掉一段内存:通过tmpfs来划一片领地,再用dd去粗暴占用mount -t tmpfs -o size=512M tmpfs /mnt/demodd if=/dev/zero of=/mnt/demo/file bs=1M count=512 浅析Linux的共享内存与tmpfs文件系统
阅读全文
摘要:http://www.cnblogs.com/artech/archive/2007/03/04/663728.html 关于字符串的驻留的机制,对于那些了解它的人肯定会认为很简单,但是我相信会有很大一部分人对它存在迷惑。在开始关于字符串的驻留之前,先给出一个有趣的Sample: Code Snip
阅读全文
摘要:https://www.golinuxcloud.com/java-interview-questions-answers-experienced-2/ 75. What is the meaning of Immutable in the context of String class in Ja
阅读全文
摘要:StringBuffer类和String一样,也用来代表字符串,只是由于StringBuffer的内部实现方式和String不同,所以StringBuffer在进行字符串处理时,不生成新的对象,在内存使用上要优于String类。 所以在实际使用时,如果经常需要对一个字符串进行修改,例如插入、删除等操
阅读全文
摘要:What are the different types of References in Java? In Java, there are four types of references:
阅读全文
摘要:Volatile修饰的成员变量在每次被线程访问时,都强迫从主内存中重读该成员变量的值。而且,当成员变量发生变化时,强迫线程将变化值回写到主内存。这样在任何时刻,两个不同的线程总是看到某个成员变量的同一个值。 Java语言规范中指出:为了获得最佳速度,允许线程保存共享成员变量的私有拷贝,而且只当线程进
阅读全文
摘要:How is Abstraction different from Encapsulation? Abstraction happens at class level design. It results in hiding the implementation details. Encapsula
阅读全文
摘要:What is the difference between method overloading and method overriding in Java? Differences between method overloading and overriding are: Method ove
阅读全文
摘要:java 中 静态块的作用 (一)java 静态代码块 静态方法区别一般情况下,如果有些代码必须在项目启动的时候就执行的时候,需要使用静态代码块,这种代码是主动执行的;需要在项目启动的时候就初始化,在不创建对象的情况下,其他程序来调用的时候,需要使用静态方法,这种代码是被动执行的. 静态方法在类加载
阅读全文
摘要:Why there are no pointers in Java? In Java there are references instead of pointers. These references point to objects in memory. But there is no dire
阅读全文
摘要:How aggregation and composition are different concepts? In OOPS, Aggregation and Composition are the types of association relations. A composition is
阅读全文
摘要:Main principles of Object Oriented Programming (OOPS) are: Abstraction Encapsulation Inheritance Polymorphism
阅读全文
摘要:Now in this article I will show you steps to prevent or restrict access of root user to access certain files or directories. Now by default root is th
阅读全文
摘要:Key directories in the file system: */: Root directory (base of file system) /bin: Executable programs /boot: Linux kernel and boot loader /dev: Speci
阅读全文
摘要:Apropos adj. 恰当的,关于,就...而言 adv. 顺便地,恰当地 All my suggestions apropos the script were accepted. 我所有有关该剧本的建议均被采纳了。 apropos 在 whatis 数据库中查找字符串 补充说明 apropos
阅读全文