Chinaunix首页 | 论坛 | 博客
  • 博客访问: 239343
  • 博文数量: 91
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 955
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-12 09:38
文章分类

全部博文(91)

文章存档

2017年(1)

2011年(1)

2008年(15)

2007年(74)

我的朋友

分类: LINUX

2007-08-23 16:35:24

nice
 nice [-n adjustment] [command]
 nice [-adjustment] [command]
 description the nice command is used to alter another command's nice number at start time. for normal users, adustment is an integer from 1 through 19. if you're the superuser. the adjustment range is from -20 to 19.denote the normal user only can add the number. can't reduce the number than its original
 nice default number is 10.for example:
 nice gedit. the gedit'
s nice have changed to 10 from 0
 nice --10 vi /etc/httpd
 nice -n -10 vi /etc/httpd
  the two commands were equivalent. note the double dash(--10) in the first form. the first dash indicates that an option follows. while the second dash indicates a negetive number. in the nice command, the dash can't omit. it must memoried, the nice command only works to change the nice number for new processes at the time3 that they're started.to modify a runnig program.use the renice command
  
renice
  alter the nicenumber to set the scheduling priority of one or more running target process. by default, renice assume that the target are numeric PIDs. one or more options may alse be used to interpret targets as process owned by specific users
  -u interpret target as usernames. affecting all process owned by those users.
  -p interpret targets as PIDs(the default)
  for example
   renice 19 1125(process)
   renice -10 -u jdean(user) -p 501(process)
   note: the -10 indicate a nice value of negative 10. renice don't need the dash, its very important
   renice 只能降低他的优先级,不能升高他的优先级,这是针对普通用户的,并且是1到19,如果数超过19,就设置为19
renice里不需要dash(破折号),而nice则需要.这是他们的主要差别,nice是在开始一个进程时,确定他的优先级,而renice是在已开始的进程下修改他的优先级
对普通用户来说,renice和nice都只能设置大于0的.

阅读(1396) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~