From 2c511609c4d92ee4e3e603d449c13579d1ea641a Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Sun, 13 Feb 2005 20:14:05 +0000 Subject: Add 'nice' and replace 'renice' with a new implementation. --- include/applets.h | 3 +++ include/usage.h | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/applets.h b/include/applets.h index 90d4195cc..125703216 100644 --- a/include/applets.h +++ b/include/applets.h @@ -412,6 +412,9 @@ #ifdef CONFIG_NETSTAT APPLET(netstat, netstat_main, _BB_DIR_BIN, _BB_SUID_NEVER) #endif +#ifdef CONFIG_NICE + APPLET(nice, nice_main, _BB_DIR_BIN, _BB_SUID_NEVER) +#endif #ifdef CONFIG_NSLOOKUP APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) #endif diff --git a/include/usage.h b/include/usage.h index c53ead0c7..fd0f68166 100644 --- a/include/usage.h +++ b/include/usage.h @@ -1813,6 +1813,13 @@ "\t-w raw sockets\n" \ "\t-x unix sockets" +#define nice_trivial_usage \ + "[-n ADJUST] [COMMAND [ARG] ...]" +#define nice_full_usage \ + "Nice runs a program with modified scheduling priority.\n\n" \ + "Options:\n" \ + "\t-n ADJUST\tAdjust the scheduling priority by ADJUST.\n" \ + #define nslookup_trivial_usage \ "[HOST] [SERVER]" #define nslookup_full_usage \ @@ -2011,11 +2018,14 @@ "\t-d\t\tdelay interval for rebooting." #define renice_trivial_usage \ - "priority pid [pid ...]" + "{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]" #define renice_full_usage \ - "Changes priority of running processes. Allowed priorities range\n" \ - "from 20 (the process runs only when nothing else is running) to 0\n" \ - "(default priority) to -20 (almost nothing else ever gets to run)." + "Changes priority of running processes.\n\n" \ + "Options:\n" \ + "\t-n\tadjusts current nice value (smaller is faster)\n" \ + "\t-p\tprocess id(s) (default)\n" \ + "\t-g\tprocess group id(s)\n" \ + "\t-u\tprocess user name(s) and/or id(s)" #define reset_trivial_usage \ "" -- cgit v1.2.3