mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 21:41:18 +08:00
nshlib: Support top command
show thread sort by cpuloading: use `top [-n <num> ][ -d <delay>] [ -p <pidlist>] [ -h ]` Signed-off-by: anjiahao <anjiahao@xiaomi.com> Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
@@ -595,6 +595,11 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
3, CONFIG_NSH_MAXARGUMENTS, "<expression>"),
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NSH_DISABLE_TOP) && defined(NSH_HAVE_CPULOAD)
|
||||
CMD_MAP("top", cmd_top, 1, 5,
|
||||
"[ -n <num> ][ -d <delay>] [ -p <pidlist>] [-h]"),
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_TIME
|
||||
CMD_MAP("time", cmd_time, 2, 2, "\"<command>\""),
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user