본문 바로가기

Linux

nice, renice, and ps

1. Ensure that you have the httpd package installed on the system.

[root@localhost]# yum install httpd

2. Ensure the httpd service is NOT RUNNING.

[root@localhost]# systemctl stop httpd

3. Start the httpd service with the most favorable nice possible.

[root@localhost]# nice -n -20 httpd

4. View the current nice of the httpd service using the ps command and pgrep command together.

[root@localhost]# ps axo pid,comm,nice | grep httpd 
or 
[root@localhost]# ps axo pid,comm,nice --sort=--nice | grep httpd 

This will allow you to sort by nice level.

6. Renice all httpd processes and set the nice level to 0.

[root@localhost]# renice -n 0 $(pgrep httpd)


'Linux' 카테고리의 다른 글

Settings for Linux hosts on V3700 storage  (0) 2015.07.02
Red Hat Enterprise Linux 6 DM Multipath  (0) 2015.07.02
Virtual Machines  (0) 2015.06.29
Working with top  (0) 2015.06.29
Monitoring and calculating CPU load averages  (0) 2015.06.29
pgrep, pkill, kill, and jobs  (0) 2015.06.29
Powering Off Systems  (0) 2015.06.29
Interrupt The Boot Process To Change The Boot Target  (0) 2015.06.29
Recovery password on Redhat7 or CentOS7  (0) 2015.06.22
Time Zone 확인 및 변경  (0) 2015.02.06