How to use Shell Commands

March 25, 2026 ยท View on GitHub

This document shows the list of shell commands like ps, free and so on.
These commands can be used in shell, and can be used without shell also like remote monitoring functionality.
Dependency should be enabled first for using each commands.
Most of the commands support --help option to show how to use.

List of Commands

Basic commandsKernel CommandsFileSystem Commands
exitcpuloadcat
helpdatecd
historydmesgdf
shfreeecho
sleepgetenv/setenv/unsetenvls
heapinfomkdir
irqinfomv
kill/killallmount
prodconfigumount
pspwd
rebootrm
stkmonrmdir
uptime

exit

This command supports exiting shell.

TASH>>exit
TASH: Good bye!!

help

This command shows list of commands.

TASH>>help
TASH>>   TASH command list
         --------------------
cat              cd               date             df
dhcpd            exit             free             getenv
heapinfo         hello            help             ifconfig
ifdown           ifup             iotjs            iperf
irqinfo          kill             killall          logm
ls               mkdir            mkrd             mksmartfs
mount            netdb            ping             ps
pwd              ramtest          reboot           rm
rmdir            setenv           sh               sleep
stkmon           tftpc            ttrace           umount
unsetenv         uptime           vi               wifi

cat

This command prints the contents of an existing file to standard output or writes it to the target file.

Usage:
   cat [OPTIONS] [source_file_path] [> or >>] [target_file_path]  
   OPTIONS: `--help` - display the usage.  
TASH>>echo -n "abc" > /mnt/test.txt
TASH>>echo -n "123" > /mnt/test1.txt
TASH>>ls /mnt
/mnt:
test.txt
test1.txt
TASH>>cat /mnt/test.txt
abc
TASH>>cat /mnt/test1.txt
123
TASH>>cat /mnt/test1.txt >> /mnt/test.txt
TASH>>cat /mnt/test.txt
abc123

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

cd

This changes current working directory to given path.

Usage:
   cd <directory or - or .. or ~>
TASH>>ls
/:
 dev/
 mnt/
 proc/
 ramfs/
 rom/
TASH>>cd rom
TASH>>ls
/rom:
 .
 print_hello2_help1_hello1.sh

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

cpuload

This command shows cpuload information per thread periodically. If there are more than one cpu cores in the system, it shows cpuload of thread in each core. Also It shows non-zero cpuload only. This has arguments which configure the printing information and cpuload daemon.

TASH>>cpuload --help

Usage: cpuload [-OPTION]
   or: cpuload stop
Start or Stop cpuload monitor daemon

Options:
[-OPTION]
 -s SNAPSHOT_INTERVAL  Start snapshot mode with SNAPSHOT_INTERVAL interval(s)
 -i PRINT_INTERVAL     Show cpuload values every PRINT_INTERVAL(s)
 -n ITERATION_COUNT    Iterate showing cpuload values ITERATION_COUNT times

TASH>>cpuload

--------------------------------------------------
Started CPU monitor with interval 5 sec.
TASH>>Non-Zero CPU utilization trend (updated every 5s)
PID | Pri |  CPU0 |  CPU1 |  Avg  |
--------------------------------------------------
  0 |   0 |  99.9 |   0.0 |  48.5 | CPU0 IDLE
  1 |   0 |   0.0 |  99.9 |  51.4 | CPU1 IDLE
 20 | 100 |   0.1 |   0.0 |   0.1 | CPULoadMonitor
--------------------------------------------------


TASH>> cpuload -s 10
CPU monitor will started after 10s with interval 5.
PID | Pri |  Snap ticks  |
--------------------------------------------------
  0 |   0 |   994(100.0) | Idle Task
  1 | 224 |       0(0.0) | hpwork
  2 | 113 |       0(0.0) | lpwork
  3 | 120 |       0(0.0) | EHCI Monitor
  4 | 110 |       0(0.0) | LWIP_TCP/IP
  5 | 250 |       0(0.0) | binary_manager
  7 | 220 |       0(0.0) | /dev/mtdblock2
  8 | 221 |       0(0.0) | msg_receiver
  9 | 221 |       0(0.0) | multi_recv_nonblock
 10 | 221 |       0(0.0) | multi_recv_block1
 11 | 221 |       0(0.0) | multi_recv_block2
 12 | 180 |       0(0.0) | /dev/mtdblock4
 13 | 100 |       0(0.0) | uwork
 14 | 125 |       5(0.5) | tash
 15 | 100 |       1(0.1) | CPULoadMonitor
 * Snapshot interval : 10s (1000 ticks)
