AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-79478

vasco.debian's questions

Martin Hope
vasco.debian
Asked: 2014-11-20 21:39:19 +0800 CST

KVM 上的主机 CPU 使用优化

  • -1

我已经使用以下配置完成了基于 KVM 的虚拟化设置。

HOST Machine
----------------
OS: CentOS 6.6 (64-bit)
CPU:  Intel(R) Xeon(R) CPU E5606  @ 2.13GHz
RAM: 32 GBs
Disk: 2 TBs (LVM-based)

CPU 支持硬件虚拟化并已启用。

[root@setup-01 ~]# grep -c  vmx /proc/cpuinfo 
8

KVM 模块已加载

[root@setup-01 ~]# lsmod | grep kvm
kvm_intel              55496  64 
kvm                   337900  1 kvm_intel

我在这台主机上运行了 32 台虚拟机,在经历了缓慢之后,我观察到主机上只使用了一个 CPU。休息是空闲的。

top - 11:05:39 up 7 days, 20:31,  1 user,  load average: 14.58, 15.04, 13.40
Tasks: 258 total,  13 running, 245 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  : 46.2%us, 53.8%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  32811436k total, 14290408k used, 18521028k free,   119924k buffers
Swap:  8290300k total,        0k used,  8290300k free,  2549308k cached

是否需要任何设置来确保 KVM 充分利用多处理器环境。如果设置需要更多信息,请告诉我。

kvm-virtualization
  • 1 个回答
  • 709 Views
Martin Hope
vasco.debian
Asked: 2014-08-02 01:58:49 +0800 CST

在 NATed 环境中通过 xinetd 进行端口转发

  • 1

我正在研究一种设置,该设置需要将来自服务器端口之一的请求重定向到 NATed 环境中的其他服务器端口(例如:来自 192.168.1.100:843 的所有请求都应重定向到 192.168.1.200:8443 - 两台服务器位于专用防火墙后面并在所有端口之间相互通信。)

服务正在服务器 192.168.1.200 的 8443 端口上运行。我通过 xinetd 在服务器 192.168.1.100 上配置了端口转发,如下所示。

service serv1
{
        bind            = 192.168.1.100
        protocol        = tcp
        flags           = REUSE
        socket_type     = stream
        port            = 843
        wait            = no
        user            = root
        redirect        = 192.168.1.200 8443
}

现在,当我在 LAN 内远程登录到 192.168.1.100 843 时,我可以在 192.168.1.200:8443 上连接服务

-> telnet 192.168.1.100 843
Trying 192.168.1.100...
Connected to 192.168.1.100.
Escape character is '^]'.

但是当我试图通过 192.168.1.100 的公共 IP 连接时,我得到“连接关闭”

-> telnet 1.2.3.4 843
Trying 1.2.3.4...
Connected to 1.2.3.4.
Escape character is '^]'.
Connection closed by foreign host.

在执行 tcpdump 时,我发现在后面的情况下请求不会到达服务器 192.168.1.200 本身。

我在我们的一个 DC 中进行了类似的设置,并且工作正常。任何想法,如果这里有什么问题。

谢谢,梅加南德

xinetd
  • 2 个回答
  • 632 Views
Martin Hope
vasco.debian
Asked: 2014-07-08 01:39:14 +0800 CST

内部 DNS 所需的建议

  • 0

我正在设置新的服务器环境,包括 70 多台服务器,所有服务器都运行 Linux(Redhat/CentOS 混合)。我想设置几个 DNS 服务器(主要/次要),以便在所有应该能够使用的服务器上使用/配置主要关心以下事情。

1. 用于解析本地服务器条目的权威 DNS。

我想将简单的域名分配给像 db1.example.int
或 app1.example.int 这样的服务器(主要是 A 记录) 基本想法是服务器应该能够通过那里的(内部)dns 名称相互访问。

2.公共域(如google.com)的递归/缓存DNS解析。

对于解析本地域 (example.int) 以外的任何 DNS 条目,应将查询发送到配置为转发器的上游 DNS 服务器。

目前我正在为此目的探索 BIND & dnsmasq。我应该使用 BIND 还是应该尝试 dnsmasq(禁用 dhcp - 因为我所有的服务器都将使用静态 IP。)如果在类似的设置上工作,请分享您的想法和经验。

domain-name-system
  • 1 个回答
  • 391 Views
Martin Hope
vasco.debian
Asked: 2013-07-27 00:45:18 +0800 CST

奇怪的 iostat 数字

  • 1

我在我们的一台位于 SAN 存储上的 VM 上遇到了异常的负载问题。作为一般做法,我iostat在服务器上运行得到非常奇怪的数字。

 avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.00    0.00    0.17   49.75    0.00   50.08

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00     0.00    0.00    0.00     0.00     0.00     0.00     3.00    0.00   0.00 100.03
dm-0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     3.00    0.00   0.00 100.00
dm-1              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

即使rkB/s&wkB/s都为 0,它仍然显示%util为 100%。

如果我误解了输出,请告诉我。

谢谢,梅加南德。

linux
  • 1 个回答
  • 208 Views
Martin Hope
vasco.debian
Asked: 2013-03-02 00:19:59 +0800 CST

LDAP 服务器的奇怪问题

  • 0

我的 LDAP 生产服务器运行了 1 年没有任何问题,我在通过 pam_ldap 进行身份验证时突然收到密码失败错误。因此它显示以下错误消息,我能够使用 ldap 客户端实用程序(如 ldapsearch)进行身份验证,也可以通过一些java应用程序,

在客户端,我在 /var/log/secure 中收到以下错误消息

Failed password for [username] from xx.xx.xx.xx port 38473 ssh2
fatal: Access denied for user [username] by PAM account configuration

在 LDAP 服务器日志上。

=> access_allowed: read access denied by auth(=xd) 
send_search_entry: conn 1711 access to attribute userPassword, value #0 not allowed

LDAP 服务器上的 ACL 配置

access to attrs=userPassword
        by self write
        by anonymous auth
        by dn.base="cn=Manager,dc=example,dc=com" write
        by * none
access to attrs=shadowLastChange
        by self write
        by * read
access to *
        by self write
        by dn.base="cn=Manager,dc=example,dc=com" write
        by * read

pam_ldap (/etc/pam.d/system-auth) 配置 - 客户端

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      pam_env.so
auth        sufficient    pam_ldap.so try_first_pass
auth        sufficient    pam_unix.so nullok use_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        required      pam_deny.so

account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     [default=bad success=ok user_unknown=ignore] pam_ldap.so
account     required      pam_permit.so

password    requisite     pam_cracklib.so try_first_pass retry=3 debug minclass=4 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=0 minlen=8
password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok
password    sufficient    pam_ldap.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     optional      pam_mkhomedir.so skel=/etc/skel/ umask=0077
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_ldap.so

奇怪的是,很长一段时间以来我都没有对服务器端或客户端进行任何更改。

openldap
  • 1 个回答
  • 1102 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve