当我启动我的 Debian 系统时,它的启动挂起大约 2 分钟:
Loading, please wait...
[ 5.191043] systemd-fsck[129]: /dev/mmcblk0p2: clean, 234192/873120 files, 2335263/3491328 blocks
[ 6.645242] intel_rapl: no valid rapl domains found in package 0
[ 6.643682] systemd-fsck[222]: fsck.fat 3.0.27 (2014-11-12)
[ 6.664844] intel_rapl: no valid rapl domains found in package 0
[ 6.660702] systemd-fsck[222]: /dev/mmcblk0p1: 3 files, 33/130812 clusters
[ **] A start job is running for LSB: Raise network interf...38s / no limit)
Run Code Online (Sandbox Code Playgroud)
最终,它放弃提升网络接口并继续启动。
问题:如何更改 中使用的超时systemctl,以便在 15 秒后停止尝试提升网络接口?
附加信息:问题的根源是在这台机器上使用了 wifi USB …
在 Centos 6.6 机器上,我注意到了这一点......
[root@abcd /]# usleep --help
Usage: usleep [microseconds]
-v, --version Display the version of this program, and exit
-o, --oot oot says hey!
Help options:
-?, --help Show this help message
--usage Display brief usage message
[root@abcd /]# usleep -o
oot says hey!
Run Code Online (Sandbox Code Playgroud)
虽然手册页没有提到它......
OPTIONS
--usage Show short usage message.
--help, -?
Print help information.
-v, --version
Print version information.
Run Code Online (Sandbox Code Playgroud)
那么,为什么oot说“ hey”呢?
编辑: 当然这是一个复活节彩蛋,但它似乎可能是一个有故事的。
我正在尝试运行类似的东西:
sudo dhclient $wifi || otherFunction
Run Code Online (Sandbox Code Playgroud)
问题是当dhclient失败时它只是挂起而不是抛出错误。
如果在 60 秒内没有完成,我该如何重写上面的内容,以便dhclient被杀死otherFunction并被调用dhclient?
在 Linux 上(我的实时服务器在 RHEL 5.5 上 - 下面的 LXR 链接指向内核版本),man 7 ip说:
已绑定的 TCP 本地套接字地址在关闭后的一段时间内不可用,除非设置了 SO_REUSEADDR 标志。
我没有使用SO_REUSEADDR. “一段时间”是多长时间?我怎样才能知道它有多长,我怎样才能改变它?
我一直在谷歌上搜索这个,并找到了一些信息,但没有一个能从应用程序程序员的角度真正解释这一点。以机智:
net/tcp.h是“要等待多久才能破坏TIME-WAIT状态”,固定为“大约60秒”我绊倒的地方在于弥合内核的 TCP 生命周期模型和程序员的端口不可用模型之间的差距,即理解这些状态与“一段时间”的关系。
我正在运行 CentOS 7.2;见下文:
# systemctl stop firewalld
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop firewalld.service: Connection timed out
Failed to get load state of firewalld.service: Connection timed out
Run Code Online (Sandbox Code Playgroud)
journalctl 只是报如下错误: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out
我正在编写一个 Bash 脚本,它通过 SSH 在远程机器上执行几个命令。
问题是当其中一台机器无法访问时,我希望脚本跳过并继续前进,它会一直卡住,直到很长一段时间后它才导致连接超时。
有没有办法在ssh命令中设置更短的超时?
我的软件 RAID6 的 I/O 经常冻结大约 30 秒,之后一切都恢复正常。
冻结结束后,将其放入系统日志:
Mar 14 18:43:57 server kernel: [35649.816060] sd 5:0:23:0: [sdy] CDB: Read(10): 28 00 6c 52 68 58 00 04 00 00
Mar 14 18:43:58 server kernel: [35651.149020] mptbase: ioc0: LogInfo(0x31140000): Originator={PL}, Code={IO Executed}, SubCode(0x0000) cb_idx mptscsih_io_done
Mar 14 18:43:58 server kernel: [35651.151962] mptscsih: ioc0: task abort: SUCCESS (rv=2002) (sc=ffff8807b02dfe80)
Mar 14 18:43:58 server kernel: [35651.151967] mptscsih: ioc0: attempting task abort! (sc=ffff88002a7f30c0)
Mar 14 18:43:58 server kernel: [35651.151972] sd 5:0:23:0: [sdy] CDB: Read(10): …Run Code Online (Sandbox Code Playgroud) 我在我的计算机上以多重引导配置(Ubuntu、Linux Mint、Windows 等)安装了多个操作系统。当我打开我的电脑时,启动菜单出现超时。有时,我不会专注于它(例如,我打开我的电脑,然后我去冰箱拿一杯软饮料),所以我错过了启动菜单,所以我无法选择我想要的操作系统。因此,我必须重新启动计算机并再次选择所需的操作系统。反正有没有删除超时。我的意思是当启动菜单出现时,所以没有超时,在我选择我想要的操作系统之前,不会启动任何操作系统。
我正在使用 Ubuntu 和 Linux Mint。
默认情况下,当我在 tty 中登录我的 Arch linux 框时,在我输入用户名之后但在我输入密码之前会超时。
所以它是这样的
Login: mylogin <enter>
Password:
(+ 60 seconds)
Login:
Run Code Online (Sandbox Code Playgroud)
如您所见,如果我不输入密码,它会回收提示——我希望它无限期地等待我的密码,而不是回收登录提示。
这可能吗?
似乎--timeout选择agetty将是我想要的。但是,我尝试在 getty 文件中添加此标志/usr/lib/systemd/system/(默认情况下不使用该选项),然后重新启动 - 它似乎没有任何效果。
Linux Mint 17.1 (MATE) 在 HP G250 笔记本电脑和较旧的 HP 台式机上运行。只有我和家里的狗,我喜欢整天运行计算机,但在几分钟不活动后,它不断返回登录屏幕。整天输入长长的“安全密码”会很累,我想至少延长时间,甚至完全停止超时。
timeout ×10
centos ×2
linux ×2
systemd ×2
bash ×1
boot-loader ×1
boot-menu ×1
debian ×1
drivers ×1
getty ×1
grub ×1
linux-kernel ×1
linux-mint ×1
login ×1
lsb ×1
mate-desktop ×1
polkit ×1
screen-lock ×1
screensaver ×1
scsi ×1
socket ×1
ssh ×1
startup ×1
system-calls ×1
tcp ×1
tty ×1