--------------------------------------------------

How is the cpuload calculated

We define a timeconstant (CONFIG_SCHED_CPULOAD_TIMECONSTANT), to keep a limit on total cpuload. We store "total ticks" and "ticks respective to a thread for specific core" after every systick interrupt. thread_n load on cpu_i = (thread_n ticks in cpu_i) / (total ticks in cpu_i) average thread_n load = (Sum of thread_n load in each cpu) / (Number of cpus)

Note: Suppose timeconstant is 2 second. Then after every 2 second, we divide the number of ticks on each thread_n load by 2 and also on each cpu_n load by 2. After this the process continues until the next 2 seconds.

How to Enable

Enable CONFIG_ENABLE_CPULOAD to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] cpuload monitor

Dependency

Enable SCHED_CPULOAD.

Kernel Features -> [*] Performance Monitoring -> [*] Enable CPU load monitoring

Disable FS_PROCFS_EXCLUDE_CPULOAD.

File Systems -> [*] PROCFS File System -> Exclude individual procfs entries -> [ ] Exclude CPU load

Disable CONFIG_DISABLE_PTHREAD.

Kernel Features -> Disable Tinyara interfaces -> [ ] Disable pthread support

Disable CONFIG_DISABLE_SIGNALS.

Kernel Features -> Disable Tinyara interfaces -> [ ] Disable signal support

date

This command prints the date. This has an argument which sets system time and date information.

TASH>>date --help

Usage: date
   or: date [-s FORMAT]
Display, or Set system time and date information

Options:
 -s FORMAT     Set system time in the given FORMAT
               FORMAT: MMM DD HH:MM:SS YYYY
                'month', 'day', 'hour':'minute':'second' 'year'
                Example: Apr 21 10:35:22 1991

TASH>>date
Jan 01 00:00:09 2010

TASH>>date -s Feb 27 14:41:05 2018
TASH>>date
Feb 27 14:41:06 2018

How to Enable

Enable CONFIG_ENABLE_DATE to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] date

df

This shows information about the File System on which each FILE resides, or all File Systems by default.

TASH>>df -h
Filesystem    Size      Used  Available Mounted on
smartfs      1000K     7680B       992K /mnt
procfs          0B        0B         0B /proc
smartfs       256K        7K       249K /ramfs
romfs         256B      256B         0B /rom

TASH>>df
  Block  Number
  Size   Blocks     Used Available Mounted on
   512     2000       15      1985 /mnt
     0        0        0         0 /proc
   512      512       14       498 /ramfs
   256        1        1         0 /rom

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_MOUNTPOINT.
File Systems -> [ ] Disable support for mount points
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

dmesg

This command shows all debug messages which saved in RAM log buffer.

TASH>>dmesg
s5j_sflash_init: FLASH Quad Enabled
uart_register: Registering /dev/console
uart_register: Registering /dev/ttyS0
uart_register: Registering /dev/ttyS1
uart_register: Registering /dev/ttyS2
uart_register: Registering /dev/ttyS3
uart_register: Registering /dev/ttyS4
i2c_uioregister: Registering /dev/i2c-0
i2c_uioregister: Registering /dev/i2c-1

How to Enable

Enable CONFIG_ENABLE_DMESG to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] dmesg

Dependency

  • Enable CONFIG_SYSLOG.
File System -> [*] Advanced SYSLOG features
  • Enable CONFIG_RAMLOG_SYSLOG.
Device Drivers -> [*] RAM log device support

echo

This command prints the 'input_text' contents to standard output or writes/appends it to target file.

Usage:
   echo [OPTIONS] [input_text] [> or >>] [target_file_path]  
   OPTIONS: `-n` - do not output the trailing newline.  
            `--help` - displays usage.  
TASH>>ls /mnt
/mnt:
TASH>>echo "abc" > /mnt/test.txt
TASH>>cat /mnt/test.txt
abc

TASH>>echo -n "abc" > /mnt/test.txt
TASH>>cat /mnt/test.txt
abc
TASH>>echo -n "123" >> /mnt/test.txt
TASH>>cat /mnt/test.txt
abc123

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

