LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-01-2022, 05:47 PM   #1
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Rep: Reputation: 2
Question Can't change nice value on processes I find when running top?


I continue to get "No such file or directory" when running nice on the commands I receive from top.


For example:
I run top and see a bunch of processes I'd like to try changing nice values on and bash can't seem to locate the file?
[root@localhost ~]# nice -n 5 systemd
nice: systemd: No such file or directory
[root@localhost ~]# nice -n 5 kdevtmpfs
nice: kdevtmpfs: No such file or directory
[root@localhost ~]# nice -n 5 khungtaskd
nice: khungtaskd: No such file or directory
[root@localhost ~]# nice -n 5 watchdog/0
nice: watchdog/0: No such file or directory
 
Old 06-01-2022, 05:54 PM   #2
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Original Poster
Rep: Reputation: 2
Nevermind, I figured this out! They're kernel modules right?
 
Old 06-01-2022, 05:58 PM   #3
suramya
Member
 
Registered: Jan 2022
Location: Earth
Distribution: Debian
Posts: 249

Rep: Reputation: 102Reputation: 102
nice is used to run commands with a modified priority level, so that a process can have a higher priority or a lower priority than the default value.
It is used to the set the value when the program is started. If the program is already running you need to use renice to change the priority.

Check out: https://www.tecmint.com/set-linux-pr...nice-commands/ for examples of both commands.
 
Old 06-04-2022, 01:06 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by shanebagel View Post
Nevermind, I figured this out! They're kernel modules right?
I don't think so:

Code:
$> ps aux | grep -E '^USER|systemd|kdevtmpfs|khungtaskd|watchdog/0'
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          35  0.0  0.0      0     0 ?        S    May28   0:00 [kdevtmpfs]
root          40  0.0  0.0      0     0 ?        S    May28   0:00 [khungtaskd]
root         245  0.0  1.6 539764 58388 ?        Ss   May28   7:07 /lib/systemd/systemd-journald
root         285  0.0  0.1  21660  4188 ?        Ss   May28   0:02 /lib/systemd/systemd-udevd
systemd+     463  0.0  0.3  24036 11356 ?        Ss   May28   0:29 /lib/systemd/systemd-resolved
message+     470  0.0  0.1   7932  4224 ?        Ss   May28   1:08 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root         479  0.0  0.1  13592  6604 ?        Ss   May28   0:34 /lib/systemd/systemd-logind
root         642  0.0  0.1  13112  5152 ?        Ss   May28   0:00 systemd-tty-ask-password-agent --wall
....snip....
These all have PIDs, so they're processes.
Why nice doesn't work on them I do not know, but - what are you really trying to achieve here? Messing around with the systemd process is a very bad idea.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I don't know how to print pid and nice value of previous and next processes when context switching occurs in linux kernel. DavidJun Linux - Newbie 4 09-27-2017 05:02 PM
strange value assignments variable = value, value?? ostrow30 Programming 2 07-24-2011 07:59 AM
difference between value *value and value * value PoleStar Linux - Newbie 1 11-26-2010 03:37 PM
[SOLVED] What is the default nice value for processes? turbomen Linux - Newbie 2 11-17-2010 05:29 PM
What is the default nice value for processes? turbomen Linux - Newbie 1 11-16-2010 02:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration