08:renice 设置sshd的优先级
#先查看sshd的优先级
[root@xj ~]# ps axo pid,command,nice|grep sshd
   869 /usr/sbin/sshd -D             0
  1194 sshd: root@pts/0              0
  1307 sshd: root@pts/1              0
  1574 sshd: root@pts/2              0
  
#设置sshd的优先级为-20
[root@xj ~]# renice -n -20 869
869 (进程 ID) 旧优先级为 0,新优先级为 -20
#再次查看sshd的优先级
[root@xj ~]# ps axo pid,command,nice|grep sshd
   869 /usr/sbin/sshd -D           -20
  1194 sshd: root@pts/0              0
  1307 sshd: root@pts/1              0
  1574 sshd: root@pts/2              0
#一定要退出终端重新连接
[root@xj ~]# exit
登出
#再检查,就可以看到当前终端的优先级变化了
[root@xj ~]# ps axo pid,command,nice|grep sshd
   869 /usr/sbin/sshd -D           -20
  1194 sshd: root@pts/0              0
  1574 sshd: root@pts/2              0
  2361 sshd: root@pts/1            -20
  
同理也可以针对其它进程,调整优先级
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号