Skip to content

Instantly share code, notes, and snippets.

@life1347
Created August 2, 2018 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save life1347/5f04b2974461c4d99a2ff00e6dfcf542 to your computer and use it in GitHub Desktop.
Save life1347/5f04b2974461c4d99a2ff00e6dfcf542 to your computer and use it in GitHub Desktop.
# exec form
FROM ubuntu
ENTRYPOINT ["top", "-b"]
# exec form result
top - 03:41:47 up 19 min, 0 users, load average: 0.61, 0.34, 0.27
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.0 us, 2.3 sy, 0.0 ni, 94.4 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3938828 total, 1300384 free, 582236 used, 2056208 buff/cache
KiB Swap: 1023996 total, 1023996 free, 0 used. 2561664 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 36484 3024 2672 R 0.0 0.1 0:00.07 top
# shell form
FROM ubuntu
ENTRYPOINT top -b
# shell form result
top - 03:43:40 up 21 min, 0 users, load average: 0.17, 0.25, 0.24
Tasks: 2 total, 1 running, 1 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.8 us, 2.6 sy, 0.0 ni, 94.2 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3938828 total, 1312452 free, 569556 used, 2056820 buff/cache
KiB Swap: 1023996 total, 1023996 free, 0 used. 2574344 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 4628 808 744 S 0.0 0.0 0:00.01 sh
5 root 20 0 36484 3052 2704 R 0.0 0.1 0:00.02 top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment