redhat

How to set CPU load on a Red Hat Linux box?

一笑奈何 提交于 2019-12-06 04:53:20
问题 I have a RHEL box that I need to put under a moderate and variable amount of CPU load (50%-75%). What is the best way to go about this? Is there a program that can do this that I am not aware of? I am happy to write some C code to make this happen, I just don't know what system calls will help. 回答1: This is exactly what you need: http://weather.ou.edu/~apw/projects/stress/ From the homepage: "stress is a simple workload generator for POSIX systems. It imposes a configurable amount of CPU,

Redhat HA相关命令(RHCS)

旧街凉风 提交于 2019-12-06 04:21:17
1、监控cluster运行状态: # clustat 显示集群的概要信息 # cman_tool status 查看集群信息 # cman_tool nodes -a 查看各个节点简要信息 举例: #1.1 clustat查看集群状态(最常用) 在节点1查看的,状态中的Local就在节点1上显示。 # clustat Cluster Status for new_cluster @ Tue Sep 1 12:23:09 2015 Member Status: Quorate Member Name ID Status ------ ---- ---- ------ heartdb1 1 Online, Local, rgmanager heartdb2 2 Online, rgmanager Service Name Owner (Last) State ------- ---- ----- ------ ----- service:orares heartdb1 started #1.2 cman_tool status 查看 # cman_tool status Version: 6.2.0 Config Version: 18 # 集群配置文件版本号 Cluster Name: new_cluster # 集群名称 Cluster Id: 23732 Cluster

how to solve 'java.lang.OutOfMemoryError: GC overhead limit exceeded'

风格不统一 提交于 2019-12-06 03:13:31
I read this stack overflow page about solving this problem and tried adding the command line option -XX:-UseGCOverheadLimit and also "-Xmx" arguments. However, my program still threw the out of memory error. The program saves a large number (>40,000 keys) of words into a MultiKeyMap and is running on a server with plenty of memory. Any suggestions on how I can aviod the error? If your problem is reliably reduced (to be honest, even if it's not) I suggest activating the -XX:+HeapDumpOnOutOfMemoryError JVM flag. This will, when there is an OutOfMemoryError , produce a binary dump of the memory.

搭建KVM

ぃ、小莉子 提交于 2019-12-06 02:16:57
系统 &服务管理进阶 搭建 KVM服务器 虚拟化概述 • virtualization 资源管理 – x 个物理资源 --> y 个逻辑资源 – 实现程度 : 完全、部分、硬件辅劣 (CPU) 虚拟化概述 ( 续 1) • 虚拟化主要厂商及产品 系 列 PC/ 服务器版代表 VMware VMware Workstation 、 vSphere Microsoft VirtualPC 、 Hyper-V RedHat KVM 、 RHEV Citrix Xen Oracle Oracle VM VirtualBox yum 软件组管理 • 快速配置 RHEL7 光盘源 – 为虚拟机连接 RHEL7 光盘镜像 , 并挂载到固定位置 [root@kvmsvr ~]# mkdir /mnt/dvd // 创建挂载点 [root@kvmsvr ~]# vim /etc/fstab // 添加开机挂载配置 .. .. /dev/cdrom /mnt/dvd iso9660 ro 0 0 [root@kvmsvr ~]# mount -a // 挂载光盘 – 添加到 file:///mnt/dvd 的本地 YUM 源配置 [root@kvmsvr ~]# yum-config-manager --add file:///mnt/dvd [root@kvmsvr ~]# vim /etc/yum

Number of subdirectories in a directory?

我只是一个虾纸丫 提交于 2019-12-05 23:27:41
How to find the number of subdirectories in a specified directory in HDFS? When I do hadoop fs -ls /mydir/ , I get a Java heap space error, since the directory is too big, but what I am interested in is the number of subdirectories in that directory. I tried: gsamaras@gwta3000 ~]$ hadoop fs -find /mydir/ -maxdepth 1 -type d -print| wc -l find: Unexpected argument: -maxdepth 0 I know that the directory is not empty, thus 0 is not correct: [gsamaras@gwta3000 ~]$ hadoop fs -du -s -h /mydir 737.5 G /mydir daemon12 The command to use is: hdfs dfs -ls -R /path/to/mydir/ | grep "^d" | wc -l But this

Redhat更换Centos源

白昼怎懂夜的黑 提交于 2019-12-05 22:36:45
redhat默认自带的yum源需要注册,才能更新,报错: This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 可替换为centos对应的源。 操作如下: 1、删除redhat原有的yum rpm -aq|grep yum|xargs rpm -e –nodeps 2、下载yum安装文件 wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse

Installing xdebug on php 5.6 Amazon Linux AMI

依然范特西╮ 提交于 2019-12-05 20:16:02
I created an Elastic Beanstalk Environment ID_LIKE="rhel fedora" VERSION_ID="2016.03" PRETTY_NAME="Amazon Linux AMI 2016.03" ANSI_COLOR="0;33" CPE_NAME="cpe:/o:amazon:linux:2016.03:ga" HOME_URL="http://aws.amazon.com/amazon-linux-ami/" I'm trying to install xdebug using sudo yum install php-pecl-xdebug But I keep get the following error Loaded plugins: priorities, update-motd, upgrade-helper Resolving Dependencies --> Running transaction check ---> Package php-pecl-xdebug.x86_64 0:2.2.3-1.5.amzn1 will be installed --> Processing Dependency: php(api) = 20090626-x86-64 for package: php-pecl

centos 查看版本

独自空忆成欢 提交于 2019-12-05 19:28:05
cat /etc/redhat-release(/etc/centos-release)// 或者 rpm -q centos-release [root@56 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@56 ~]# 来源: https://www.cnblogs.com/xiangsj/p/11941541.html

Linux的各个发行版本(一)

吃可爱长大的小学妹 提交于 2019-12-05 19:02:32
三大流派 1、SUSE SUSE Linux Enterprise Server (SLES) OpenSuse桌面 2、debian 迄今为止最遵循GNU规范的Linux系统 Ubuntu 基于Debian的unstable版本加强而来 deepin mint 3、redhat RHEL:RedHat Enterprise Linux,每18个月发行一个系版本 CentOS: 兼容RHEL的格式 Oracle 中标麒麟:中标软件 Fedora:每6个月发行一个新版本(测试版本) 4、ArchLinux:轻量简洁 5、Gentoo:极致性能,不提供传统安装程序,需要使用源代码进行编译安装 6、LFS:Linux From scratch 自制系统(说明书、文档) 7、Android:kernel+busybox(工具集)+ java虚拟机 三者之间的关系 Linux实际只是一个操作系统的内核,不是一个完整的系统,并且是开源的,都是基于GPL协议发布对的,只要遵循此协议任何人都可以在原有的软件构成的基础上再开发和发布,因此Centos诞生 既Linux内核+GNU工具包=新的发型版本 来源: https://www.cnblogs.com/stationing/p/11939782.html

Redhat openshift - Cron Runtime - Is there a default time for how long cron executes

耗尽温柔 提交于 2019-12-05 18:27:46
Cron on Redhat openshift is cancelled by SIGTERM after some minutes. Is there a default timeout on how long cron tasks can execute? If yes, how to get long running tasks working? Yes, There is apparently a default timeout of 5 min on top level script for cron tasks execution on Redhat openshift. The solution is to use "nohup" to get long running tasks working. For ex: File .openshift/cron/minutely/task1 - nohup /path-to/some-other-script > $OPENSHIFT_LOG_DIR/logfile 2>&1 & 来源: https://stackoverflow.com/questions/13218013/redhat-openshift-cron-runtime-is-there-a-default-time-for-how-long-cron