Get system info using syscalls in c library.
Prerequest:
- Ubuntu 16.04
- GCC installed
$ sudo chmod u+x test.sh
$ ./test.sh
user
: normal processes executing in user mode
nice
: niced processes executing in user mode
system
: processes executing in kernel mode
idle
: twiddling thumbs
readdir() beginning with dots instead of files [duplicate]