Articles of linux

传输速度比NICbuild议的要快

我跟着这个线程获取有关读取网卡速度的信息。 我如何validation我的网卡的速度? 我正在使用ethtool来validation我的网卡的速度正如讨论的线程。 :~ # ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on […]

如何使用rsyslog.conf将与linux相关的authentication信息发送到特定的进程

在我的系统中,我正在运行rsyslog守护进程。 我试图configurationsyslog.conf发送所有authentication邮件到一个特定的文件使用该行 auth.*;authpriv.* /var/log/AuthLogs 它的工作。 现在我想把这些消息发送给一个进程。 该进程将准备好捕获日志。 以前我使用的是syslogd守护进程。 在这我能够发送日志使用下面的行 auth.*;authpriv.* |exec /usr/bin/read.exe 但是rsyslogd不能正常工作。 有没有人有任何线索如何做到这一点? 更新 :特别是这个问题发生在python脚本ex代码中: #!/usr/local/bin/python import sys import fcntl, os message = sys.stdin.readline() # Read what's waiting, in one go if not message: print "nothing in message\n" fd = open('/tmp/testrsyslogomoutput1.txt', 'a') fd.write("Receiving log message : \n%s\n" % (message)) fd.close() 这个python代码,我想通过rsyslog调用。

将设备path更新为lvm物理卷

起初这是我的硬盘: / dev / sda1为bios_grub 100MB / dev / sda2 / 500MB作为/ boot / dev / sda3 800MB作为LVM2 myvg卷组的物理卷。 我用parted删除sda1和sda2。 之后,重新启动/ sda1(600MB)为/ boot。 然后使用gdisk更新编号/ dev / sda。 所以现在/ dev / sda3变成了/ dev / sda2。 问题是,当我运行pvs我仍然把/dev/sda3作为myvg物理文件。 如何在保持myvg的数据完整的情况下更新这个?

如何回答谁有ARP请求

好吧,这是我知道的一个愚蠢的问题,但忍耐着我。 我开始了一个新的工作,networking非常糟糕,在傻瓜交换机上有一堆傻瓜交换机。 我们正在运行一个10.networking,但是在我的networking上有192个networking,它不断的发送出arp请求的人以及其他的igmp包。 wireshark给我的MAC地址,但多数民众赞成在它。 有没有办法我可以假装谁的请求,以便我可以尝试find这台机器的答案?

nano / vi打开写保护文件作为未经授权的用户 – 我可以升级保存吗?

更多的时间比我想承认我会打开一个非超级用户的configuration,并会去做我需要的改变。 只要我保存在纳米,或六我遇到权限错误。 在这一点上,我用我的方式,所以我可以closures并重新打开与sudo 。 有没有办法升级到超级用户为了保存而不closures和重新打开vi或nano?

即使每小时,每日,每周和每月快照设置为True,zfs-auto-snapshot也只能快照频繁的快照

zfs-auto-snapshot已安装,并已应用以下设置: # zfs get all backup NAME PROPERTY VALUE SOURCE backup com.sun:auto-snapshot true local backup com.sun:auto-snapshot:monthly true local backup com.sun:auto-snapshot:weekly true local backup com.sun:auto-snapshot:hourly true local backup com.sun:auto-snapshot:frequent true local backup com.sun:auto-snapshot:daily true local 已经安装了半个星期,并且在检查快照时,只有四个最常见的快照存在: # zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT backup@zfs-auto-snap_frequent-2017-06-17-0645 3.06M – 123G – backup@zfs-auto-snap_frequent-2017-06-17-0700 1.57M – 123G – […]

sed:-eexpression式未知选项到's'

我知道这已经被问过,但我正努力确定错误的根本原因与我的脚本。 我经历了其他问题,并试图转换(切换/ \为@),但它只是不起作用,我仍然得到相同的错误? 只要我在最后4(从底部)joinexpression式,我开始得到错误,.. 当我运行这个 clustername="'XXXCluster'" seed=xx.xxx.xxx.xx ip=xx.xxx.xxx.xx hint="/opt/cassandra/data/hints" data="/opt/cassandra/data/data" commitlog="/opt/cassandra/data/commitlog" cache="/opt/cassandra/data/saved_caches" sed -i -e "s/\(cluster_name:\).*/\1$clustername/" \ -e "s/\(- seeds:\).*/\1$seed/" \ -e "s/\(listen_address:\).*/\1$ip/" \ -e "s/\(rpc_address:\).*/\1$ip/" \ -e "s/\(broadcast_rpc_address:\).*/\1$ip/" \ -e "s/\(hints_directory:\).*/\1$hint/" \ -e "s/\(data_file_directory:\).*/\1$data/" \ -e "s/\(commitlog_directory:\).*/\1$commitlog/" \ -e "s/\(saved_caches_directory:\).*/\1$cache/" /opt/cassandra.yaml 我得到这个sed:-eexpression式#6,字符29:未知选项's' 但我不能看到如何解决这个问题,有人可以帮我吗? 提前致谢..

Linux上的两个networking之间的路由与不同的networking掩码和广播?

以太网: ServerA; IP=192.168.255.254; Mask=255.255.0.0; Bcast=192.168.255.255 | | eth1 IP=192.168.1.254; Mask=255.255.0.0; Bcast=192.168.255.255 ServerB DHCP: 192.168.1.1 – 192.168.1.252 eth0 IP=192.168.1.253; Mask 255.255.255.0; Bcast=192.168.1.255 | | Client1..252 IP over DHCP (192.168.1.1 – 192.168.1.252) 如何连接/路由在ClientX和ServerA之间进行通信? _ ClientX和ServerB之间的Ping工作。 ServerA和ServerB之间的Ping工作。 _ 我尝试在Linux上的两个networking之间的路由? 在eth0和eth1之间路由,但没有奏效。 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.253 netmask 255.255.255.0 broadcast 192.168.1.255 […]

configurationLinux服务器使其可以从外部访问虚拟机的IP

我有一个物理Linux服务器(父母)。 我已经在该服务器上安装了一个虚拟机(Virtualbox)。 我在该虚拟机上创build了一个Web项目,现在可以从192.168.10.10访问它。 但只能从物理(父)服务器访问。 如何configuration该物理服务器将传入请求转发到其虚拟机IP地址? 例如,我可以访问我的父服务器http://80.80.80.80 ,所以每当有访客来,他会看到/var/www/html/index.html的内容。 有没有机会让虚拟机自行处理所有传入的请求? 任何提示或其他类似主题的链接将不胜感激。

如何增加模式6的绑定接口带宽?

我是Linux绑定驱动程序的新手。 我已经在模式6中configuration了一个绑定了2个以太网接口的绑定。 他们的个人带宽是937Mbps和700 Mbps。 但是当两个接口都打开的时候,绑定接口的带宽总是比较高的(这是937Mbps)。我使用iperf来测量带宽。 当两个接口都处于活动状态时,我需要的带宽几乎等于两个接口的组合带宽。