free

This command shows heap information.

TASH>>free
              total       used       free    largest
Data:        959312      44144     915168     909296

How to Enable

Enable CONFIG_ENABLE_FREE to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] free

getenv/setenv/unsetenv

These commands are related with setting or getting the environment variables.
The getenv prints all of environment variables. If specific environment name is given, this prints the value of given environment.
The setenv save new environment variable with given value.
The unsetenv unsets environment variable with NAME.

TASH>>getenv --help

Usage : getenv [NAME]
Display the value of a variable, NAME or all environment variables
If NAME is not specified, 'name=value' pairs of all environment variables will be displayed

TASH>>setenv --help
Usage : setenv NAME VALUE

TASH>>unsetenv --help

Usage : unsetenv NAME
Remove the variable, NAME from the environment

TASH>>setenv TEST1 1
env "TEST1=1" is SET
TASH>>setenv TEST2 2
env "TEST2=2" is SET
TASH>>setenv TEST3 3
env "TEST3=3" is SET
TASH>>getenv
TEST1=1
TEST2=2
TEST3=3
TASH>>getenv TEST2
TEST2=2
TASH>>unsetenv TEST2
env "TEST2" is UNSET
TASH>>getenv TEST2
GET is failed, err (2)

How to Enable

Enable CONFIG_ENABLE_ENV_GET/SET/UNSET to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] env get / [*] env set / [*]env unset

Dependency

Disable CONFIG_DISABLE_ENVIRON.

Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support

heapinfo

This command shows heap memory usages per thread. This has arguments which configure the printing information.

TASH>>heapinfo --help

Usage: heapinfo [-TARGET] [-OPTION]
Display information of heap memory

Options:
[-TARGET]
 -k             Kernel Heap
                (-k target is available when CONFIG_BUILD_PROTECTED is enabled)
 -b BIN_NAME    Heap for BIN_NAME binary
                (-b target is available when CONFIG_APP_BINARY_SEPARATION is enabled)
[-OPTION]
 -a             Show the all allocation details
 -p PID         Show the specific PID allocation details
 -f             Show the free list
 -g             Show the User defined group allocation details
                (for -g option, CONFIG_HEAPINFO_GROUP is needed)
 -e HEAP_IDX    Show the heap[HEAP_IDX] allocation details
                (-e option is available when CONFIG_KMM_NHEAPS is greater than 1)
 -r             Show the all region information
                (-r option is available when CONFIG_KMM_REGIONS is greater than 1)

TASH>>heapinfo

****************************************************************
     Summary of Heap Usages (Size in Bytes)
****************************************************************
Total                           : 960320 (100%)
  - Allocated (Current / Peak)  : 44256 (4%) / 48624 (5%)
  - Free (Current)              : 916032 (95%)
  - Reserved                    : 32

****************************************************************
     Details of Heap Usages (Size in Bytes)
****************************************************************
< Free >
  - Number of Free Node               : 2
  - Largest Free Node Size            : 911840

< Allocation >
  - Current Size (Alive Allocation) = (1) + (2) + (3)
     . by Dead Threads (*) (1)        : 2272
     . by Alive Threads
        - Sum of "STACK"(**) (2)      : 6176
        - Sum of "CURR_HEAP" (3)      : 35808
** NOTE **
(*)  Alive allocation by dead threads might be used by others or might be a leakage.
(**) Only Idle task has a separate stack region,
  rest are all allocated on the heap region.

< by Alive Threads >
PID |  PPID | STACK | CURR_HEAP | PEAK_HEAP | NAME
----|-------|-------|-----------|-----------|----------
  0 |     0 |  1024 |     35664 |     40000 | Idle Task()
  1 |     0 |  2064 |         0 |         0 | hpwork()
  3 |     2 |  4112 |       144 |       176 | tash()

Term

  • CURR_HEAP : The current allocated heap size until running this command(bytes)
  • PEAK_HEAP : The peak allocated heap size until running this command(bytes)
  • MemAddr : The address of allocation
  • Owner : The holder who allocate the memory

How to Enable

Enable CONFIG_ENABLE_HEAPINFO_CMD to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] heapinfo

Dependency

Enable CONFIG_DEBUG_MM_HEAPINFO.

Debug options -> [*] Enable Debug Output Features -> [*] Heap Info debug option

Heapinfo for User defined Group

