限制Linux中用户可用的内存和cpu [英] Limit the memory and cpu available for a user in Linux

查看:366
本文介绍了限制Linux中用户可用的内存和cpu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点担心可以在共享计算机上使用的资源量.有什么方法可以测试管理员对我可以使用的资源量是否有限制?如果可以的话,要提出一个更完整的问题,我该如何设置这种限制?

I am a little concerned with the amount of resources that I can use in a shared machine. Is there any way to test if the administrator has a limit in the amount of resources that I can use? And if does, to make a more complete question, how can I set up such limit?

谢谢.

推荐答案

有关与流程相关的限制,您可以在/etc/security/limits.conf中查看(阅读文件中的注释,使用google或使用man limits.conf了解更多信息) .而且正如jpalecek指出的那样,您可以使用ulimit -a查看(并可能修改)所有当前有效的限制.

For process related limits, you can have a look in /etc/security/limits.conf (read the comments in the file, use google or use man limits.conf for more information). And as jpalecek points out, you may use ulimit -a to see (and possibly modify) all such limits currently in effect.

您可以使用命令quota来查看磁盘配额是否有效.

You can use the command quota to see if a disk quota is in effect.

这篇关于限制Linux中用户可用的内存和cpu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