微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

linux-测量开发/ urandom效率

我必须衡量/ dev / urandom的效率.我有以下任务:检查1分钟内可以从/ dev / urandom获得多少字节的数据.不要将获取的数据写到磁盘上,因为这可能会减慢一切.

我试过了

timeout 60s cat /dev/urandom | wc -c

但是我收到的只是“已终止”消息.

解决方法:

添加–foreground选项:

timeout --foreground 60s cat /dev/urandom | wc -c

--foreground: when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