With specified task/thread name, heapinfo can show User defined group heap memory usage.

Enable CONFIG_HEAPINFO_GROUP to use this option.

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] heapinfo -> [*] Enable User defined Group Memory Usage -> set Thread Name List for measuring Alloc size
  • Thread Name List for measuring Alloc size can be set like below:
    Task/Thread name is separated with ',' and Group is separated with '/'.
    For example, "abc,def/ghi,jklmn/opqr".
****************************************************************
Heap Allocation Information per User defined Group
****************************************************************
 PEAK | HEAP_ON_PEAK | STACK_ON_PEAK | THREADS_IN_GROUP
----------------------------------------------------------------
 4572 |         3568 |          1004 | abc,def
 5772 |         4768 |          1004 | ghi,jklmn
 2940 |          896 |          2044 | opqr

history

This command shows the history you executed.
Using this functionality, you can re-execute the command by calling the number with ! or by up and down keys.

TASH>>history
         TASH command history
         --------------------
 1       history
 2       help
 3       sleep 1
 4       ps
 5       help
 6       echo test
 7       ls
 8       history
TASH>>!2
         TASH command list
         --------------------
arastorage_itc   arastorage_utc   cat              cd
date             df               dhcpd            drivers_tc
echo             exit             filesystem_tc    free
getenv           heapinfo         help             history
ifconfig         ifdown           ifup             iperf
kernel_tc        kill             killall          ls
mkdir            mount            netdb            netmon
network_tc       ntpclient        ps               pwd
reboot           rm               rmdir            setenv
sleep            start_itc_sampl  stkmon           sysio_itc
sysio_utc        taskmgr_itc      taskmgr_utc      tm_broadcast1
tm_broadcast2    tm_broadcast3    tm_itc           tm_sample
tm_sample_itc    tm_utc           umount           unsetenv
uptime           wm_test
TASH>>

NOTE We provide the configuration, CONFIG_TASH_MAX_STORE_COMMANDS, to set the maximum number of commands due to memory limitations. When the history has maximum number of commands stored, the oldest command will be removed to store the last command.

How to Enable

Set CONFIG_TASH_MAX_STORE_COMMANDS value to use this command on menuconfig as shown below:

Application Configuration -> Shell -> [*] Enable shell -> set the value of Max number of stored TASH commands

When it has 0 value, history command is disabled.

irqinfo

This command shows the number of registered interrupts, it's occurrence counts and corresponding isr.

TASH>>irqinfo
 INDEX | IRQ_NUM | INT_COUNT | ISR_NAME
-------|---------|-----------|----------
     1 |      36 |         0 | gic_interrupt
     2 |      37 |         0 | gic_interrupt
     3 |      58 |       228 | up_timerisr
     4 |      90 |        36 | up_interrupt

How to Enable

Enable CONFIG_ENABLE_IRQINFO_CMD to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] irqinfo

Dependency

  • Enable CONFIG_DEBUG.
Debug Options -> [*] Enable Debug Output Features
  • Enable CONFIG_DEBUG_IRQ_INFO.
Debug Options -> Enable Debug Output Features -> [*] Interrupt Debug information

kill/killall

These commands send a signal to specific or all threads.
kill sends a signal to specific thread.
killall sends a signal to all threads which have a same name.

TASH>>kill --help

Usage: kill [-SIGNAME|SIGNUM] PID
   or: kill -l
Send a signal SIGNAME or SIGNUM to a process PID
If no signal is specified, SIGKILL is sent because we don't support SIGTERM
* Caution: SIGKILL terminates task/thread without any operations

Options:
 -l             List all signal names

TASH>>killall --help

Usage: killall [-SIGNAME|SIGNUM] NAME
   or: killall -l
Send a signal specified by SIGNAME or SIGNUM to a processes named NAME
If no signal is specified, SIGKILL is sent because we don't support SIGTERM
* Caution: SIGKILL terminates task/thread without any operations

Options:
 -l           List all signal names

How to Enable

Enable CONFIG_ENABLE_KILL/KILLALL to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] kill/killall

Dependency

  • Disable CONFIG_DISABLE_SIGNALS.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable signal support
  • The CONFIG_TASK_NAME_SIZE should be greater than 0 to use killall.
Kernel Features -> Tasks and Scheduling -> Maximum task name size to greater than 0

