Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, i need to limit summary working time at system. I tried use limits.conf for this. If only two lines would be there
Quote:
TestUser soft cpu 10
TestUser hard cpu 20
So user TestUser can login at system at any time, work any time period, and when summary time of all its logins reaches 20 mins all his proceses would be killed?
p.s. if i am wrong in method whith which i try set time limit for user, please advice me with right method
p.p.s sorry for bad english
Frankly, I've never heard of anybody trying to enforce CPU limits under Linux before (I always thought CPU cycles are pretty much like "air" - free and limitless ), and I'm not at all sure it can even be done.
However, if you want to look at limits.conf, then you need to learn more about - and configure - PAM. Here are a few links:
Frankly, I've never heard of anybody trying to enforce CPU limits under Linux before (I always thought CPU cycles are pretty much like "air" - free and limitless ), and I'm not at all sure it can even be done.
However, if you want to look at limits.conf, then you need to learn more about - and configure - PAM. Here are a few links:
it is
1) max CPU time for one session?
2) max CPU time for one processs?
3) max CPU time = summary time of all logins during period between server reboots?
What developers whanted to say whith commentar for instruction cpu?
The tools as mentioned above give you a limit per login session. That's the way the system works.
If you want to accumulate time over multiple sessions, you'll have to create a script to save/read the accumulated time.
You can check the user's name at login in the /etc/profile, which is called for each new login.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.