在 Perl 中通过 telnet 读取数据时丢失数据
作为测试的一部分,我正在尝试通过网络向多个设备(超过 30 个)读取和写入数据。我有一个 Perl 脚本,它可以通过 telnet 对单个设备进行所有读写操作。我正在获取该 Perl 脚本并运行它的多个重复实例。 现在的问题是我发现从设备读取时缺少一些数据,这导致测试被标记为失败。另外,在写入数据时,我有时会看到数据未发送。这两种情况完全随机发生,每台设备每进行 2000 次测试迭代,就会发生大约 30 到 100 次。
可能是什么原因导致了这个问题?是否与 telnet 有关,或者是网络问题(公司范围的网络?),还是其他问题?
编辑:
我正在使用 Net::Telnet 模块。
谢谢...
I am trying to read and write data to multiple device(more than 30) over network as part of a test. I have a Perl script which does all the read and write over telnet for a single device. I am taking that Perl script and running multiple duplicate instances of it.
Now the problem is I am seeing that some data is missing when reading from the devices and this is causing the test to be marked as failed. Also when writing data I sometime see that the data is not sent. Both of this occurs completely at random and about 30 to 100 times for every say 2000 iterations of the test, per device.
What might be causing the problem? Is it related to telnet, or would it be a network issue (company wide network?), or is it some other problem?
EDIT:
I am using the Net::Telnet module.
Thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过套接字发送数据时如何刷新数据?
您使用自动冲洗吗?
然后我会使用 Wireshark 查看网络以检查发送时数据是否丢失
How are you flushing your data when sending the data over the sockets?
Are you using autoflush?
I would then use Wireshark to look at the network to check if the data is missing when sending or not