ls

This lists information about the FILEs (the current directory by default).

Usage:
   ls [-lRs] <directory>
TASH>>ls
/:
 dev/
 mnt/
 proc/
 ramfs/
 rom/

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

mkdir

This creates the DIRECTORY(ies), if they do not already exist.

Usage:
   mkdir [directory name]
TASH>>ls
/mnt:
TASH>>mkdir test
TASH>>ls
/mnt:
 test/

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

mv

Replaces source path entry with target entry, given that the target path entry does not exist.

Usage:
   Usage:  mv [source_file_path] [target_file_path]
TASH>>ls
/mnt:
 test/
TASH>>mv /mnt/test /mnt/test1
TASH>>ls
/mnt:
 test1/

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

mount

This mounts specific File System.

Usage:
   mount -t <filesystem name> <source directory> <target directory>

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_MOUNTPOINT.
File Systems -> [ ] Disable support for mount points
  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

prodconfig

This shows the status of hw configurations like swd enable/disable.

TASH>>prodconfig

If "HW Debug : On" is printed, it means SWD is enabled. If "Off", the SWD is disabled.
If "Download : Downloader & Hotfix Available" is printed, it is possible to download the image through downloader tool. If not, it is only possible to download the image through hotfix.

How to Enable

Enable CONFIG_PRODCONFIG and CONFIG_ENABLE_PRODCONFIG to use this command on menuconfig as shown below:

Device Drivers -> [*] Product config Driver Support
Application Configuration -> System Libraries and Add-Ons -> [*] prodconfig

ps

This command shows information about a selection of the active threads.

TASH>>ps

  PID | PRIO | FLAG |  TYPE   | NP |  STATUS  | WAIT INFO  | CPU | IRQCOUNT | NAME
------|------|------|---------|----|----------|------------|-----|----------|-----
    0 |    0 | FIFO | KTHREAD | N  | RUNNING  |          - |   0 |        0 | CPU0 IDLE
    1 |    0 | FIFO | KTHREAD | N  | RUNNING  |          - |   1 |        0 | CPU1 IDLE
    2 |  201 | RR   | KTHREAD |    | WAITSIG  |   00020000 |   1 |        2 | hpwork
    3 |   50 | RR   | KTHREAD |    | WAITSIG  |   00020000 |   1 |        2 | lpwork
    5 |  200 | RR   | KTHREAD |    | MQNEMPTY | 0x60136aa0 |   1 |        1 | km4_log_task
    6 |  204 | RR   | KTHREAD |    | WAITSEM  | 0x60191418 |   1 |        1 | LCD Frame flusing

Term

  • FLAG : The policy of scheduling for each task/thread.
  • TYPE : The type of task/thread. It can be KTHREAD(kernel thread), PTHREAD(user pthread) and TASK.
  • NP : The flag of cancelable.
  • STATUS : Current state of the task/thread. It can be PENDING, READYTORUN, RUNNING, etc.
  • WAIT INFO : The wait object address or value depending on STATUS. For WAITSEM, it shows the semaphore address. For WAITSIG, it shows the signal wait mask. For MQNOTEMPTY/MQNOTFULL, it shows the message queue address. Shows - if not waiting.
  • CPU : It represents the CPU core where the task is currently running, but if the task is not running, it holds the last CPU where it was executed.
  • IRQCOUNT : It helps us to track how many nested critical section, particular thread has entered and not left when it was running.
  • NAME : Name of the task/thread.

How to Enable

Enable CONFIG_ENABLE_PS to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] ps

pwd

This shows current working directory.

TASH>>pwd
         /mnt

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

reboot

This command supports rebooting a board.

TASH>>reboot

U-Boot 2017.01-g59977f7 (Nov 23 2017 - 16:09:49 +0900)

CPU:
Model:
DRAM:
WARNING: Caches not enabled
BL1 released at 2017-3-13 15:00
SSS released at 2017-09-12
WLAN released at 2017-03-21
Flash: 8 MiB
...
System Information:
        Version: 1.1
        Commit Hash: 34d5b12f4c3b506e627ef80e12f0a7fbc6f33f40
        Build User: sunghan@ubuntu
        Build Time: 2018-02-27 09:19:19
        System Time: 01 Jan 2010, 00:00:00 [s] UTC Hardware RTC Support
Hello, World!!
TASH>>

