Linux 在spawing ssh之后或之前指定match_max有什么区别?

Linux 在spawing ssh之后或之前指定match_max有什么区别?,linux,buffer,expect,Linux,Buffer,Expect,如果在使用ssh之前提供了match_max选项,我不会将完整的输出放入expect_out(buffer),但是如果在ssh之后提供相同的内容,我会得到正确的结果 此外,如果在第一种情况下使用-d选项,则会得到完整的输出。为什么? 另外,我如何检查我的Linux系统设置了多少缓冲区?我查找了limit命令,但找不到它。expect有关match\u max命令的手册页显示 # match_max 1000000000 set timeout 60 spawn ssh -o "Stric

如果在使用ssh之前提供了match_max选项,我不会将完整的输出放入
expect_out(buffer)
,但是如果在ssh之后提供相同的内容,我会得到正确的结果

此外,如果在第一种情况下使用-d选项,则会得到完整的输出。为什么?


另外,我如何检查我的Linux系统设置了多少缓冲区?我查找了
limit
命令,但找不到它。

expect有关
match\u max
命令的手册页显示

# match_max 1000000000
  set timeout 60
  spawn ssh -o "StrictHostKeyChecking no" "$username@$hostname"
  match_max 1000000000
这正是您所观察到的(因为没有指定
-i

match_max [-d] [-i spawn_id] [size]
defines the size of the buffer (in bytes) used internally by expect. With no size argument, the current size is returned. With the -d flag, the default size is set. (The initial default is 2000.) With the -i flag, the size is set for the named spawn id, otherwise it is set for the current process.