问题标签 [sysctl]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ubuntu - ubuntu 中的 CPUSTATES uint64_ts (user, nice, sys, intr, idle) 数组
CPUSTATES uint64_ts(user, nice, sys, intr, idle)
当我发出命令时,我需要在 ubuntu 中使用命令来获取 FreeBSD 中的 cpustats,例如数组
“sysctl -a | grep kern.cp_time”
我能够在上面给出的 FREEBSD 命令中获取信息。在 Ubuntu 中获取所有 cpustat 的命令是什么
centos - 在 CentOS 6 上启用核心文件
我正在尝试在运行 CentOS 的机器上启用核心文件;但是,我尝试过的任何东西都没有产生核心文件……这是我所做的:
将以下两行添加到/etc/security/limits.conf
:
将以下行添加到/etc/sysconfig/init
:
将以下行添加到/etc/profile
:
将以下行添加到/etc/sysctl.conf
:
我确保它/srv/core
存在并具有777
权限。我执行init 6
以重新启动操作系统。系统恢复后,我执行了以下 C 脚本以尝试生成核心文件:
输出很简单Quit
,而我希望看到Quit (core dumped)
;它显然不会产生核心文件:(
我错过了什么或做错了什么?在此先感谢您的帮助!
linux - 无效参数”设置键“net.core.somaxconn”
我尝试设置Linux内核。编辑/etc/sysctl.conf并执行后sysctl -p
显示错误
Linux 发行版:Ubuntu 12.04.4 LTS、x86_64、3.2.0-60-generic
我可以增加net.core.somaxconn
to262144
吗?
c - 为什么 sysctl 为新创建的接口禁用 ipv6?
我正在使用以下答案创建带有 IPv6 地址的接口: https ://stackoverflow.com/a/8338398/2317204
在 ubuntu (x86_64) 上一切正常,但是在 angstrom linux 上我看到 ioctl 设置 SIOCSIFADDR 标志失败。所以,我可以创建接口,但没有 IPv6 地址。问题是我的新接口 sysctl 是 net.ipv6.conf.eth0.disable_ipv6=1。
我将带有 'disable_ipv6' 的 'all' 和 'default' sysctl 行更改为 0,但这对我没有帮助。
此外,我尝试禁用和启用 avahi-daemon。如果我创建接口,然后为此接口手动设置 sysctl disable_ipv6=0,我的代码会毫无问题地添加 IPv6 地址。
所以,我的问题是:
- 为什么 sysctl 为刚刚创建的接口自动设置 disable_ipv6=1?
- 是否可以以编程方式更改 sysctl 配置?
更新:我真的很抱歉,我得到了关于我正在使用的远程 PC 的错误信息。它不是 Linux Phantom,而是 Angstrom Linux。我想我可以自己谷歌解决方案并稍后在此处发布。
networking - multicast packages are there but can not be accessed
my box runs ubuntu 14.04. it is an old 32bit box with 4 ether nics. what i want to achieve is multicast routing from an upstream interface (eth2.8 - dynamic ip) to a downstream interfcae (eth0.13 - 192.168.40.1). my laptop attached to above box via eth0.13 can read multicast from 40.1 like a charm. i verified that by running vlc as a server on 40.1
and receiving the stream on my laptop with
that works even the other way round, sending with my laptop and receiving on the serverside.
so why is it not possible to access multicast packages via eth2.8?
joining works. i can verify arriving packages by
but it seems simply impossible to access these packages without tcpdump! this exactly describes what i am experiencing, alone the solution is not the same.
here some sysctl parameter:
- net.ipv4.conf.eth2/8.rp_filter = 1
- net.ipv4.conf.eth2/8.mc_forwarding = 1
- net.ipv4.conf.eth2/8.forwarding = 1
there is no difference between sysctl params of eth2.8 and eth0.13.
and yes, this happens even if the firewall is down!
any hint appreciated, you'll make my week!
/markus
ios - 在 iOS 上调用 sysctl 来获取后台进程列表是私人电话吗?
我的应用程序在 App Store 中可用,因此无法使用私有 api。
想知道调用sysctl获取后台进程列表是否是私有api调用?下面是获取运行进程列表的代码片段。
提前致谢。
performance - Nginx 静态文件服务 10Gbps 服务器的性能问题
我正在使用 Nginx 在专用服务器上提供静态文件。该服务器没有网站,它只是一个文件下载服务器。文件大小范围从 MB 到 GB。
以前我在 unmetered.com 有 8 台 500 Mbps 的专用服务器。他们每个人的表现都很棒。
我想从 FDCServers 购买 10Gbps 服务器。因为一台服务器比多台服务器更容易管理。
以下是服务器规格:
双 Xeon E5-2640(15M 高速缓存,2.50 GHz,7.20 GT/s Intel® QPI) - 24 核 128 GB RAM 10 Gbit/s 网络未计量 Ubuntu 14.04 LTS 1.5 TB SATA
但是我的新巨型服务器的速度不会超过 500 到 600 Mbps。我安装了 nload 来监控流量和上传/下载速度。它的报告与以前的 unmetered.com 服务器几乎相同。
然后我认为这可能是由于SATA硬盘的读取速率限制。
所以我在 New Powerful 服务器上购买并安装了 3 个 240 GB SSD 驱动器。
我将文件移动到 SSD Drive 并下载它以进行测试。速度还是不好。我只有 250 到 300 Kbps。而它应该给我至少 2Mbps(这是我放置在 Nginx 配置文件中的每个 IP 的速度限制)。
然后我搜索了千兆以太网调谐设置。找到了一些需要针对 10Gbps 网络进行调整的 sysctl 设置。
http://www.nas.nasa.gov/hecc/support/kb/Optional-Advanced-Tuning-for-Linux_138.html
我实现了它们,但吞吐量仍然与我以前的 500Mbps 服务器相同。
您能否帮助提高此服务器的网络吞吐量。我询问了 FDCServer 支持团队,他们确认他们的服务器可以轻松提供 3 到 5 Gbps 的速度,但他们无法帮助我调整它。
经过所有的调整和设置,我最多只能得到 700Mbit。
如果您需要更多详细信息,请告诉我。
fedora - 启用数据包转发
运行此命令后,我正在使用 Fedora 20:
“sysctl -w net.inet.ip.forwarding=1”
它给出了这个错误:
“sysctl:无法统计 /proc/sys/net/inet/ip/forwarding:没有这样的文件或目录”
linux - 刷新 docker 容器的 net.core.somaxcomm(或任何 sysctl 属性)
我正在尝试更改net.core.somaxconn
docker 容器,以便能够为我的 Web 应用程序提供更大的请求队列。
在 OS 上,在 docker 之外,我首先成功地修改了属性:
但后来我不知道如何将该更改传播到 docker。我试过了:
- 也在编辑
/etc/sysctl.conf
(希望 docker 在容器启动时读取该文件) - 重新启动容器
sudo docker stop
并sudo docker run
再次 - 通过以下方式重新启动整个 docker 服务
sudo service docker restart
但在容器内,cat /proc/sys/net/core/somaxconn
总是显示128
.
我正在运行 docker 1.2(所以默认情况下我不能修改/proc
容器内的属性)和 Elastic Beanstalk(所以没有--privileged
模式,这将允许我修改/proc
)。
如何将 sysctl 更改传播到 docker?
linux - 如何在启动每个服务之前执行命令
我想为 /etc/init.d 中的每个服务设置安全限制说
但这应该在发出“ service <process> start
”或“ /etc/init.d/<process> start
”时执行。
是否有通用路径,所以如果我们在那里写,它将适用于“启动”服务时的所有服务。