Error Writing /proc/self/oom_adj Permission Denied
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack oom_adj android Overflow the company Business Learn more about hiring developers or posting ads with us Stack oom_adj vs oom_score_adj Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community what is oom_adj of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How can I edit the proc/pid/oom_adj for a process on linux up vote 2 down vote favorite oom_score_adj android 1 I have a situation where our server is killing a process that I don’t want to be killed. My understanding is that this is happening because the kernel overcommits memory and is then forced to kill processes when it actually runs out of memory. My understanding is that I can influence the kernel’s decision about which process to kill in this situation by adjusting the following value: /proc/[pid]/oom_adj This article
Oom Score
explains all of this: http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html However, I get a Permission denied error when I try this as the ubuntu user: echo -15 > /proc/5641/oom_adj -bash: /proc/5641/oom_adj: Permission denied sudo echo -15 > /proc/5641/oom_adj gives the same error My understanding is that this is because the shell is not executing the “>” command as root. However, the work-arounds to this that I am familiar with are giving “No such file or directory” error. sudo bash -c ‘echo -15 > /proc/5641/oom_adj’ -bash: /proc/5641/oom_adj’: No such file or directory sudo -s ‘echo -15 > /proc/5641/oom_adj’ -bash: /proc/5641/oom_adj’: No such file or directory What am I doing incorrect? linux process linux-kernel out-of-memory share|improve this question edited Feb 1 '14 at 7:32 Kara 3,15773147 asked Jul 26 '13 at 17:13 Alex Ryan 378517 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote you are running echo as root but actually is your shell trying to write in proc, look here for more explanation: How do I use sudo to redirect output to a location I don't have permission to write to? share|improve this answer answered Sep 6 '13 at 22:22 sherpya 3,49911735 add a comment| up vote 1 down vote Try this: sudo bash -c "echo '-15' | tee /proc/5641/oom_adj" It will
type of entry appended to the auth.log : Jan 26 17:10:45 maxv1 sshd[32624]: error writing /proc/self/oom_adj: Permission denied What are the implications of the http://stackoverflow.com/questions/17887228/how-can-i-edit-the-proc-pid-oom-adj-for-a-process-on-linux sshd not being able to write to the oom_adj ? Ie Is this error significant or should I just ignore it ? The sshd's write is failing because the server I'm logging into is a http://www.securityfocus.com/archive/121/500399/30/720/threaded VServer guest/virtual server, and the VServer virtualisation technology places restrictions on what can be written to the /proc filesystem from within the guest. The guest server OS is Debian Lenny and the sshd versions is "1:5.1p1-5". Within the sshd_config Privilege Separation is turned on. The host server's kernel is Lenny's "linux-source-2.6.26" (version "2.6.26-13") with Lenny's vserver patches applied from "linux-patch-debian-2.6.26" (version "2.6.26-13"). The host's util-vserver package is version "0.30.216~r2772-6". The host's "vserver-debiantools" package is version "0.6.3". Many thanks, Declan[ reply ]Re: Is writing to om_adj important ? Jan 26 2009 10:21AM Declan Mullen (declan jadplace com) Privacy StatementCopyright 2010, SecurityFocus
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch https://ubuntuforums.org/showthread.php?t=1089634&page=3 Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page https://ubuntuforums.org/showthread.php?t=978191&page=2 Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] unable to ssh after killing some sessions Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Page 1 of 4 123 ... Last Jump to page: Results error writing 1 to 10 of 37 Thread: unable to ssh after killing some sessions Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode March 7th, 2009 #1 Cyked View Profile View Forum Posts Private Message Frothy Coffee! Join Date Jan 2009 Beans 204 unable to ssh after killing some sessions Today from work I was screwing around on my system in putty was looking for info on killing sessions. I error writing /proc/self/oom_adj did some research on killing sessions and found something on checking sessions and killing them with a kill -9. So I did ps -aux | grep ssh to see what was open because I know since I have set up the system I have had putty sessions lock up on me and wanted to look into. So I say from the cmd above several sessions that from my perspective were open, so I did a kill -9 command on a few PIDs. I purposefully killed the session I knew was my current ssh session and was booted, and now can not ssh in. From work the session just times out in putty, from home I get a server unexpected closed session error. I was running hostsdeny but that has been stopped for a while now. I am using iptables, but every entry for that is empty now. Not sure what is going on. I have rebooted the system since this start, and what I have described above is the very last thing I did before this issue started. Any advice as to where I should be looking? Last edited by Cyked; March 7th, 2009 at 05:34 PM. Adv Reply March 7th, 2009 #2 Kareeser View Profile View Forum Posts Private Message Grande Half-n-Half Cinnamon Ubuntu Join Date Feb 2008 Location Hamilton, Canada BeansHidden! Re: unable to ssh after killing some sessions That's odd... a reboot shou
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] [SOLVED] SSH server setup help Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Page 1 of 3 123 Last Jump to page: Results 1 to 10 of 28 Thread: [SOLVED] SSH server setup help Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode November 11th, 2008 #1 DFord425 View Profile View Forum Posts Private Message Frothy Coffee! Join Date Mar 2007 Beans 212 [SOLVED] SSH server setup help I working on setting up my new server, im starting with SSH. Its all installed and i can connect to my desktop from my server. But when i try to connect from my desktop to my server, i get the message: Code: Read from socket failed: Connection reset by peer What does this error mean? Is there something else i have to change in the config files? Adv Reply November 11th, 2008 #2 tvtech View Profile View Forum Posts Private Message Way Too Much Ubuntu Join Date Jan 2008 Location Wherever Beans 299 DistroUbuntu 9.04 Jaunty Jackalope Re: SSH server setup help what does your ssh config file read like? are you using a non standard port? how are you connecting via client or via terminal? Asus M70vm-C1 intel 5100 abgn nvidia 9600GS intel 2.53gig centrino2 Adv Reply November 11th, 2008 #3 david_lynch View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Apr 2008 Beans 73 Re: SSH server setup help Originally Posted by DFord425 I working on setting up my new server, im starting with SSH. Its all installed and i can connect to my desktop from my server. But when i try to connect f