How to Enable

Enable CONFIG_BOARDCTL_RESET on menuconfig.

Hardware Configuration -> Board Selection -> [*] Enable boardctl() interface -> [*] Enable reset interface

rm

This unlinks target file.

Usage:
   rm [file path]
TASH>>ls
/mnt:
 test.txt
TASH>>rm test.txt
TASH>>ls
/mnt:

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

rmdir

This unlinks target directory.

Usage:
   rmdir [directory path]
TASH>>ls
/mnt:
 test/
TASH>>rmdir test
TASH>>ls
/mnt:

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

sh

This command supports executing shell script.
There is an argument to give path and name of script file.

TASH>>sh /rom/print_hello2_help1_hello1.sh
Command will be launched with pri (100), stack size(4096)
Command will be launched with pri (100), stack size(4096)
         TASH command list
         --------------------
cat              cd               date             df
dhcpd            exit             free             getenv
heapinfo         hello            help             ifconfig
ifdown           ifup             iotjs            iperf
irqinfo          kill             killall          logm
ls               mkdir            mkrd             mksmartfs
mount            netdb            ping             ps
pwd              ramtest          reboot           rm
rmdir            setenv           sh               sleep
stkmon           tftpc            ttrace           umount
unsetenv         uptime           vi               wifi

Command will be launched with pri (100), stack size(4096)
Hello, World!!
Hello, World!!
Hello, World!!

How to Enable

Enable CONFIG_TASH_SCRIPT to use this command on menuconfig as shown below:

Application Configuration -> Shell -> [*] Enable shell -> [*] enable shell script

sleep

This command supports sleeping of shell. This has an argument which shows sleeping seconds.

Dependency

Disable CONFIG_DISABLE_SIGNALS.

Kernel Features -> Disable TinyAra interfaces -> [ ] Disable signal support

stkmon

This command shows stack information per thread periodically. This has an argument which stops the stack monitor daemon.

TASH>>stkmon --help

Usage: stkmon
   or: stkmon stop
Start, or Stop stack monitor daemon

TASH>>stkmon
TASH>>Stack Monitor: Running

=============================================================================
  PID |   STATUS |     SIZE | PEAK_STACK |  PEAK_HEAP |    TIME | THREAD NAME
------|----------|----------|------------|------------|---------|------------
    2 | INACTIVE |     2028 |        452 |      14496 |     375 | appinit
    4 | INACTIVE |     2028 |        308 |          0 |     375 | appmain
------|----------|----------|------------|------------|---------|------------
    0 |   ACTIVE |     1024 |        548 |      43952 |  153570 | Idle Task
    1 |   ACTIVE |     2028 |        164 |          0 |  153571 | hpwork
    3 |   ACTIVE |     4076 |        876 |       3680 |  153571 | tash
    5 |   ACTIVE |     1020 |        516 |          0 |  153571 | StackMonitor

TASH>>stkmon stop
Stack Monitor: Stopping, not stopped yet
TASH>>Stack Monitor: Stopped well

Term

  • STATUS : The status of each task/thread. INACTIVE is for finished task/thread. ACTIVE is living task/thread.
  • PEAK_STACK : The peak used stack size of each task/thread when run this command.
  • PEAK_HEAP : The peak allocated heap siz of each task/thread when run this command.

How to Enable

Enable CONFIG_ENABLE_STACKMONITOR to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] Stack monitor

Dependency

Enable CONFIG_STACK_COLORATION.

Debug Options -> [*] Stack coloration

umount

This unmounts specific File System.

Usage:
   umount <mounted directory>

How to Enable

Enable CONFIG_FS_CMDS on menuconfig.

Application Configuration -> System Libraries and Add-Ons -> [*] FS shell commands

Dependancy

  • Disable CONFIG_DISABLE_MOUNTPOINT.
File Systems -> [ ] Disable support for mount points
  • Disable CONFIG_DISABLE_ENVIRON.
Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variable support
  • Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS.
Kernel Features -> Files and I/O -> Maximum number of file descriptors per task

uptime

This command shows how long the system has been running.

TASH>>uptime
Uptime : 1502.82

How to Enable

Enable CONFIG_ENABLE_STACKMONITOR to use this command on menuconfig as shown below:

Application Configuration -> System Libraries and Add-Ons -> [*] Kernel shell commands -> [*] uptime